Oops! (Re: Repair Grub Files?)

Derek Broughton news at pointerstop.ca
Sun Jun 3 14:50:09 UTC 2007


Peter Garrett wrote:

> On Fri, 1 Jun 2007 11:38:20 +1000
> erik at dd.nec.com.au (Erik Christiansen) wrote:
> 
>> On Wed, May 30, 2007 at 10:55:47AM +1000, Peter Garrett wrote:
>> > Perhaps someone can explain how running an X app as root
>> > ( sudo su) works in this situation - normally I would expect the X
>> > server
>> > to refuse connections from root in another user's X session  ( ??? )
>> 
>> What does "xhost" display in that situation?
> 
> On Feisty 7.04, in GNOME logged in as my user:
> 
> peter at prospero:~ $ sudo -i
> root at prospero:~# xhost
> access control enabled, only authorized clients can connect

I get the same using "xhost" or "sudo xhost" but "sudo -i" and "sudo su"
don't work:

 derek at othello:~$ xhost
 access control enabled, only authorized clients can connect
 derek at othello:~$ sudo xhost
 access control enabled, only authorized clients can connect
 derek at othello:~$ sudo -i
 root at othello:~# xhost
 Xlib: connection to ":0.0" refused by server
 Xlib: No protocol specified
 xhost:  unable to open display ":0"
 root at othello:~# sudo su
 root at othello:~# xhost
 Xlib: connection to ":0.0" refused by server
 ...

> This is the same whether "sudo su" or "sudo -i" is used to get a root
> shell. No hosts have been added to the access list.
> 
> Derek indicated that he found he could not start "kate" from a root prompt
> - I wonder if this depends on KDE/GNOME ? Or alternatively, whether he was
> using a "true" root shell from "su" , having set a root password?

No root pw.  Using "sudo su" or "sudo -i":
 root at othello:~# kate
 Xlib: connection to ":0.0" refused by server
"sudo kate" works.
 
> I'm pretty sure that on Dapper any attempt to start a GUI app from a root
> shell, while in a user's session, was refused... and that would be my
> expectation, so I find this puzzling.

Me too, though I'm pretty sure under warty or hoary I couldn't use "sudo
kate" either.
-- 
derek





More information about the ubuntu-users mailing list