unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mathias Megyei <mathias@mnet-mail.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: No User Shell Envir in Emacs via SSH
Date: Fri, 01 Dec 2006 19:31:21 +0100	[thread overview]
Message-ID: <1164997881.27763.8.camel@champfer> (raw)
In-Reply-To: <87odqouqq6.fsf@offby1.atm01.sea.blarg.net>

I have in my .bash_profile

LOGIN_SHELL=true
export LOGIN_SHELL

and in my .bashrc

if [ "x$LOGIN_SHELL" = "x" ]; then
    . .bash_profile
fi

Sa after ssh my .bash_profile is sorced only once.

Mathias

On Thu, 2006-11-30 at 21:31 -0800, Eric Hanchrow wrote:
>     Sitting at home, I enter this into KDE's "Run Command..."
>     (Kubuntu) to "map" an X11/Emacs session running on my office
>     machine onto my home machine's monitor:
> 
>           +----------------------------+ | Command: ssh office emacs |
>           +----------------------------+
> 
>     The window appears on my home machine as expected and works fine.
> 
>     The problem, however, is that my office machine's "bash
>     environment" isn't included/defined within Emacs.  Apparently, the
>     only environmental variables defined are those from a system-wide
>     Bash init file (e.g.  DISPLAY, HOME, LANG, MAIL, PATH, etc.).
> 
>     Does anyone know what I need to do so that the "exported
>     variables" (i.e., environment) defined in my ".bashrc" are also
>     present?
> 
> I've never found a good solution for this.
> 
> What I'm using now is an astonishingly ugly Rube Goldberg type hack,
> whereby my .bashrc runs a _perl_ program that creates files with
> environment variable definitions -- one for the Bourne shell, and one
> for emacs -- and then my .bash_profile sources the shell file, and I
> have Emacs load the emacs file.
> 
> It works, but it makes the Baby Jesus cry.  Details upon request.
> 

      reply	other threads:[~2006-12-01 18:31 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
2006-12-01  5:31 ` Eric Hanchrow
2006-12-01 18:31   ` Mathias Megyei [this message]

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=1164997881.27763.8.camel@champfer \
    --to=mathias@mnet-mail.de \
    --cc=help-gnu-emacs@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.
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).