unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Using Emacs as root ?
@ 2006-09-09 22:38 William Case
  2006-09-09 22:50 ` Xiao-Yong Jin
  0 siblings, 1 reply; 3+ messages in thread
From: William Case @ 2006-09-09 22:38 UTC (permalink / raw)


Hi;

Kind of an Emacs beginner's question.

I do only a little programming -- occasionally writing bash scripts;
that kind of thing.  I mainly use emacs from my desktop launcher to edit
text files like my .bashrc etc.

The other day I was reading up on man smb.conf in my gterminal and
wanted to make some minor changes to smb.conf.  I needed to open a new
tab in the gterminal; su; then run emacs /etc/samba/smb.conf.  That's OK
if that is what emacs is designed to do.  But is there a way to launch
emacs and use some command in the emacs input line that will directly
open a root protected file while I am user, perhaps combined with C-x
C-f?  Is there some key combination I can set up?
-- 
Regards Bill

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using Emacs as root ?
  2006-09-09 22:38 Using Emacs as root ? William Case
@ 2006-09-09 22:50 ` Xiao-Yong Jin
  0 siblings, 0 replies; 3+ messages in thread
From: Xiao-Yong Jin @ 2006-09-09 22:50 UTC (permalink / raw)
  Cc: EMACS List

William Case <billlinux@rogers.com> writes:

> Hi;
>
> Kind of an Emacs beginner's question.
>
> I do only a little programming -- occasionally writing bash scripts;
> that kind of thing.  I mainly use emacs from my desktop launcher to edit
> text files like my .bashrc etc.
>
> The other day I was reading up on man smb.conf in my gterminal and
> wanted to make some minor changes to smb.conf.  I needed to open a new
> tab in the gterminal; su; then run emacs /etc/samba/smb.conf.  That's OK
> if that is what emacs is designed to do.  But is there a way to launch
> emacs and use some command in the emacs input line that will directly
> open a root protected file while I am user, perhaps combined with C-x
> C-f?  Is there some key combination I can set up?

Try 

C-x C-f /sudo:root@localhost:/

Or use su instead of sudo if you don't use sudo.  You can get more
information in the info pages of Tramp in Emacs.

Xiao-Yong

-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using Emacs as root ?
       [not found] <mailman.6705.1157841502.9609.help-gnu-emacs@gnu.org>
@ 2006-09-09 22:59 ` Thorsten Bonow
  0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Bonow @ 2006-09-09 22:59 UTC (permalink / raw)


>>>>> "William" == William Case <billlinux@rogers.com> writes:

    William> [...] But is there a
    William> way to launch emacs and use some command in the emacs input line
    William> that will directly open a root protected file while I am user,
    William> perhaps combined with C-x C-f?  Is there some key combination I can
    William> set up?  -- Regards Bill

Hi, maybe you should try the "tramp" package which is great for accessing remote
files or ones which belong to a different user or root.

It's described in the Emacs Wiki, which I would recommend as a first place to
look for everything Emacs related...

http://www.emacswiki.org/cgi-bin/wiki/TrampMode

Hope this helps...

Toto



-- 
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow

New York was the kind of place where you could hide from
anything. Possibly even yourself.

Friedman, Kinky (1993), A case of Lone Star. New York (Wings Books),
274

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-09 22:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-09 22:38 Using Emacs as root ? William Case
2006-09-09 22:50 ` Xiao-Yong Jin
     [not found] <mailman.6705.1157841502.9609.help-gnu-emacs@gnu.org>
2006-09-09 22:59 ` Thorsten Bonow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).