Running X programs as root.
Is there anything wrong with doing the following to run X programs as root:
xauth -f /home/[user]/.Xauthority extract - :0 | xauth merge - export DISPLAY=:0 Regards, Greg |
It seems like a lot of extra work. Have you tried simply:
Code:
$ su -m |
Quote:
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 |
Thanks for your help everyone.
|
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. |
Erm, what about kdesu (or gksu in GNOME)?
|
Quote:
Eric |
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.
Justin |
All times are GMT -5. The time now is 12:05 AM. |