all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: GuixSD <guix-devel@gnu.org>
Subject: Fix for non-interactive SSH sessions
Date: Thu, 12 Mar 2015 21:09:12 +0100	[thread overview]
Message-ID: <87r3su3rmf.fsf@gnu.org> (raw)

FYI 9a10acc fixes a bug when running a non-interactive SSH session to a
GuixSD machine (running lshd), as in:

  ssh localhost uname

Before, this would result in “command not found” because $PATH would be
left uninitialized.  Now there’s a ha^W special trick in the .bashrc
skeleton to handle this use case:

  if [ -n "$SSH_CLIENT" -a -z "`type -P cat`" ]
  then
      # We are being invoked from a non-interactive SSH session
      # (as in "ssh host command") but 'cat' cannot be found
      # in $PATH.  Source /etc/profile so we get $PATH and other
      # essential variables.
      source /etc/profile
  fi

You may want to copy this to your ~/.bashrc.

Ludo’.

                 reply	other threads:[~2015-03-12 20:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87r3su3rmf.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    /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.