From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas Newsgroups: gmane.emacs.help Subject: Re: 29.1: tramp: use $SHELL environment variable to start remote shell? Date: Sat, 02 Mar 2024 03:05:32 +0530 Message-ID: <874jdpeiu3.fsf@gmx.net> References: <87o7c75j1l.fsf@xelera.eu> <87jzmv58xd.fsf@xelera.eu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7402"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 01 22:36:15 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rgAYA-0001dK-F2 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 01 Mar 2024 22:36:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgAXk-0007Od-03; Fri, 01 Mar 2024 16:35:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgAXb-0007O6-Kg for help-gnu-emacs@gnu.org; Fri, 01 Mar 2024 16:35:40 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgAXZ-0004Fm-FC for help-gnu-emacs@gnu.org; Fri, 01 Mar 2024 16:35:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1709328935; x=1709933735; i=jimjoe@gmx.net; bh=EcD8Ti0fZ/iUBGlphv+iESJueTrfyLJMBEK/KcM2IrU=; h=X-UI-Sender-Class:From:To:Subject:In-Reply-To:References:Date; b=G4du/4RoOaARJo0lPwx3DxKJ7+4ba6+in43H7MKTP6o6o5BD0REy0MubOdBw9MLi DuPpfXUgZ0vjrwpWg/1KTldv+kO5ZEtDZsQihzWIv863f2eygrkom5aAR7MNTjXeg V9IusGOvfRBlJ8S1rZbltzZX9L7DXlanfrj6euxien2GzS61j5RcjQVM0bJe7IHUO umVPQhk9vcOP76+sE96w8cEDtckVXB1fsBY7sY3LEdB7B1YACnNRqb1JTQikpq86r 4btfgsQ9oY21rwAx5H8gigzjlYU7ljehbXQ49LEilU8uzmRagVkOlmDvxzg/YLG4o X3gVN7SuhGmcbL+Aqw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from user-Inspiron-15-5518 ([117.216.5.60]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M26rD-1ridW348Kn-002TrU for ; Fri, 01 Mar 2024 22:35:35 +0100 In-Reply-To: <87jzmv58xd.fsf@xelera.eu> (Giovanni Biscuolo's message of "Fri, 23 Feb 2024 19:31:42 +0100") X-Provags-ID: V03:K1:tYRXocI/qFWVvuPgo6Kud3cMOob/PWDN2rqX5CV3UB43WKFC4if ljzracPz2svwv8Gar/YxgHSUAjP32j5zdaAxIbekn/E5DTrSmOyM5MBeh35SxuevhO8cqc3 5kRgNlnCxgFFp8zCzL9gmXYLEymEVnilV1XvL3BXVVW8gJYBHtThS45bnpBm4XeiiMZu445 f2GIabzNMfUU9KE2t8/dg== UI-OutboundReport: notjunk:1;M01:P0:iMC1OB1vY8w=;UZRF1fuSNR9fmoJVJzHo8rf297R Gn30LSkCz6ZNAkLLvySDKMPv6maKBp/YEJ960HPd6G1YuumQ1WP6BNpfJmV6HH88XrIbHRV9q sbsQHMaaj3ABOA5itqzKenwULPGC0kE3PryqieGT73HV2+8Av6lClm6NRypUcYNupZiEaZwpo 8RGEm6tWSC0hnithR8ZRHnh1tVd0XQ1V2JJ9/1BZF5HML0WpTGB9lAgNFrKCYGvWwx/gQ1y9e sAERmWUQYvY0OHBQR+GWm0MjlOmj4jC1kDMFJ2avzDDB1aGMChTjIAdMBq6+3WY9U8ahN9sMV hNT6RwHA18DGaA/QmqMrCqI9CjZVjvQnS93tUjmCLspzmicaQCbwHPg2UqDxq+q2RUMFs6myw nX45UGpbSK3WAL7C90n+TMQtl5k1vyZJG/63EBt5e/M11Rbgp8TozxhkALcjYtCDPE7C9AXYE pV/4Vh3FuTSeNt0tGpFQD0HvW37cw6Tj+yIb8VbOpzfRaA42I0ZOaDUmiLAYCCP5ykVykV7Hc YOMd63N0l5oJlbxK6Kyd7tUQ7tlAd41Rct5iodOrZcSWz3l6EsCYGVzCJH+rvaSrf6VpD6i59 TL3l7rbkIlsWAajnAoRlIjdut5z7w9seU/ctIHgmcfGQZlDKj6Prs+XlOTd6PRkklCdWRBxZW 8+lg5wVr8ZPD1NSnBk80Bi8DSTsEzXOpWHI4I7dacX1KZMeUqa5aTV7q7SZzjrlTW0uMgAUyJ D2FgJUtOZS581ifob5aXGXWbmgroMkIadc2Yxaslk+EaxEzyAUedPP5ONfrKkGNa4JgEhSNb Received-SPF: pass client-ip=212.227.15.18; envelope-from=jimjoe@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146013 Archived-At: Giovanni Biscuolo wrote: > Giovanni Biscuolo writes: > > [...] > >> I need my remote profile to be loaded because all hosts I manage have >> Guix [2] installed and all needed environment variables are set by the >> user profile; here is an example of a "M-x shell" remote connection to a >> guix host (foreign distro), the same holds for "M-x eshell": >> >> --8<---------------cut here---------------start------------->8--- >> >> /ssh:local.biscuolo.anemone:/localhome/g/ #$ guix describe >> guix 3676e31 >> repository URL: https://git.savannah.gnu.org/git/guix.git >> commit: 3676e312aaf1ce10ed1d7844e871b54e04624098 >> /ssh:local.biscuolo.anemone:/localhome/g/ #$ $SHELL -l >> (anemone)g@anemone:~$ guix describe >> Generation 9 Apr 21 2021 09:23:33 (current) >> guix 13c4a37 >> repository URL: https://git.savannah.gnu.org/git/guix.git >> branch: master >> commit: 13c4a377f5a2e1240790679f3d5643385b6d7635 >> >> --8<---------------cut here---------------end--------------->8--- >> (as you can see, without proper environment guix is not able to run as >> it should) > > Please forgive me for the noise: the problem is in the environment of > (one of) my remote user! > > I tested again with other users on other hosts and the environment > variables of my profile are correctly set. > > Anyway, the shell I get when connecting is still not fully functional, > for example autocompletion does not work (write a substring and then > TAB) and also up and down arrow keys do not work (echoes escape > sequances instead of showing the shell history) (FWIW) You might need to set $TERM, but I don't use vterm, only M-x shell; see (info "(emacs) Shell") for 'explicit-shell-file-name' and its '-args'. And this package for autocompletion in it: https://github.com/CeleritasCelery/emacs-native-shell-complete eshell has its own (limited) completion (which is good enough for me) but you can also use: https://github.com/szermatt/emacs-bash-completion ...which is slightly heavier, because the previous package doesn't support eshell (yet). --