From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Megyei Newsgroups: gmane.emacs.help Subject: Re: No User Shell Envir in Emacs via SSH Date: Fri, 01 Dec 2006 19:31:21 +0100 Message-ID: <1164997881.27763.8.camel@champfer> References: <87vekxdnkw.fsf@be.cs.appstate.edu> <87odqouqq6.fsf@offby1.atm01.sea.blarg.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1164997928 2607 80.91.229.2 (1 Dec 2006 18:32:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Dec 2006 18:32:08 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 01 19:32:03 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GqDAk-0003Sk-Sv for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Dec 2006 19:31:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GqDAk-0005dZ-FH for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Dec 2006 13:31:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GqDAV-0005cH-9W for help-gnu-emacs@gnu.org; Fri, 01 Dec 2006 13:31:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GqDAS-0005a1-Ue for help-gnu-emacs@gnu.org; Fri, 01 Dec 2006 13:31:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GqDAS-0005Zf-MX for help-gnu-emacs@gnu.org; Fri, 01 Dec 2006 13:31:24 -0500 Original-Received: from [212.18.0.9] (helo=mail-out.m-online.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GqDAS-0004hQ-Fz for help-gnu-emacs@gnu.org; Fri, 01 Dec 2006 13:31:24 -0500 Original-Received: from mail01.m-online.net (svr21.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 2A83D99477; Fri, 1 Dec 2006 19:31:22 +0100 (CET) Original-Received: from [192.168.178.21] (ppp-82-135-68-238.dynamic.mnet-online.de [82.135.68.238]) by mail.m-online.net (Postfix) with ESMTP id DFD4293DC0; Fri, 1 Dec 2006 19:31:21 +0100 (CET) Original-To: Eric Hanchrow In-Reply-To: <87odqouqq6.fsf@offby1.atm01.sea.blarg.net> X-Mailer: Evolution 2.6.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39181 Archived-At: 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. >