[KLUG Members] Problem with launching applications

Joe Baker joebaker at dcresearch.com
Mon Jan 23 11:10:02 EST 2006


>
> Message: 4
> Date: Sun, 22 Jan 2006 06:38:18 -0500
> From: greenproc <greenproc at charter.net>
> Subject: Re: [KLUG Members] Problem with launching  applications
> To: "The main KLUG mailing list." <members at kalamazoolinux.org>
> Message-ID: <43D36EAA.2010007 at charter.net>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Anthony G. Mattas wrote:
>   
>> > Actually the problem lies in the fact that your using a sudo su shell.
>> > Just use su with the root password and that will work as well. sudo
>> > anything will break in x for the most part.
>>     
>
> I've been a lucky guy so far then, because I've never had problems with
> an x app in a 'sudo su' shell before.  It's good to be aware that there
> are *supposed* to be problems with this method <g>
>
>   
>> > 
>> > On Sat, 2006-01-21 at 15:02 -0500, Adam Tauno Williams wrote:
>> > 
>>     
>>>> >>>My problem is launching gui applications from a 'sudo su' root shell.
>>>> >>>Synaptic fails with:
>>>> >>>(synaptic:22507): Gtk-WARNING **: cannot open display:
>>>> >>>debaser:/home/user# synaptic
>>>>         
>
>   
>>>> >>>How would one begin troubleshooting this type of problem?  
>>>>         
>>> >>
>>> >>In switching user contexts you've either lost the value of the DISPLAY
>>> >>variable or the X authentication cookie, or both.  This isn't really
>>> >>meant to work (go to shell, su, run GUI app).
>>> >>
>>> >>
>>>       
>>>> >>>I am able to
>>>> >>>launch both synaptic and k3b by using the gnome gui -- they prompt me
>>>> >>>for my root password and everything works fine.  But not from within a
>>>> >>>'sudo su' root shell.
>>>>         
>>> >>
>>> >>Correct,  run "gnomesu", like I run "/opt/gnome/bin/gnomesu -c
>>> >>"/usr/sbin/pptp mail.morrison.iserv.net call morrison-vpn"" to startup
>>> >>my VPN.  The "gnomesu", and KDE must have an equivalent, makes sure all
>>> >>the required bits make it across the river.
>>>       
>
> I'll check out gnomesu and see how it works.  At least I know why the
> problem existed with my 'sudo su' shell.
>
> Thaks guys.
>>     
I've seen this behavior differ based on the distributions.  In
Mandrake/Mandriva I've never had a problem with either "su" or "su -" 
getting X apps to connect to the local display.  SuSE on the other hand
doesn't allow this.  One way I've gotten around this in the past was to
ssh as root to localhost with X forwarding enabled, then start the
applicaiton.  So something like this:

ssh -X root at localhost  yast
Would run the yast program as root displaying on the unpriviledged
user's desktop.

There might be security issues with running X apps of the unprivilidged
user being able to sniff keyboard and X traffic to the yast tool.

-Joe Baker



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.kalamazoolinux.org/pipermail/members/attachments/20060123/201ac9a8/attachment-0001.html


More information about the Members mailing list