Gtk-WARNING **: cannot open display
This time, when I tried to open gedit logged in as root (su)
Code:
bash-2.05b# gedit Quote:
|
Because you su'ed to root. When you tried to run the program as root it tried to open up another X server while you already had one on that display. Why do you have to run it as root?
-Hope this helps.:D |
As root, try:
/usr/X11R6/bin/xhost + This should enable you to connect to the X-display as root --Ian |
Quote:
|
How to make it permanent?
Quote:
One question: it only works for the current session. I do I make it stick across logins? TIA |
Just dun use it when you are root...
use shell> sudo gedit <filename> |
Quote:
Code:
xhost +si:localuser:root |
JMeter Install Failed (.:17510): Gtk-WARNING **: cannot open display:
Hi,
I have a problem installing JMeter on a linux Enterprise Linux Enterprise Linux Server release 5.4 (Carthage) Red Hat Enterprise Linux Server release 5.4 (Tikanga) java -version java version "1.4.2" gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-46) [root@<server> bin]# sh jmeter.sh (.:18532): Gtk-WARNING **: cannot open display: [root@msdvml62 bin]# Also I do not have xhost in /usr/X11R6/bin/ Can someone help ? |
Quote:
|
Hi Ian,
Thanks for your help, I got the following. [root@<server> bin]# /usr/X11R6/bin/xhost + -bash: /usr/X11R6/bin/xhost: No such file or directory [root@<server> bin]# Does that mean I am missing some patches? I am a QA lead actually and got this Linux VM from my administrator. Googling around seems to suggest that I don't have X System installed in the Linux. I am wondering if that is the reason why I got the error when running jmeter.sh ? Hopefully someone have encountered this before and fix it :) Cheers Peter |
Just try the command without the path - ie: xhost +local:
Oh, also that command needs to be run by the normal user who is logged into X, not by root. |
I'm using CentOS and I was getting the same error, except when I disabled the network (clicking on the icon in the top right corner and clicking 'disconnect'), it worked fine. But then when I re-enabled the network again, I get the same error.
|
Hi, I'm quite newby and I would like to know if you could tell me how to symlink .bashrc to .bash_login?
thank you |
try kdesu, or the gtk equivalent
I think this programs exist exalty for the reason to not have to mess around with xhost |
This problem also happens with me, when I am running KDE.
sudo somegtkapp gives same error. Although this doesn't happen when gksudo somegtkapp or kdesudo somegtkapp or I start GNOME or fluxbox/openbox/lxsession etc. |
All times are GMT -5. The time now is 04:15 PM. |