LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-20-2006, 05:37 PM   #1
W0bbles
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware 10
Posts: 27

Rep: Reputation: 15
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.
 
Old 01-20-2006, 06:31 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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.
 
Old 03-30-2006, 02:35 AM   #3
nostromo
Member
 
Registered: Mar 2003
Distribution: Debian 8
Posts: 74

Rep: Reputation: 15
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.
 
Old 03-30-2006, 03:35 AM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,646

Rep: Reputation: 147Reputation: 147
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.
 
Old 03-30-2006, 03:39 AM   #5
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
If you get cannot open display errors try adding -display :0.0 to your command line
 
Old 03-30-2006, 12:11 PM   #6
blanks
Member
 
Registered: Jun 2004
Location: West Virginia
Distribution: Gentoo, Debian
Posts: 52

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't run gui (X) programs as root user nazdrowie Linux - General 25 12-02-2008 01:24 AM
how to run ifconfig as root without super user terminal GUIPenguin Linux - General 1 01-15-2005 10:06 AM
fluxbox user menu open terminal with root programs? darkleaf Linux - Software 2 10-14-2004 05:44 AM
I'm using Mandrake 9.1 and I'm a newbie, how do I install and run programs; Terminal? sirquixote Mandriva 5 10-20-2003 06:52 PM
can't run X programs as root under suse 8.2 Moses420ca Linux - Newbie 1 09-05-2003 08:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration