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: starting emacs remote doesn't load .emacs Date: Thu, 11 Oct 2007 15:35:00 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87bqb6xlh7.fsf@lion.rapttech.com.au> References: <470CB421.3010606@softexperience.ro> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1192081232 1041 80.91.229.12 (11 Oct 2007 05:40:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2007 05:40:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 11 07:40:31 2007 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 1Ifqma-0003YT-Uu for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2007 07:40:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfqmV-00056u-2l for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2007 01:40:23 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!eweka.nl!hq-usenetpeers.eweka.nl!213.239.142.3.MISMATCH!feed.xsnews.nl!border-2.ams.xsnews.nl!68.142.88.77.MISMATCH!hwmnpeer03.ams!news.highwinds-media.com!feeder.news-service.com!feeder1.cambrium.nl!feed.tweaknews.nl!138.199.65.86.MISMATCH!sn-xt-ams-06!sn-xt-ams-05!sn-ams!sn-feed-ams-03!sn-post-ams-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:D2EGypTirtG930VZGiuIJO1ktYc= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 34 Original-Xref: shelby.stanford.edu gnu.emacs.help:152823 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:48328 Archived-At: Stefan Horomnea writes: > Hello, > > Ok, I got it :) > > I logged as bob user and then su to root. Emacs wasn't looking for > /root/.emacs but for /home/bob/.emacs > i just linked: ln -s /root/.emacs /home/bob/.emacs > this is a bad slution on many levels. 1. Read the man page on su and look at the difference between su and su - If you want things to be relative to the root user environment, you need the - 2. It is a bad idea to run any program as root unless you absolutely have to. there are many reasons for this, mainly relating to security and not 'shooting yourself in the foot'. If you think you have to run as root all the time, then there is something you have misunderstood. Let us know why you feel you need to run as root all the time and we can probably explain things so that you won't need to. There are rare occasions where it does make sense to run emacs as root, but these are rare and without meaning to sound rude, given your unawareness of how su and shell environments interact, I suspect you don't fall into one of those rare situations. 3. If you are running emacs 22, you iwll have tramp installed. tramp will allow you to easily edit files owned by root or execute commands as root. Use this rather than running emacs as root. -- tcross (at) rapttech dot com dot au