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.
It seems like a lot of extra work. Have you tried simply:
Code:
$ su -m
# ./x-app-here
?
That does not work in Slackware.
What I usually do to get X apps to run on my display after su-ing to root:
Code:
echo $DISPLAY # you'll be needing this value 3 lines below
sudo -i # or "su -" on older Slackwares
xauth merge ~alien/.Xauthority # use your own username here instead of "alien"
export DISPLAY=:0.0 # use the value of DISPLAY you've seen 3 lines before
Eric -
Can you give a quick explanation (or link to some info) of what's different about Slackware's X configuration that prevents anomie's suggestion from working? It seems like I've been able to just su to root and run an X program on other distros, but not Slack.
Eric -
Can you give a quick explanation (or link to some info) of what's different about Slackware's X configuration that prevents anomie's suggestion from working? It seems like I've been able to just su to root and run an X program on other distros, but not Slack.
This is because Slackware uses the "su" program that is part of the "shadow" utilities. Other distros probably are using the "su" that comes with the coreutils package, and which knows about the "-m" option.
I never realized there were any differences in the low-level utilities. I assumed they were all GNU-based, and every distro used the same ones. I looked up the man page for the coreutils 'su', and sure enough, its -m flag prevents the environment variables from being reset when you change users. The manpage for 'su' on my Slackware box doesn't include that flag. I also didn't know that the same package (shadow) provides all of the useradd/groupadd/etc scripts. Thanks for the info, Eric.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.