Discussion:
Gtk-WARNING **: cannot open display
(too old to reply)
Dawn
2004-01-06 00:22:22 UTC
Permalink
Hi,

I have installed SUSE 9.0 and I am still trying to configure it. I am
logged in as a regular user. I want to change a file as root using a
GUI editor like gedit instead of using vi. In RedHat when I type a GUI
application on the command line, the GUI comes up. On SUSE, I am
getting the following error message "(gedit:4827): Gtk-WARNING **:
cannot open display:". I have been searching the enternet and have yet
to find a solution. Can anyone help?

The next program I have is have more that one GUI desktop open at one
time. If you was to hit Ctrl + Alt + F8 I would get another GUI login
window where I can login as a different user. This does not work.

Any help would be appreciated.

Thanks
Dawn
R.F. Pels
2004-01-06 01:16:11 UTC
Permalink
Post by Dawn
cannot open display:". I have been searching the enternet and have yet
xhost +localhost
--
Ruurd
.o.
..o
ooo
Jerry Smiley
2004-01-06 01:17:30 UTC
Permalink
Post by Dawn
Hi,
I have installed SUSE 9.0 and I am still trying to configure it. I am
logged in as a regular user. I want to change a file as root using a
GUI editor like gedit instead of using vi. In RedHat when I type a GUI
application on the command line, the GUI comes up. On SUSE, I am
cannot open display:". I have been searching the enternet and have yet
to find a solution. Can anyone help?
Try the following....

type xhost localhost

It should say that localhost has been added to access control list.

Now type su
log in as root and try the GUI app now...
Dawn
2004-01-06 02:17:20 UTC
Permalink
Post by Jerry Smiley
Post by Dawn
Hi,
I have installed SUSE 9.0 and I am still trying to configure it. I am
logged in as a regular user. I want to change a file as root using a
GUI editor like gedit instead of using vi. In RedHat when I type a GUI
application on the command line, the GUI comes up. On SUSE, I am
cannot open display:". I have been searching the enternet and have yet
to find a solution. Can anyone help?
Try the following....
type xhost localhost
It should say that localhost has been added to access control list.
Now type su
log in as root and try the GUI app now...
Sorry, I should have mention some of the methods I have already tryed.
I did type xhost localhost and recieved the message about it being
added to access control list. Howevery when I did 'su -' I am still
getting the same error message. I ran the same command as root and
recieved the error 'xhost: unable to open display ""'. Note I did and
su - to become root when I ran this command.

---------------------------------------------------------------

[139]/home/dawn
dawn$ xhost localhost
localhost being added to access control list

[140]/home/dawn
dawn$ echo $DISPLAY
:0

[141]/home/dawn
dawn$ su -
Password:

[809]/root
root# gedit

(gedit:7043): Gtk-WARNING **: cannot open display:

----------------------------------------------------------------------

I have no Idea what to do.

Thanks
Dawn
Kevin Nathan
2004-01-06 01:26:40 UTC
Permalink
On Tue, 06 Jan 2004 00:22:22 GMT
am logged in as a regular user. I want to change a file as root
using a GUI editor like gedit instead of using vi.
Don't use "su", instead use "sux".
The next program I have is have more that one GUI desktop open at
one time. If you was to hit Ctrl + Alt + F8 I would get another GUI
login window where I can login as a different user. This does not
work.
Ctrl-Alt-F2
(login)
startx -- :1
(X is now on Ctrl-Alt-F8 as well as original Ctrl-Alt-F7

Want another one?

Ctrl-Alt-F3
(login)
startx -- :2
(X on Ctrl-Alt-F9, etc. . .)

IOW, vc F1 - F6 will display X on F8 - F12.
--
Kevin Nathan (Montana, USA)
Open standards. Open source. Open minds.
The command line is the front line.

Linux 2.4.20-4GB-athlon
6:22pm up 10 days 10:30, 6 users, load average: 0.00, 0.01, 0.03
Dawn
2004-01-06 20:29:16 UTC
Permalink
Post by Kevin Nathan
On Tue, 06 Jan 2004 00:22:22 GMT
am logged in as a regular user. I want to change a file as root
using a GUI editor like gedit instead of using vi.
Don't use "su", instead use "sux".
Thanks that did it.
Post by Kevin Nathan
The next program I have is have more that one GUI desktop open at
one time. If you was to hit Ctrl + Alt + F8 I would get another GUI
login window where I can login as a different user. This does not
work.
Ctrl-Alt-F2
(login)
startx -- :1
(X is now on Ctrl-Alt-F8 as well as original Ctrl-Alt-F7
Want another one?
Ctrl-Alt-F3
(login)
startx -- :2
(X on Ctrl-Alt-F9, etc. . .)
IOW, vc F1 - F6 will display X on F8 - F12.
Continue reading on narkive:
Loading...