Re: How to tell tramp to use login shell in sudo multihop?
Tim Landscheidt <[email protected]> Wed, 23 Apr 2025 11:07:11 +0000
| Newsgroups | gmane.emacs.tramp |
|---|---|
| Organization | https://www.tim-landscheidt.de/ |
| Message-ID | <[email protected]> |
Tilmann Singer <[email protected]> wrote: > I answered too fast – I actually have one use case with not only the > PATH being set in .profile, but other environment variables as well. > Adding tramp-own-remote-path to tramp-remote-path is not sufficient in > this case. Is there way to ask Tramp to do sudo with "sudo -i" or > similar? > I wouldn't mind defining a custom Tramp method in my emacs config, e.g. > "sudoi", but my attempts of doing this have failed so far. I don't know if it fits your use case, but there is also tramp-remote-process-environment which can be used to set environment variables on (all) remotes. I used that for setting GIT_AUTHOR_EMAIL, etc. where having it set on all remotes is benign (in my case); if you need to confine some information to some remote, this may not be ap- propriate. Tim