SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I used to be able to do this no prob... now I can't and I have no idea what changed. I'm on a fresh 10.2 install. What I would like to be able to do is su to another user and then open a program as that user. For instance firefox. However when I do this I get.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
(firefox-bin:5392): Gtk-WARNING **: cannot open display:
Originally posted by uopjohnson I used to be able to do this no prob... now I can't and I have no idea what changed. I'm on a fresh 10.2 install. What I would like to be able to do is su to another user and then open a program as that user. For instance firefox. However when I do this I get.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
(firefox-bin:5392): Gtk-WARNING **: cannot open display:
any suggestions?
I guess that either you start your xserver with "-auth" or you use "KDM/XDM/GDM/etc".
You can use "xhost" but it is insecure.
The proper way is to use xauth authentication.
you run "xauth list" as the user that is running the xserver (the first user)
you will get some authentication keys
copy the one that is starting as "hostname/unix:0"
then su to the user you want to start the program as (the second user)
(dont run "su -" just plain "su")
then run "xauth add KEY_LINE" where KEY_LINE is the key you copied from the other user.
KEY_LINE is the whole line (it is something like this "hostname/unix:0 MIT-MAGIC-COOKIE-1 big_key")
you copy all this thing.
then every X application should work for the other user.
if you run "su -" then you get a login shell and it has the enviroment the user would have if he logged in.
then all the procedure is the same except for an addition. you should set the DISPLAY enviroment variable
(for example in a bash shell "export DISPLAY=":.0" )
I am having the same problem with using su to run a program from the command line for another user. The su command was working eariler on when I was configuring my system after installing Slackware 10.2. I noticed recently that it was not working anymore. I think it might be caused by the [slackware-security] X.Org pixmap overflow (SSA:2005-269-02) patch that was released by Pat. I haven't been able to test my theory yet, but will later today hopefully, if I have time, and I will post the results.
For me and probably others, not everyone uses KDE. I personally use Window Maker on my Slack Box. So a real solution to the problem should be found rather than putting a band aide on it.
Originally posted by jayptr For me and probably others, not everyone uses KDE. I personally use Window Maker on my Slack Box. So a real solution to the problem should be found rather than putting a band aide on it.
jayptr didn't the method with xauth i described work for you ?
i use slackware-current, so i have the updated X packages and i also use Windowmaker but it works ok for me.
Also, kdesu works in windowmaker too as every other KDE program. you don't have to use kde to use Kwrite for instance.
And if you don't like it there are many other "graphical su" programs
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.