From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: .emacs file in root? Date: Sat, 19 Apr 2008 13:59:01 +1000 Organization: Rapt Technologies Message-ID: <87tzhyze9m.fsf@lion.rapttech.com.au> References: <480881a5$0$90267$14726298@news.sunsite.dk> <48088df8$0$90272$14726298@news.sunsite.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208619003 9744 80.91.229.12 (19 Apr 2008 15:30:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Apr 2008 15:30:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 19 17:30:37 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jn4tS-0003mu-UT for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Apr 2008 06:41:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jn4sn-0001Wq-F1 for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Apr 2008 00:41:01 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.internode!news.internode.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 18 Apr 2008 22:59:02 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:+MJQg/2qNlp1ATEofy+hZcw3ZsY= Original-Lines: 30 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 121.44.24.120 Original-X-Trace: sv3-6YaNHrGwQKlVxvp0vqjU8Cb4wnWZAULT03WhO+ps6o2VmR2bSU00YIm4Aa9b66rRRpn4NydX4mZNuFT!tQ4vzvx5tgpdGOZdnD0c9lgVT5Iy0nlPZ+KcF8QmIylQ+WjHD81KkYwcdKsLxmrkZ7cjHcvozA== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: shelby.stanford.edu gnu.emacs.help:158024 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:53390 Archived-At: saneman writes: >> you can use another .emacs special for root. > > How? > The answer depends on how your are editing files as root. If your using something like tramp to do this, I'm not sure you can. Emacs does have a command line option that tells it to use a different users init file. Of course, you must have read permission as the user you are logged in as to read this other users .emacs file. If you are switching to a root login using su, then you just need to do su -, which will setup the subshell as a proper root subshell and therefore will automatically source root's .emacs file rather than using your own .emacs file. A better solution might be to tell us what it is you are trying to do and why sourcing root's emacs init file is required. It is likely someone can come up with a better and more secure solution to the problem once we know what it is. Tim -- tcross (at) rapttech dot com dot au