sudo + X problem? (was:Re: dapper settings has miscellaneous
Display)
Achim Bohnet
ach at mpe.mpg.de
Thu Feb 16 23:46:44 GMT 2006
On Thursday 16 February 2006 08:46, Simon Edwards wrote:
> Hi,
Hi,
form earlier in the thread:
>> What does "sudo echo $DISPLAY" give?
The $DISPLAY is expanded by user shell
_before_ sudo is executed. I would suggest comparing output of
printenv | 'DISPLAY|XAUTHORITY|HOME'
sudo printenv | 'DISPLAY|XAUTHORITY|HOME'
Here the output is identical and displayconfig
starts up fine.
And for you Bernt?
>
> Just some more info that I've found by using strace.
>
> Running 'displayconfig' and 'sudo displayconfg' on breezy both
> use /home/sbe/.Xauthority. But doing 'displayconfig' on dapper
> uses /home/sbe/.Xauthority while 'sudo displayconfg' tries to use
> '/root/.Xauthority'!
Hmm, then $HOME gets maybe redefined? That's one way how it can
go wrong (see man xauth. Section FILES and ENVIRONMENT and -f)
Achim
>
> My python code uses the C function XOpenDisplay() to open the X display.
> (DISPLAY=:0.0)
>
> cheers,
--
To me vi is Zen. To use vi is to practice zen. Every command is
a koan. Profound to the user, unintelligible to the uninitiated.
You discover truth everytime you use it.
-- reddy at lion.austin.ibm.com
More information about the kubuntu-devel
mailing list