From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.help Subject: Re: No User Shell Envir in Emacs via SSH Date: Thu, 30 Nov 2006 19:49:26 -0800 Organization: None Message-ID: References: <87vekxdnkw.fsf@be.cs.appstate.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1164948057 2653 80.91.229.2 (1 Dec 2006 04:40:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Dec 2006 04:40:57 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 01 05:40:55 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 1Gq0Cj-0007cN-4V for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Dec 2006 05:40:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gq0Ci-0003fL-PH for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Nov 2006 23:40:52 -0500 Original-Path: shelby.stanford.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: xoc2.stanford.edu Original-X-Trace: news.Stanford.EDU 1164944966 23985 171.64.109.31 (1 Dec 2006 03:49:26 GMT) Original-X-Complaints-To: news@news.stanford.edu X-Spook: Hamas ELF-RC divers rail gun Ejercito Popular X-Ran: uUm8\c(b!#B^{9&.xU:>W0;(?}k]`P4aCt%R5 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:39152 Archived-At: 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 " 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.