From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Fix for non-interactive SSH sessions Date: Thu, 12 Mar 2015 21:09:12 +0100 Message-ID: <87r3su3rmf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW9Py-0005Xi-PF for guix-devel@gnu.org; Thu, 12 Mar 2015 16:09:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YW9Pv-0002pP-Fq for guix-devel@gnu.org; Thu, 12 Mar 2015 16:09:18 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW9Pv-0002pL-CJ for guix-devel@gnu.org; Thu, 12 Mar 2015 16:09:15 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:46149 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YW9Pu-0007y3-Rw for guix-devel@gnu.org; Thu, 12 Mar 2015 16:09:15 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: GuixSD 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 =E2=80=9Ccommand not found=E2=80=9D because $P= ATH would be left uninitialized. Now there=E2=80=99s 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=E2=80=99.