FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-10-2009, 01:05 PM
Harry P
 
Default howto make root emacs open in X

I'm running a recently installed lenny with default xfce desktop.

While working in the X session I often ssh to root@localhost for a
root shell and have one running as I work. I'd like to be able to
open emacs from that root shell and have the emacs instance open in
the X session instead of a inside the root shell in console mode as it
currently does.

I've had this setup in the past ... possibly not on a debian OS so I
know it can work with some minor setup.

Can anyone tell me what I need to do to get this to happen?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 01:19 PM
Tom Rauchenwald
 
Default howto make root emacs open in X

Harry P <reader@newsguy.com> writes:

> I'm running a recently installed lenny with default xfce desktop.
>
> While working in the X session I often ssh to root@localhost for a
> root shell and have one running as I work. I'd like to be able to
> open emacs from that root shell and have the emacs instance open in
> the X session instead of a inside the root shell in console mode as it
> currently does.

ssh -X root@localhost

> I've had this setup in the past ... possibly not on a debian OS so I
> know it can work with some minor setup.
>
> Can anyone tell me what I need to do to get this to happen?

I don't emacs as root, i use tramp... simply open a file you want to
open as root with /sudo:: or /su:: prefixed. You will be prompted for a
password, and can then edit the file from your user's emacs.

-t

--
They look at me funny; they think I twitch a lot. I'm not twitching. I'm
controlling my impulse to snag my 9mm Sig-Sauer out from my day-pack and
make a few strong points about the quality of undergraduate education in
Amerika. -- Olin Shivers


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 01:29 PM
Harry P
 
Default howto make root emacs open in X

Tom Rauchenwald <its.sec@gmx.net> writes:

> Harry P <reader@newsguy.com> writes:
>
>> I'm running a recently installed lenny with default xfce desktop.
>>
>> While working in the X session I often ssh to root@localhost for a
>> root shell and have one running as I work. I'd like to be able to
>> open emacs from that root shell and have the emacs instance open in
>> the X session instead of a inside the root shell in console mode as it
>> currently does.
>
> ssh -X root@localhost

Ahh nice... yes.

>> I've had this setup in the past ... possibly not on a debian OS so I
>> know it can work with some minor setup.
>>
>> Can anyone tell me what I need to do to get this to happen?
>
> I don't emacs as root, i use tramp... simply open a file you want to
> open as root with /sudo:: or /su:: prefixed. You will be prompted for a
> password, and can then edit the file from your user's emacs.

Very nice... and I've known about this for sometime and completely
forgot I knew it... hehe.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 01:36 PM
Axel Freyn
 
Default howto make root emacs open in X

Hi,
On Sat, Jan 10, 2009 at 03:19:03PM +0100, Tom Rauchenwald wrote:
> Harry P <reader@newsguy.com> writes:
>
> > I'm running a recently installed lenny with default xfce desktop.
> >
> > While working in the X session I often ssh to root@localhost for a
> > root shell and have one running as I work. I'd like to be able to
> > open emacs from that root shell and have the emacs instance open in
> > the X session instead of a inside the root shell in console mode as it
> > currently does.
>
> ssh -X root@localhost

Why do you use ssh to connect to the local machine? I would propose to
use "su" to switch to a root account. In order to allow root the access
to the X-Server, it is sufficient to set the environment-variables
DISPLAY=":0"
XAUTHORITY="/home/username/.Xauthority"
, "username" beeing the user who is running the X-session.


Axel


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 02:08 PM
Osamu Aoki
 
Default howto make root emacs open in X

On Sat, Jan 10, 2009 at 03:36:33PM +0100, Axel Freyn wrote:
> Hi,
> On Sat, Jan 10, 2009 at 03:19:03PM +0100, Tom Rauchenwald wrote:
> > Harry P <reader@newsguy.com> writes:
> >
> > > I'm running a recently installed lenny with default xfce desktop.
> > >
> > > While working in the X session I often ssh to root@localhost for a
> > > root shell and have one running as I work. I'd like to be able to
> > > open emacs from that root shell and have the emacs instance open in
> > > the X session instead of a inside the root shell in console mode as it
> > > currently does.
> >
> > ssh -X root@localhost
>
> Why do you use ssh to connect to the local machine? I would propose to
> use "su" to switch to a root account. In order to allow root the access
> to the X-Server, it is sufficient to set the environment-variables
> DISPLAY=":0"
> XAUTHORITY="/home/username/.Xauthority"
> , "username" beeing the user who is running the X-session.

I was thinking the same but as I checked my sid machine, I have
XAUTHORITY=/tmp/.gdm0DOSNU

Important here is new user's XAUTHORITY should be the same, I think.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 02:12 PM
Tzafrir Cohen
 
Default howto make root emacs open in X

On Sat, Jan 10, 2009 at 03:36:33PM +0100, Axel Freyn wrote:
> Hi,
> On Sat, Jan 10, 2009 at 03:19:03PM +0100, Tom Rauchenwald wrote:
> > Harry P <reader@newsguy.com> writes:
> >
> > > I'm running a recently installed lenny with default xfce desktop.
> > >
> > > While working in the X session I often ssh to root@localhost for a
> > > root shell and have one running as I work. I'd like to be able to
> > > open emacs from that root shell and have the emacs instance open in
> > > the X session instead of a inside the root shell in console mode as it
> > > currently does.
> >
> > ssh -X root@localhost
>
> Why do you use ssh to connect to the local machine? I would propose to
> use "su" to switch to a root account. In order to allow root the access
> to the X-Server, it is sufficient to set the environment-variables
> DISPLAY=":0"
> XAUTHORITY="/home/username/.Xauthority"
> , "username" beeing the user who is running the X-session.

In other words:

aptitude install sux

Menomonic: X as root sux

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 02:26 PM
Harry P
 
Default howto make root emacs open in X

Axel Freyn <axel-freyn@gmx.de> writes:

> Why do you use ssh to connect to the local machine? I would propose to

To make use of the ssh-agent and circumvent typing the password every
time I want a root shell.

I have in .inputrc

"M-s": "ssh root@localhost"

So by typing alt-s I get a shell cmd that when executed thru ssh-agent
launches an ssh terminal for root with no passwd interplay.

But even better I have xbindkeys set to launch an xterm with
"xterm -e ssh root@localhost"
ctrl+shift + 1
So pressing `Ctrl+shift + 1' invokes an instant root shell already
logged in and with full login environment.

I have no security worries for the desktop as this is a home machine.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 03:10 PM
Osamu Aoki
 
Default howto make root emacs open in X

On Sat, Jan 10, 2009 at 09:26:07AM -0600, Harry P wrote:
> Axel Freyn <axel-freyn@gmx.de> writes:
>
> > Why do you use ssh to connect to the local machine? I would propose to
>
> I have no security worries for the desktop as this is a home machine.

Point of Axel is use of SSH wastes CPU resource while gaining nothing.
His suggestion is more efficient. .. I think.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 03:51 PM
Axel Freyn
 
Default howto make root emacs open in X

On Sun, Jan 11, 2009 at 01:10:09AM +0900, Osamu Aoki wrote:
> On Sat, Jan 10, 2009 at 09:26:07AM -0600, Harry P wrote:
> > Axel Freyn <axel-freyn@gmx.de> writes:
> >
> > > Why do you use ssh to connect to the local machine? I would propose to
> >
> > I have no security worries for the desktop as this is a home machine.
>
> Point of Axel is use of SSH wastes CPU resource while gaining nothing.
> His suggestion is more efficient. .. I think.
>
Yes, exactly. And it is also possible without entering a password -
either by using sudo (as configured in Ubuntu), or by changing pam in
order to allow "su" without passwords.


HTH,

Axel



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-10-2009, 09:04 PM
Harry P
 
Default howto make root emacs open in X

Osamu Aoki <osamu@debian.org> writes:

> On Sat, Jan 10, 2009 at 09:26:07AM -0600, Harry P wrote:
>> Axel Freyn <axel-freyn@gmx.de> writes:
>>
>> > Why do you use ssh to connect to the local machine? I would propose to
>>
>> I have no security worries for the desktop as this is a home machine.
>
> Point of Axel is use of SSH wastes CPU resource while gaining nothing.
> His suggestion is more efficient. .. I think.

Setting the issue of whether you have to type out a passwd aside:

I'm not so sure about the efficiency angle. It appears to take no
config whatever for ssh -X to just work. Plus, it appears to be
portable with no extra vars to set or files to edit. It just works
from one machine to another, and it blends right in with my usage
practice established over many yrs and fairly ingrained by now.

The amount of resource waste has got to be nearly immeasurable. And
again, its a single user machine so I'm not stealing cpu cycles from
fellow users. I'm barely taxing the machine as it is.

All that said it is another way to get the results I wanted and
appears to be fairly easy to do... thanks to all of you.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 03:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org