LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 02-10-2004, 08:32 AM   #1
nyk
Member
 
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112

Rep: Reputation: 15
Can't start program using X in root console!


When starting a program that uses X as user from the console everything works perfectly. But when I become root with su and then try to strart the same program, it fails with this message:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: :0.0

I am using Suse 9.0 AMD64 with a nvidia card and driver. This problem appears for example when I want to use the graphical installer of crossover-office, to install into another directory than the home.
Thank for any help!
 
Old 02-10-2004, 08:58 AM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 69
Re: Can't start program using X in root console!

Quote:
Originally posted by nyk
When starting a program that uses X as user from the console everything works perfectly. But when I become root with su and then try to strart the same program, it fails with this message:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: :0.0

I am using Suse 9.0 AMD64 with a nvidia card and driver. This problem appears for example when I want to use the graphical installer of crossover-office, to install into another directory than the home.
Thank for any help!
Try in the console window either export Display=0.0 or export Display 0.0 I think is is the first one that is the correct syntax
 
Old 02-10-2004, 10:08 AM   #3
nyk
Member
 
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112

Original Poster
Rep: Reputation: 15
thanks, but there's still the same error message....
 
Old 02-10-2004, 10:16 AM   #4
doralsoral
Member
 
Registered: Aug 2003
Location: raleigh
Distribution: Gentoo 2005.1 x86_64
Posts: 931

Rep: Reputation: 31
your problem is that your loggin in the X server as user so root cant access it. im not sure if theres a way around it. maybe xnest although im not sure exactly what it does because ive never used it
 
Old 02-10-2004, 10:19 AM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
You need to use the xhost command to allow root access to X. Check out man xhost for the fine details on how to do it.
 
Old 02-10-2004, 10:39 AM   #6
nyk
Member
 
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112

Original Poster
Rep: Reputation: 15
cool, thanks verry much!

just had to type

xhost local:root

as user... and now it seems to work!!

but it was a stange problem... maybe caused by trying to install some different graphic cards, like ATI and nvidia..
 
Old 02-10-2004, 12:23 PM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Actually, I don't believe it is a strange problem. I think this is X working as designed. I know I had to add a line like that to my .xinitrc file so I could run graphical apps as root if I needed to. And it certainly doesn't have anything to do with your graphics card.

Glad you got it running.
 
Old 02-10-2004, 07:46 PM   #8
nyk
Member
 
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112

Original Poster
Rep: Reputation: 15
So maybe it's configured like this in suse (and other distributions), but I was used to Redhat where this is already set in some script probably...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
program console output using C xrado Programming 5 04-04-2005 03:48 PM
Can only start program from console, link doesn't work. longblock454 Linux - Newbie 12 02-02-2005 08:18 PM
using console after launching a program off it Lechium Linux - Newbie 3 08-07-2004 03:37 AM
Start program at boot as non-root ImpactDNI Linux - Newbie 4 07-18-2004 01:44 PM
Getting a program to start with root privileges when a user logs in. joeking Linux - Security 4 10-24-2003 12:47 PM


All times are GMT -5. The time now is 10:56 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration