Programs unable to open display

Place to discuss Slackware
Post Reply
Doogee
administrator
administrator
Posts: 261
Joined: Fri Jan 10, 2003 1:40 am

Programs unable to open display

Post by Doogee » Fri Mar 26, 2004 4:29 am

Short and sweet, how can i resolve this problem? This happens for all users (all two of themI! Root and I)

Code: Select all


root@dans-computer:/etc# xcdroast
 
Gtk-WARNING **: cannot open display:
root@dans-computer:/etc# evolution
 
(evolution:32536): Gtk-WARNING **: cannot open display:

root@dans-computer:/etc# nautilus
 
(nautilus:32538): Gtk-WARNING **: cannot open display:
root@dans-computer:/etc#


shuiend
scripter
scripter
Posts: 91
Joined: Mon Apr 28, 2003 8:05 pm

Post by shuiend » Fri Mar 26, 2004 5:41 am

Do you have X11 running? That could be a problem if you dont have that running. Also if you are in kde and want to run them why dont you just goto the run choice in the menu and put it in there?

Doogee
administrator
administrator
Posts: 261
Joined: Fri Jan 10, 2003 1:40 am

Post by Doogee » Fri Mar 26, 2004 5:45 am

Yes, I use Gnome, hence I have X11 running, i am not as stupid as I look.


I need to run applications as root (xcdroast) so i can set them up. This is why i'm trying to run them from a command line.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Mar 26, 2004 6:51 am

Before you type the "su" command type "xhost +localhost" which will give all users on the local machine permission to run X apps on your X server. Or worse yet just "xhost +" which will allow anyone anywhere to display X apps on your X server. By default only the logged on user on the local machine has permission to display X apps on the local server. This will stay in effect until X is restarted or you take away permissions with "xhost -xxxxx".

Other distros set up the X authentication automatically when using the su command. I would have to dig through the scripts to see exactly how Red Hat does it, don't have time right now though. Probably using the "xauth" command in some incarnation.

Doogee
administrator
administrator
Posts: 261
Joined: Fri Jan 10, 2003 1:40 am

Post by Doogee » Fri Mar 26, 2004 7:02 am

Thankyou :wink:

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Tue Mar 30, 2004 8:16 am

i just have xhost +localhost in my .zshrc but ionly have one user other than root.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Tue Mar 30, 2004 12:55 pm

more info on this here, which i found useful after puzzling over this one for a while:

http://promote-opensource.org/forums/viewtopic.php?t=95

Post Reply