Ever since I switched to slackware (BTW I'm a slack die hard now) I've been having issues w/ being able to start some apps as root. Let me give you a basic layout of my system first.
OS: Slackware 10.1
GUI: XFCE 4.2.1 (compiled from src not the preinstalled binaries from the slack dist cd (as they do not include everything)
Now I start XFCE from the "/usr/local/bin/startxfce" cmd as a user (in my case thats "xaero")
xaero@biggeek #: /usr/local/bin/startxfce &
XFCE will start normally and attach itself to *:0.0 as expected.
Once XFCE starts I would start an "xterm" session that looked like this
if I tried to start a user space app it would start and wait till I exited the app and return the prompt to me. On some occasions I would need to start an app w/ root privileges it would fail and give me an error msg such as this:
root@biggeek: ~# Terminal
(Terminal:9416): Gtk-WARNING **: cannont open display:
to fix this I did the following
1. I created a file called xhost1 and put it in /home/xaero/bin
2 I added this to my /root/.profile
the contents of /home/xaero/bin/xhost1 is:
So now all I need to do is su - to root and run the cmd I want and it will work.
Hopefully this will solve anyone's issues w/ xhost issues in the future