Gtk-WARNING **: cannot open display: :0.0
Hello
Im trying to access gparted, i get an error Quote:
thanks. |
not vnc related, it's probably becuase you're su'd to root without having run "xhost +localhost" as the owner of the vnc server itself.
|
thanks for the fast reply, so how can i fix this?
do i log on vnc as user, run "xhost +localhost" in terminal as user then run gparted as a root? |
yep, that's the one. There are other reasons for this, but this, especially when asked on a forum is 99% this.
|
BTW, vnc is awful in every way, I'd *VERY* strongly suggest a decent solution like nx
|
Quote:
I tried "export DISPLAY=:0.0" too, doesn't work either Quote:
Quote:
thank you for your time and suggestion. |
Quote:
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. |
Quote:
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. worked! now i can use my new 2tb :) |
One other option use:
gksu X_command |
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:
|
If you have antiX use sux (or install it) to open apps as root in X.
|
Quote:
|
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) |
Hi,
thanks for this hints. I had a problem to run any GUI application through gksu or kdesudo as well ( Gtk-WARNING **: cannot open display: ) /as from desktop as from terminal/ I solved it by adding: Quote:
/etc/sudoers |
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.
|
All times are GMT -5. The time now is 09:34 PM. |