LinuxQuestions.org
Visit Jeremy's Blog.
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-25-2006, 03:06 PM   #1
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 546

Rep: Reputation: 30
Talking X-gtk-display


I log in as normal user and when i launch a software that requires gtk i get this error:
gabriele@gabrix:~$ sudo synaptic
(synaptic:6885): Gtk-WARNING **: cannot open display:
Does anyone guess why?
 
Old 01-25-2006, 03:16 PM   #2
GL1800
Member
 
Registered: Jun 2005
Location: Lilburn, Ga
Distribution: FC5
Posts: 175

Rep: Reputation: 30
I never see that, however, could it be that user root has no permissions to use your X server? If so, in a terminal, as the user: xhost +localhost. This permits any 127.0.0.1 user your X server.
 
Old 01-26-2006, 09:24 PM   #3
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 546

Original Poster
Rep: Reputation: 30
Angry X-gtk-display

this is the result huuum !!!
gabriele@gabrix:/root$ xhost +localhost
xhost: unable to open display ""
 
Old 01-27-2006, 05:29 AM   #4
GL1800
Member
 
Registered: Jun 2005
Location: Lilburn, Ga
Distribution: FC5
Posts: 175

Rep: Reputation: 30
Yes, that's to be expected. Permissions to use the X server must be given by it's owner. This should be the user that started it, not root.
 
Old 01-27-2006, 10:44 AM   #5
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 64
Quote:
Originally Posted by gabsik
I log in as normal user and when i launch a software that requires gtk i get this error:
gabriele@gabrix:~$ sudo synaptic
(synaptic:6885): Gtk-WARNING **: cannot open display:
Does anyone guess why?
Not positive it will work for sudo but when using su to go to root in a console window I have this in my /root/.bashrc.

Code:
## allows me to run X program as root

export XAUTHORITY=/home/stephen/.Xauthority
So it could be worth a try you of course would change to your /home/user_name.
 
Old 01-28-2006, 08:34 AM   #6
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 546

Original Poster
Rep: Reputation: 30
Still as normal user:
gabriele@gabrix:~$ ethereal
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

(ethereal:5048): Gtk-WARNING **: cannot open display:

as su root:
gabriele@gabrix:~$ su -
Password:
gabrix:~# ethereal

(ethereal:5095): Gtk-WARNING **: cannot open display:

i followed what you advised to do still get an error
 
Old 01-28-2006, 08:36 AM   #7
GL1800
Member
 
Registered: Jun 2005
Location: Lilburn, Ga
Distribution: FC5
Posts: 175

Rep: Reputation: 30
Hmmm, I'm now at a loss to proceed, some of these other folks won't be, though.
 
Old 01-28-2006, 09:46 AM   #8
mohdshakir
Member
 
Registered: Jan 2006
Distribution: gentoo, slackware
Posts: 36

Rep: Reputation: 15
try this:

$ echo $DISPLAY
:0.0
$xhost +
$su -
Password:
# export DISPLAY=:0.0
# ethereal
 
Old 01-28-2006, 11:45 AM   #9
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 546

Original Poster
Rep: Reputation: 30
gabriele@gabrix:/root$ echo $DISPLAY

gabriele@gabrix:/root$ xhost +
xhost: unable to open display ""
gabriele@gabrix:/root$ su -
Password:
gabrix:~# export DISPLAY
gabrix:~# export DISPLAY=:0.0
gabrix:~# ethereal
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

(ethereal:9526): Gtk-WARNING **: cannot open display:
 
Old 01-28-2006, 05:55 PM   #10
mohdshakir
Member
 
Registered: Jan 2006
Distribution: gentoo, slackware
Posts: 36

Rep: Reputation: 15
How come that you dont get the :0.0 or anything similar when you first echo $DISPLAY? hmm..were u in X environment or not?

ok, try this:

$ echo $DISPLAY

$ export $DISPLAY=:0.0
$ xhost +
su -
Password:
# export DISPLAY=0.0
# ethereal
 
Old 02-01-2006, 01:53 PM   #11
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 546

Original Poster
Rep: Reputation: 30
I ended up formatting my machine and the news are that at the first boot it showed this message:
There was an error starting up the screensaver:

Failed to execute child process "xscreensaver" (No such file or directory)

Screensaver functionality will not work in this session.

Error activating XKB configuration.
Probably internal X server problem.

X server version data:
The XFree86 Project, Inc
40300001
You are using XFree 4.3.0.
There are known problems with complex XKB configurations.
Try using simpler configuration or taking more fresh version of XFree software.
If you report this situation as a bug, please include:
- The result of xprop -root | grep XKB
- The result of gconftool-2 -R /desktop/gnome/peripherals/keyboard/xkb ??? where this path comes from?
Anyway now i have
gabrix:~# echo $DISPLAY
:0.0
What does this all means??
 
  


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
Gtk-WARNING **: cannot open display gonzalo76 Slackware 18 12-12-2013 10:36 AM
gtk warning cannot open display bosewicht Linux - Newbie 2 03-10-2010 07:53 PM
Gtk-WARNING **: cannot open display elfoozo DamnSmallLinux 3 07-12-2007 09:41 PM
Gtk-WARNING **: cannot open display ocset Linux - Software 2 10-18-2004 03:18 PM
Gtk-WARNING **: cannot open display: Larsin Linux - Software 1 02-25-2004 10:47 AM


All times are GMT -5. The time now is 08:56 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration