From: Glenn Morris <rgm+news@stanford.edu>
Subject: Re: No User Shell Envir in Emacs via SSH
Date: Thu, 30 Nov 2006 19:49:26 -0800 [thread overview]
Message-ID: <grslg0b7i1.fsf@xoc2.stanford.EDU> (raw)
In-Reply-To: 87vekxdnkw.fsf@be.cs.appstate.edu
Kenneth Jacker wrote:
> +----------------------------+
> | Command: ssh office emacs |
> +----------------------------+
[...]
> The problem, however, is that my office machine's "bash environment"
> isn't included/defined within Emacs.
[...]
> Does anyone know what I need to do so that the "exported variables"
> (i.e., environment) defined in my ".bashrc" are also present?
That's a ssh/shell question rather than an Emacs question...
AFAIK, the "ssh <host> <command>" syntax starts a non-login shell on
the remote machine, so it should source ~/.bashrc but not
~/.bash_profile. Putting echo statements at the top of my ~/.bashrc
and ~/.bash_profile files and using 'ssh host true' confirms this.
Maybe you actually need ~/.bash_profile to be sourced, in which case
you can always just try:
ssh office 'source ~/.bash_profile; emacs'
Or maybe you can move statements from ~/.bash_profile to ~/.bashrc if
that makes sense.
Or maybe you have something in your ~/.bashrc that causes processing
to be aborted when sourced by ssh. Eg I have:
[ "$PS1" ] || return
part-way through mine, which means ssh only reads the top part of it.
next prev parent reply other threads:[~2006-12-01 3:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-30 14:19 No User Shell Envir in Emacs via SSH Kenneth Jacker
2006-12-01 3:49 ` Glenn Morris [this message]
2006-12-01 5:31 ` Eric Hanchrow
2006-12-01 18:31 ` Mathias Megyei
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=grslg0b7i1.fsf@xoc2.stanford.EDU \
--to=rgm+news@stanford.edu \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).