LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't run paticular programs as root terminal -- Slack 10.2 (https://www.linuxquestions.org/questions/linux-software-2/cant-run-paticular-programs-as-root-terminal-slack-10-2-a-405944/)

W0bbles 01-20-2006 05:37 PM

Can't run paticular programs as root terminal -- Slack 10.2
 
When I'm on my personal account (/home/user), I run my terminal client and run some programs from there -- they work fine. But when I log in as root in the terminal while still in my windows manager, I can't run paticular programs that were installed on the initial setup. For example, I can't run KATE, java, kedit and a couple others I can't think of at the moment, as root in terminal -- but while still in my personal account. THis is true for me when logged in on my personal account when using KDE or fluxbox. But when I log into my windows manager as root, they work just fine. I would search for this and find the answer myself, but I don't know what to call this.

gilead 01-20-2006 06:31 PM

I assume you're using `su` to login as root, but you don't say what the error is. Are you getting command not found errors or something like 'Xlib: connection to ":0.0" refused by server'? For the first one, your path isn't the same when you su - you may have to type in the full command (e.g. /usr/local/jdk/bin/java).

For the second one, you don't have permission, even as root, to use your user account's X display. Try running the following after you su to root (substitute your username):

Code:

/usr/X11R6/bin/xauth merge ~username/.Xauthority
I sometimes end up with the ownership on ~username/.Xauthority changed to root when I do this - so check it after you run the merge.

nostromo 03-30-2006 02:35 AM

Hi there, I have the same problem and I couldn't solve it
with:

Quote:

/usr/X11R6/bin/xauth merge ~username/.Xauthority
When I try to run apps from konsole as root I get this
error:

Quote:

[root@darkstar]:# airfart
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

(airfart:9019): Gtk-WARNING **: cannot open display:
I also tried some other techniques that I found here in LQ,
that didn't help too.

Please help me.

titopoquito 03-30-2006 03:35 AM

Try to start it with giving full path. If I su to root and do kate it is not in my path, when typing /opt/kde/bin/kate it starts without a problem.

dive 03-30-2006 03:39 AM

If you get cannot open display errors try adding -display :0.0 to your command line

blanks 03-30-2006 12:11 PM

Try (as non-root):
$> xhost+
Then:
$> su -
$> export DISPLAY=:0.0
$> kate


All times are GMT -5. The time now is 06:40 AM.