unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Using tramp with guixsd install image
@ 2017-06-30 20:15 Divan Santana
  2017-07-01 14:01 ` Ludovic Courtès
  2017-07-01 15:21 ` Alex Kost
  0 siblings, 2 replies; 7+ messages in thread
From: Divan Santana @ 2017-06-30 20:15 UTC (permalink / raw)
  To: help-guix

Hi,

Trying to use my emacs (on arch linux) with the guixsd system from the
0.13 image and ssh-daemon. By image, this is a fresh VM booted
guixsd-usb-install-0.13.0.x86_64-linux and about to install guixsd .

This Used to work with 0.12 image.

Now I have this set

  ;; ;; TRAMP and guix settings
  (setq tramp-default-method "scp")
  ;; https://lists.gnu.org/archive/html/help-guix/2016-10/msg00049.html
  (setq tramp-remote-path
        (append tramp-remote-path
                '("~/.guix-profile/bin" "~/.guix-profile/sbin"
                  "/run/current-system/profile/bin"
                  "/run/current-system/profile/sbin")))

And I try open path:
=/ssh:root@192.168.122.236:/mnt/etc/config.scm=

However this results in "pid died" message. (Sometimes my emacs even
crashes.)

Anyway, after a bit of debugging there is a tramp buffer that pops up
briefly and reports

env /bin/sh no such file

If in the VM, I do a hack like

ln -s /run/current-system/profile/bin/sh /bin/sh

Then tramp works without issue.

How can one configure tramp to work without the above hack?

(sorry this is more of an emacs then guix question)

Divan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using tramp with guixsd install image
  2017-06-30 20:15 Using tramp with guixsd install image Divan Santana
@ 2017-07-01 14:01 ` Ludovic Courtès
  2017-07-01 20:36   ` Divan Santana
  2017-07-01 15:21 ` Alex Kost
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2017-07-01 14:01 UTC (permalink / raw)
  To: Divan Santana; +Cc: help-guix

Hi,

Divan Santana <divan@santanas.co.za> skribis:

> env /bin/sh no such file
>
> If in the VM, I do a hack like
>
> ln -s /run/current-system/profile/bin/sh /bin/sh
>
> Then tramp works without issue.
>
> How can one configure tramp to work without the above hack?

The VM image should contain a valid /bin/sh already, doesn’t it?

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using tramp with guixsd install image
  2017-06-30 20:15 Using tramp with guixsd install image Divan Santana
  2017-07-01 14:01 ` Ludovic Courtès
@ 2017-07-01 15:21 ` Alex Kost
  2017-07-01 21:14   ` Divan Santana
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Kost @ 2017-07-01 15:21 UTC (permalink / raw)
  To: Divan Santana; +Cc: help-guix

Divan Santana (2017-06-30 22:15 +0200) wrote:

> Hi,
>
> Trying to use my emacs (on arch linux) with the guixsd system from the
> 0.13 image and ssh-daemon. By image, this is a fresh VM booted
> guixsd-usb-install-0.13.0.x86_64-linux and about to install guixsd .
>
> This Used to work with 0.12 image.
>
> Now I have this set
>
>   ;; ;; TRAMP and guix settings
>   (setq tramp-default-method "scp")
>   ;; https://lists.gnu.org/archive/html/help-guix/2016-10/msg00049.html
>   (setq tramp-remote-path
>         (append tramp-remote-path
>                 '("~/.guix-profile/bin" "~/.guix-profile/sbin"
>                   "/run/current-system/profile/bin"
>                   "/run/current-system/profile/sbin")))

With this ^^^ your additional paths are "shadowed" by the default
value of 'tramp-remote-path'.  Try to make it reverse:

   (setq tramp-remote-path
         (append '("~/.guix-profile/bin" "~/.guix-profile/sbin"
                   "/run/current-system/profile/bin"
                   "/run/current-system/profile/sbin")
                 tramp-remote-path))

However I don't think you need to set all these paths manually.

The different behavior between 0.12 and 0.13 may be caused by this
commit:

  http://git.savannah.gnu.org/cgit/guix.git/commit/?id=dc7010911dd3285fe9089352e92c77501595d100

i.e. your problem may occur because 'tramp-default-remote-path' is the
first element of 'tramp-remote-path' variable now.

> How can one configure tramp to work without the above hack?

I don't know if it will help you or not, but here is the setting I have
in my emacs config, which works for me for years:

(with-eval-after-load 'tramp-sh
  (push 'tramp-own-remote-path tramp-remote-path))

-- 
Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using tramp with guixsd install image
  2017-07-01 14:01 ` Ludovic Courtès
@ 2017-07-01 20:36   ` Divan Santana
  2017-07-02 14:46     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Divan Santana @ 2017-07-01 20:36 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Ludovic Courtès <ludo@gnu.org> writes:

> Divan Santana <divan@santanas.co.za> skribis:
>
>> env /bin/sh no such file
>>
>> If in the VM, I do a hack like
>>
>> ln -s /run/current-system/profile/bin/sh /bin/sh
>>
>> Then tramp works without issue.
>>
>> How can one configure tramp to work without the above hack?
>
> The VM image should contain a valid /bin/sh already, doesn’t it?

No it doesn't.

There is no '/bin/sh' on the guixsd-usb-install-0.13.0.x86_64-linux.xz
image/VM.

I'm just reconfirmed.

Perhaps there was on the 0.12 VM.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using tramp with guixsd install image
  2017-07-01 15:21 ` Alex Kost
@ 2017-07-01 21:14   ` Divan Santana
  0 siblings, 0 replies; 7+ messages in thread
From: Divan Santana @ 2017-07-01 21:14 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix


Alex Kost <alezost@gmail.com> writes:

> Divan Santana (2017-06-30 22:15 +0200) wrote:
>
>> Hi,
>>
>> Trying to use my emacs (on arch linux) with the guixsd system from the
>> 0.13 image and ssh-daemon. By image, this is a fresh VM booted
>> guixsd-usb-install-0.13.0.x86_64-linux and about to install guixsd .
>>
>> This Used to work with 0.12 image.
>>
>> Now I have this set
>>
>>   ;; ;; TRAMP and guix settings
>>   (setq tramp-default-method "scp")
>>   ;; https://lists.gnu.org/archive/html/help-guix/2016-10/msg00049.html
>>   (setq tramp-remote-path
>>         (append tramp-remote-path
>>                 '("~/.guix-profile/bin" "~/.guix-profile/sbin"
>>                   "/run/current-system/profile/bin"
>>                   "/run/current-system/profile/sbin")))
>
> With this ^^^ your additional paths are "shadowed" by the default
> value of 'tramp-remote-path'.  Try to make it reverse:
>
>    (setq tramp-remote-path
>          (append '("~/.guix-profile/bin" "~/.guix-profile/sbin"
>                    "/run/current-system/profile/bin"
>                    "/run/current-system/profile/sbin")
>                  tramp-remote-path))

The above does make sense. I've tried it your suggested way and
unfortunately I'm getting the same results. For some reason my emacs
tramp is looking for /bin/sh still and has the same initial error
reported.

> However I don't think you need to set all these paths manually.
>
> The different behavior between 0.12 and 0.13 may be caused by this
> commit:
>
>   http://git.savannah.gnu.org/cgit/guix.git/commit/?id=dc7010911dd3285fe9089352e92c77501595d100
>
> i.e. your problem may occur because 'tramp-default-remote-path' is the
> first element of 'tramp-remote-path' variable now.

I think this wouldn't affect me as my emacs is from arch linux repositories?

>> How can one configure tramp to work without the above hack?
>
> I don't know if it will help you or not, but here is the setting I have
> in my emacs config, which works for me for years:
>
> (with-eval-after-load 'tramp-sh
>   (push 'tramp-own-remote-path tramp-remote-path))

The above didn't work for me either.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using tramp with guixsd install image
  2017-07-01 20:36   ` Divan Santana
@ 2017-07-02 14:46     ` Ludovic Courtès
  2017-07-02 18:43       ` Divan Santana
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2017-07-02 14:46 UTC (permalink / raw)
  To: Divan Santana; +Cc: help-guix

Hello,

Divan Santana <divan@santanas.co.za> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:

[...]

>> The VM image should contain a valid /bin/sh already, doesn’t it?
>
> No it doesn't.
>
> There is no '/bin/sh' on the guixsd-usb-install-0.13.0.x86_64-linux.xz
> image/VM.

Oops, indeed.  I’ve just fixed it:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=50cb948f1c584344c63129e535c2fe7b54332a87

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using tramp with guixsd install image
  2017-07-02 14:46     ` Ludovic Courtès
@ 2017-07-02 18:43       ` Divan Santana
  0 siblings, 0 replies; 7+ messages in thread
From: Divan Santana @ 2017-07-02 18:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Ludovic Courtès <ludo@gnu.org> writes:

> Divan Santana <divan@santanas.co.za> skribis:
>
> [...]
>
>>> The VM image should contain a valid /bin/sh already, doesn’t it?
>>
>> No it doesn't.
>>
>> There is no '/bin/sh' on the guixsd-usb-install-0.13.0.x86_64-linux.xz
>> image/VM.
>
> Oops, indeed.  I’ve just fixed it:
>
>   https://git.savannah.gnu.org/cgit/guix.git/commit/?id=50cb948f1c584344c63129e535c2fe7b54332a87

Great - thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-02 18:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30 20:15 Using tramp with guixsd install image Divan Santana
2017-07-01 14:01 ` Ludovic Courtès
2017-07-01 20:36   ` Divan Santana
2017-07-02 14:46     ` Ludovic Courtès
2017-07-02 18:43       ` Divan Santana
2017-07-01 15:21 ` Alex Kost
2017-07-01 21:14   ` Divan Santana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).