LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-25-2006, 07:03 PM   #1
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
Gtk-WARNING **: cannot open display:


Ive read and read the forums and tried and tried other suggestions but none of them worked for me. I am trying to run gtkpod as root(nevermind why, I just need to) but I get the error: Gtk-WARNING **: cannot open display:

I also get this error if I try to run any GUI application as root from the terminal.

I had this problem before and the xhost + command fixed it, but that fix is no longer working. I used to be able to run GUI apps as root but I did something and ended up taking the "video" group away from root. I added it back in and its still not working. Can anyone help? Below are some commands I've tried with the results.

Ive also tried logging in as root into the Xwindow(KDE) and got the same errors.



root@hostname:~# groups
root bin daemon sys adm disk wheel floppy audio video
root@hostname:~#



root@hostname:~# gtkpod

(gtkpod:12996): Gtk-WARNING **: cannot open display


root@hostname:~# slapt-get -search gtkpod
gtkpod-0.99.4-i486-1ahl [inst=yes]: gtkpod (GUI for Apple's iPod)
libgpod-0.3.2-i486-1ahl [inst=yes]: libgpod (Library for Apple's iPod)
python-gpod-0.3.2-i486-1cl [inst=yes]: python-gpod 0.3.2


root@hostname:~# /usr/X11R6/bin/xhost +
/usr/X11R6/bin/xhost: unable to open display ""
root@hostname:~#


username@hostname:/mnt$ xhost +
access control disabled, clients can connect from any host

root@hostname:~# gtkpod

(gtkpod:13041): Gtk-WARNING **: cannot open display:

root@hostname:~# xhost +
xhost: unable to open display ""


username@hostname:/mnt$ xhost +localhost
localhost being added to access control list

root@hostname:~# gtkpod

(gtkpod:13089): Gtk-WARNING **: cannot open display:


username@hostname:/mnt$ xhost +localhost
root@username:~# export DISPLAY=localhost:0.0
root@username:~# gtkpod

(gtkpod:13107): Gtk-WARNING **: cannot open display:




each time I did a xhost + and the command failed I went back as username and did a xhost -



What the F is wrong? Any other suggestions?
 
Old 08-25-2006, 07:42 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104
You forgot to set the DISPLAY variable. It is empty and your app does not know where to display.

As an alternative to the insecure "host +" command try this:

Code:
echo $DISPLAY                  # you'll be needing this value 3 lines below
sudo -i                        # or "su -" on older Slackwares
xauth merge ~alien/.Xauthority # use your own username here instead of "alien"
export DISPLAY=:0.0            # use the value of DISPLAY you've seen 3 lines before
Eric
 
Old 08-25-2006, 07:50 PM   #3
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Original Poster
Rep: Reputation: 44
Awesome! Thanks.. That did the trick except now I'm getting the "SEGMENTATION ERRORS" when the gtkpod reads the ipod...


But now I can run GUI commands from root.. so thanks alot for helping me with that!
 
Old 05-05-2008, 06:32 PM   #4
caduqued
Member
 
Registered: Apr 2008
Location: Coventry, United Kingdom
Distribution: Slackware64, Slackware64 13.37, linuxslackware
Posts: 83

Rep: Reputation: 25
Thanks a lot

Quote:
Originally Posted by Alien Bob View Post
You forgot to set the DISPLAY variable. It is empty and your app does not know where to display.

As an alternative to the insecure "host +" command try this:

Code:
echo $DISPLAY                  # you'll be needing this value 3 lines below
sudo -i                        # or "su -" on older Slackwares
xauth merge ~alien/.Xauthority # use your own username here instead of "alien"
export DISPLAY=:0.0            # use the value of DISPLAY you've seen 3 lines before
Eric
Hi Eric,

I've been using some of your scripts and your slackbuild page as reference point to introduce myself in Slackware world.

I had been obtaining this problem also, and with your post it was totally solved, Thanks a lot (again ). I have just one question, is it probably some type of intrusion that change this (not be able to run any xserver app as root) in my slack? I was wondering this because, I had my slackware functioning perfectly well, and just from one day to another I begun to get this problem. I just was a little worried by what produced this behaviour in my slack. (???)

Something else, I have slackware 12, not and old one, but the command sudo doesn't function if I don't "feed" the sudoers file; however, a lot of people cite use of sudoers in slackware without problem, I don't understand what I am missing (???). In particular, your sudo line didn't help me, I had to login as root, put the .Xauthority, and then logout again. Did it I well?

Thanks, bye.

caduqued

Last edited by caduqued; 05-05-2008 at 06:34 PM.
 
Old 05-05-2008, 09:22 PM   #5
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
`su -` will get you to login to a full root shell. Try that instead.
 
Old 01-03-2013, 03:11 AM   #6
nitrofurano
LQ Newbie
 
Registered: Jan 2013
Posts: 5

Rep: Reputation: Disabled
but this solution is temporary... :S

Quote:
Originally Posted by Alien Bob View Post
You forgot to set the DISPLAY variable. It is empty and your app does not know where to display.

As an alternative to the insecure "host +" command try this:

Code:
echo $DISPLAY                  # you'll be needing this value 3 lines below
sudo -i                        # or "su -" on older Slackwares
xauth merge ~alien/.Xauthority # use your own username here instead of "alien"
export DISPLAY=:0.0            # use the value of DISPLAY you've seen 3 lines before
Eric
hi Eric,
this solution works fine when temporary, but it doesn't works after then next login - how can i have it working after a boot, just like i have not such problems after a fresh install? (i'm using Crunchbang-Debian distro, upgraded to Wheezy)
thanks!
 
Old 01-03-2013, 03:15 AM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104
Quote:
Originally Posted by nitrofurano View Post
hi Eric,
this solution works fine when temporary, but it doesn't works after then next login - how can i have it working after a boot, just like i have not such problems after a fresh install? (i'm using Crunchbang-Debian distro, upgraded to Wheezy)
thanks!
First: this is a 5-year old thread and you should not dig it up from the grave, it is considered rude.
Second: this is a Slackware forum.

Please open your own new thread in a Debian forum here on LQ.

Eric
 
Old 01-04-2013, 05:54 PM   #8
nitrofurano
LQ Newbie
 
Registered: Jan 2013
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by Alien Bob View Post
First: this is a 5-year old thread and you should not dig it up from the grave, it is considered rude.
Second: this is a Slackware forum.

Please open your own new thread in a Debian forum here on LQ.

Eric
i really can't understand it: why is it considered rude, if the problem may still exist on most of people (like me), this thread was actually started (and there was no meaning for bloating this forum with this same question), and the answer provided here where not really useful yet? isn't this a valid reason for keeping this thread "alive"?

(thanks saying this honestly in this way, Eric: for understanding why "digging old threads from the grave" is that rude, i should understand why (and i really can't, sorry...), and not taking it as rude just because someone is saying, isn't it? so, do you think i should believe on what everybody says without a valid explanation, even those people that sells snake oil?)

btw, i'm not only a Debian user, i also use Puppy and TinyCore a lot, even Slax (based on Slackware), so i though this very concerning question is actually related to all GNU/Linux distros - and after searching from google/duckduckgo/etc..., i really can't find further started threads like this one!

cheers and thanks for the feedback,
Paulo
 
  


Reply

Tags
display


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: lijomali Fedora 6 11-10-2005 06:43 PM
Gtk-WARNING **: cannot open display: Larsin Linux - Software 1 02-25-2004 10:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:35 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