From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: tbonemp3@yahoo.com (Ted Weatherly) Newsgroups: gmane.emacs.help Subject: Running emacs as root Date: 7 Jan 2004 10:45:18 -0800 Organization: http://groups.google.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1073502226 24933 80.91.224.253 (7 Jan 2004 19:03:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Jan 2004 19:03:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 07 20:03:43 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AeIxz-00042e-00 for ; Wed, 07 Jan 2004 20:03:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AeJt1-0003Li-HN for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Jan 2004 15:02:39 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 15 Original-NNTP-Posting-Host: 63.211.143.38 Original-X-Trace: posting.google.com 1073501118 17775 127.0.0.1 (7 Jan 2004 18:45:18 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 7 Jan 2004 18:45:18 +0000 (UTC) Original-Xref: shelby.stanford.edu gnu.emacs.help:119844 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15787 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15787 Hi, To run emacs as root, I normally 'su' then 'emacs'. I'd like to create a script to simplify this. I try: sudo -u root /bin/sh -c "emacs" ...and I'm able to edit files as root. But when I run a shell within emacs, my prompt displays as if I'm a regular user (i.e. it shows as "/tmp> " but I want "/tmp# "). So it appears as if emacs is using the .profile of the regular user. How do I fix this? Perhaps there is a better way to launch emacs as root? Thanks. -Ted