From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Micha Feigin Newsgroups: gmane.emacs.help Subject: Re: Editing a file as root Date: Mon, 15 Dec 2003 02:12:10 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <20031215001210.GB5887@luna.mooo.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071447468 20292 80.91.224.253 (15 Dec 2003 00:17:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Dec 2003 00:17:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 15 01:17:45 2003 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 1AVgQj-0002on-00 for ; Mon, 15 Dec 2003 01:17:45 +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 1AVhKK-0005z9-H0 for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Dec 2003 20:15:12 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AVhJw-0005vr-TM for help-gnu-emacs@gnu.org; Sun, 14 Dec 2003 20:14:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AVhJQ-0005SQ-S7 for help-gnu-emacs@gnu.org; Sun, 14 Dec 2003 20:14:47 -0500 Original-Received: from [132.66.16.11] (helo=post.tau.ac.il) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AVhJQ-0005O5-D3 for help-gnu-emacs@gnu.org; Sun, 14 Dec 2003 20:14:16 -0500 Original-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by post.tau.ac.il (Postfix) with ESMTP id A002215F6FD for ; Mon, 15 Dec 2003 02:12:47 +0200 (IST) Original-Received: from post.tau.ac.il (localhost.localdomain [127.0.0.1]) by localhost.localdomain (VaMailArmor-2.0.1.16) id 20926-7D626A17; Mon, 15 Dec 2003 02:12:47 +0200 Original-Received: from litshi.luna.local (bzq-218-67-57.red.bezeqint.net [81.218.67.57]) by post.tau.ac.il (Postfix) with ESMTP id 0ED7215F6FD for ; Mon, 15 Dec 2003 02:12:47 +0200 (IST) Original-Received: from micha by litshi.luna.local with local (Exim 4.30) id 1AVgLK-0001hT-4S for help-gnu-emacs@gnu.org; Mon, 15 Dec 2003 02:12:10 +0200 Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.16; VAE: 6.23.0.1; VDF: 6.23.0.9; host: localhost) 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:15253 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15253 On Sun, Dec 14, 2003 at 10:25:41PM +0100, David Kastrup wrote: > Dan Anderson writes: > > > bhiker@free.fr writes: > > > > > To edit a file as root, do I have to start another emacs ? > > > > Start emacs under a root shell or after suing (or sudoing emacs) and > > you'll start emacs running with root permissions. > > If you have tramp installed (like the CVS Emacs has by default), you > can just edit the file > /su::/etc/fstab > (for example), Emacs will ask you for the root password, spawn a root > shell and use a pipe to it to send files back and forth transparently. > > tramp is available as a separate package, too, if you don't like > using developer Emacsen. > Actually reading the tramp documentation it would seem that the correct way to do this is /[su/localhost]/etc/fstab Is it possible to make this shorter ? (dropping localhost results with an error). Using the way you said gives the following error: Opening FTP connection to su... ange-ftp-error: FTP Error: OPEN request failed: ftp: su: No address associated with name BTW, is there a way to do this using emacsclient? > -- > David Kastrup, Kriemhildstr. 15, 44793 Bochum > _______________________________________________ > Help-gnu-emacs mailing list > Help-gnu-emacs@gnu.org > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs >