[SOLVED] Gtk-WARNING **: cannot open display: :0.0
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
yep, that's the one. There are other reasons for this, but this, especially when asked on a forum is 99% this.
I actually tried the xhost solution before posting but didn't work , i just wanted to confirm that im doing it correctly.
I tried "export DISPLAY=:0.0" too, doesn't work either
Quote:
user@server:~$ xhost +localhost
localhost being added to access control list
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0x6
Serial number of failed request: 9
Current serial number in output stream: 13
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0x6
Serial number of failed request: 10
Current serial number in output stream: 13
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0x6
Serial number of failed request: 11
Current serial number in output stream: 13
Quote:
user@server:~$ su -
Password:
server:~# gparted
(gpartedbin:3711): Gtk-WARNING **: cannot open display:
I actually tried the xhost solution before posting but didn't work , i just wanted to confirm that im doing it correctly.
I tried "export DISPLAY=:0.0" too, doesn't work either
Still error.
thank you for your time and suggestion.
The problem is caused by user 'you' owning the display and then user 'root' wanting to get away with it. Yes, 'root' is the supreme God of your system and is omni potent. But not for X11.
The best thing to do is:
- kill the window system
- log off the terminal
- log on as root
- startx
- do your thing
You will HAVE to start X11 as user 'root'. Period.
The problem is caused by user 'you' owning the display and then user 'root' wanting to get away with it. Yes, 'root' is the supreme God of your system and is omni potent. But not for X11.
The best thing to do is:
- kill the window system
- log off the terminal
- log on as root
- startx
- do your thing
You will HAVE to start X11 as user 'root'. Period.
hey thanks, im a newbie couldn't understand your post fully
but this is what i did lol:
went root and created a new vncserver channel (:2), logged off user (:1), and logged to vncserver :2 as a root and ran gparted lol.
I hope five months isn't too long a time to revisit this post after. I'm not using a vnc, whatever that is, but I have had the same problem in my distro (antiX, with heavy modifications), when trying to sudo synaptic and at least one other thing that required root privileges. After some googling, I tried this command:
Quote:
su - [or sudo]
xauth merge [your user account name]/.Xauthority
Then I rebooted, logged back into my account, and found that I can now sudo synaptic. As fruttenboel stated, the problem is that when you're logged in with your user account, the X display is owned by you, so root is not allowed to perform an X command. By using the above command, I copied root's ownership of the X display to my user account. I worried that this would make my user account unable to run any X commands without sudoing (since root now owns X), but apparently not.
Last edited by newbiesforever; 04-03-2012 at 09:42 PM.
Distribution: antiX using herbstluftwm, fluxbox, IceWM and jwm.
Posts: 628
Rep:
Because sudo is not set up as it is in other distros. su for root access for cli apps annd sux for root access for gui apps works well.
(I think using sudo for gui apps aoemtimes has the issue you have, you should use gksudo)
Thanks for this feed. I have just installed Deb testing KDE and found this prob using my usual sudo gparted in a konsole, thanks to trying a few things from this feed I now know that gksu gparted from konsole works fine, and doesn't ask for a password like sudo does, no idea why. Thankyou again davetesc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.