[arch-general] Which security setting in Arch prevents forwarding X apps when su root?

Tim Gelter tgelter at gurulabs.com
Thu Oct 8 08:29:53 EDT 2009


Damjan Georgievski wrote:
>> Which setting in Arch prevents forwarding apps when you ssh -X in an Arch box,
>> su and then try to start a kde app, etc.? X forwarding works just fine as a
>> user, but when trying it su'ed to root, I get the following error:
>>
>> [23:29 archangel:/etc] # kwrite
>> X11 connection rejected because of wrong authentication.
>> kwrite: cannot connect to X server localhost:10.0
> 
> In order for X apps to connect to the X server they need to provide a
> security cookie. The standard path for the cookie is ~/.Xauthority .
> ssh -X does append the cookie to this file  so that's why you can
> start X apps when logged in as user. But when you "su",  ~/.Xauthority
> is now another file (/root/.Xauthority) and that one doesn't have the
> cookie.
> 
> As Eric said, kdesu or gsu are sollution ... or you could copy the
> Xauthority file
> 
>> kdm config? X config? Any pointers/links would be appreciated.
> 
> none
> 
> 
If I understand correctly, this should happen automatically if you use
the following:
aur/sux 1.0.1_5-1 (38)
    A wrapper around su which will transfer your X credentials
-Tim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20091008/47f3672f/attachment-0001.bin>


More information about the arch-general mailing list