* Root Session - from Shell command
@ 2007-07-05 14:08 flebber
2007-07-05 14:59 ` Peter Dyballa
2007-07-06 3:37 ` Tim X
0 siblings, 2 replies; 5+ messages in thread
From: flebber @ 2007-07-05 14:08 UTC (permalink / raw)
To: help-gnu-emacs
I want to, or am trying to edit my grub menu in emacs so am trying to
login as root from the shell command within emacs. Is this possible ?
I keep receiving the message -
standard in must be a tty.
I am launching emacs largely from the Kmenu.
Workaround :
I can have emacs as a root session if I start konsole and su to root
from there and then launch emacs.
So maybe I need to edit my bash profile to allow emacs access to the
shell ???
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Root Session - from Shell command
2007-07-05 14:08 Root Session - from Shell command flebber
@ 2007-07-05 14:59 ` Peter Dyballa
2007-07-05 20:03 ` J. David Boyd
[not found] ` <mailman.3108.1183665858.32220.help-gnu-emacs@gnu.org>
2007-07-06 3:37 ` Tim X
1 sibling, 2 replies; 5+ messages in thread
From: Peter Dyballa @ 2007-07-05 14:59 UTC (permalink / raw)
To: flebber; +Cc: help-gnu-emacs
Am 05.07.2007 um 16:08 schrieb flebber:
> So maybe I need to edit my bash profile to allow emacs access to the
> shell ???
No, you can't login in *shell* buffer, and neither in *terminal*
buffer. The proper way from inside GNU Emacs would be to use tramp:
C-x C-f /sudo::/boot/grub/grub.conf RET
--
Greetings
Pete
With Capitalism man exploits man. With communism it's the exact
opposite.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Root Session - from Shell command
2007-07-05 14:59 ` Peter Dyballa
@ 2007-07-05 20:03 ` J. David Boyd
[not found] ` <mailman.3108.1183665858.32220.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: J. David Boyd @ 2007-07-05 20:03 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 05.07.2007 um 16:08 schrieb flebber:
>
>> So maybe I need to edit my bash profile to allow emacs access to the
>> shell ???
>
> No, you can't login in *shell* buffer, and neither in *terminal*
> buffer. The proper way from inside GNU Emacs would be to use tramp:
>
> C-x C-f /sudo::/boot/grub/grub.conf RET
>
> --
> Greetings
>
> Pete
>
But you should be able to 'su'. I do that all the time in Mandriva.
Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Root Session - from Shell command
2007-07-05 14:08 Root Session - from Shell command flebber
2007-07-05 14:59 ` Peter Dyballa
@ 2007-07-06 3:37 ` Tim X
1 sibling, 0 replies; 5+ messages in thread
From: Tim X @ 2007-07-06 3:37 UTC (permalink / raw)
To: help-gnu-emacs
flebber <flebber.crue@gmail.com> writes:
> I want to, or am trying to edit my grub menu in emacs so am trying to
> login as root from the shell command within emacs. Is this possible ?
>
> I keep receiving the message -
>
> standard in must be a tty.
>
> I am launching emacs largely from the Kmenu.
>
> Workaround :
> I can have emacs as a root session if I start konsole and su to root
> from there and then launch emacs.
> So maybe I need to edit my bash profile to allow emacs access to the
> shell ???
>
The easiest way to edit files owned by another user, such as root, from within
your normal emacs session is to use tramp (which is now bundled with emacs 22).
You then just do a normal 'find-file' and use the following syntax -
/root@localhost:/path/to/file
you will be prompted for the password.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Root Session - from Shell command
[not found] ` <mailman.3108.1183665858.32220.help-gnu-emacs@gnu.org>
@ 2007-07-06 3:42 ` Tim X
0 siblings, 0 replies; 5+ messages in thread
From: Tim X @ 2007-07-06 3:42 UTC (permalink / raw)
To: help-gnu-emacs
david@adboyd.com (J. David Boyd) writes:
> Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>
>> Am 05.07.2007 um 16:08 schrieb flebber:
>>
>>> So maybe I need to edit my bash profile to allow emacs access to the
>>> shell ???
>>
>> No, you can't login in *shell* buffer, and neither in *terminal*
>> buffer. The proper way from inside GNU Emacs would be to use tramp:
>>
>> C-x C-f /sudo::/boot/grub/grub.conf RET
>>
>> --
>> Greetings
>>
>> Pete
>>
>
>
> But you should be able to 'su'. I do that all the time in Mandriva.
>
> Dave
>
>
>
Depending on your X setup, you can have issues if you open a term, su to root
and then try to run emacs as emacs will try to run the X version. This can fail
if you don't have the appropriate xauth cookies (which control access to the X
display).
The simplest way to get around this is to run emacs with the -nw switch so that
it will run within the term rather than trying to run as an X client.
Of course, far simpler is just to use tramp.
Some setups hide this stuff and manage the .Xauthority cookies in a way that
makes all this 'invisible' to the end user. Some people even suggest using the
xhost command to grant access to your X display, but this is insecure,
especially if running on a multi-user system.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-06 3:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 14:08 Root Session - from Shell command flebber
2007-07-05 14:59 ` Peter Dyballa
2007-07-05 20:03 ` J. David Boyd
[not found] ` <mailman.3108.1183665858.32220.help-gnu-emacs@gnu.org>
2007-07-06 3:42 ` Tim X
2007-07-06 3:37 ` Tim X
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).