From: Saku Laesvuori via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Malte Frank Gerdes <malte.f.gerdes@gmail.com>
Cc: 66168@debbugs.gnu.org
Subject: bug#66168: zsh home service breaks guix shell via ssh
Date: Sun, 24 Sep 2023 18:27:08 +0300 [thread overview]
Message-ID: <gvkz2lwzlrs7nokt6fjfy45p4gulpt6xss54dxfvkd7gjmp2tm@jwb7hnnfnj3i> (raw)
In-Reply-To: <868r8xrxu4.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]
On Sat, Sep 23, 2023 at 12:19:10PM +0200, Malte Frank Gerdes wrote:
> I noticed that after connecting via ssh the profile that gets created
> when doing `guix shell' is not sourced, therefore the environment
> variables are not correct. This seems to be because guix home inserts
> "[ -n \"$SSH_CLIENT\" ] && source /etc/profile" into the zshenv file. I
> assume this is meant to ensure that /etc/profile is sourced because ssh
> does not start a login shell?
That is correct, it was added in <https://issues.guix.gnu.org/64765>
because commands like `ssh host -- cmd` (and commands depending on ssh
such as `git pull/push`) failed.
> Anyway, removing that line makes everything work normally. So am i
> doing it wrong or is this actually unnecessary?
I can reproduce this:
```
$ ssh localhost
$ guix shell gnuplot
$ gnuplot
zsh: command not found: gnuplot
```
However (still within the ssh session)
```
$ guix shell gnuplot -- gnuplot
[gnuplot opens as expected]
```
and weirdly enough
```
$ guix shell --check gnuplot
guix shell: checking the environment variables visible from shell '/gnu/store/i4rj0banq044423if5xwb3df723g14r9-zsh-5.9/bin/zsh'...
guix shell: All is good! The shell gets correct environment variables.
$ gnuplot
zsh: command not found: gnuplot
```
I don't really know what is happening here. Why does it work when
running the command directly and why does `guix shell --check` claim
that everything is correct when clearly something is wrong? If I
understand correctly `.zshenv` should be sourced in all these cases but
for some reason the problems only occur in some of them.
Any ideas?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-09-24 15:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-23 10:19 bug#66168: zsh home service breaks guix shell via ssh Malte Frank Gerdes
2023-09-24 15:27 ` Saku Laesvuori via Bug reports for GNU Guix [this message]
2023-09-24 18:48 ` Malte Frank Gerdes
2023-09-25 14:56 ` Saku Laesvuori via Bug reports for GNU Guix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gvkz2lwzlrs7nokt6fjfy45p4gulpt6xss54dxfvkd7gjmp2tm@jwb7hnnfnj3i \
--to=bug-guix@gnu.org \
--cc=66168@debbugs.gnu.org \
--cc=malte.f.gerdes@gmail.com \
--cc=saku@laesvuori.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.