[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't start X apps from su



Andrej Prsa wrote:

> I have a very-difficult-to-reproduce-but-pertaining problem with
> accessing X applications (such as nedit) when gaining access via
> su from some other user's X session. If I log in as root to X,
> such problem never occurs. But as I don't want to take the name
> of root in vain, I got used to using su. *Usually* things work,
> but suddenly, after an indefinite amount of time, it just doesn't

The fact it doesn't work after a while is odd, not sure what's going on there.  
What I have done is this:

Export display variable in root's .profile:

    export DISPLAY=:0

Link root's Xauthority file to my own:

    rm ~root/.Xauthority
    ln -s ~fraser/.Xauthority ~root/.Xauthority

I don't know the security implications of what I did so if you have a 
multi-user system I'd suggest figuring that out first.  A better alternative 
may be to use gnome-sudo instead of su, like this:

    gnome-sudo gnome-apt

Fraser



Reply to: