"Gtk-WARNING cannot open display" from ssh

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers "Gtk-WARNING cannot open display" from ssh
# 1  
Old 10-29-2009
"Gtk-WARNING cannot open display" from ssh

I am trying to do something on another computer through ssh and I keep getting this:
"(gedit:6169): Gtk-WARNING **: cannot open display:"

I have googled the interweb and this forum and found many posts but nothing seems to work. I have freshly installed Ubuntu 8.10 with updates on the machine and I have a KVM connected but, the screen just flashes on and off, mostly off, so it is unusable that way (Nvidia GTX 260, Asus M4A79T Deluxe). I have had it running perfectly under Ubuntu 9.04 without the blinking but am trying to do folding@home gpu2 under wine and was unsuccessful with 9.04 therefore I'm going to try 8.10, as the instructions use, but am doing it from my Mac Pro with ssh and getting that warning.

It does work on another computer (I get past this point) though there are other issues with that one.

Last edited by pludi; 10-29-2009 at 07:22 AM..
# 2  
Old 10-29-2009
Let us think simple to begin:
You are connected to another box through ssh...
The message like that one occurs when either the variable DISPLAY isnt set or
your box refuses the connection for some obscure reason (could be not allowed by xhosts, or firewall filtering...)
About ssh now
How did you connect with ssh? ssh -X ?
And the remote box ... what is in its ssh_config or sshd_config files? (Does it allow X?)
# 3  
Old 10-29-2009
This is what is in ssh_config I have set "ForwardX11" to yes and restarted ssh but get the same thing. Do I need to remove the # to get it to work?

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1

This is what is in sshd_config, it doesn't seem to have anything related to xwindows.

Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile     %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

Thank you in advance! Smilie
# 4  
Old 10-29-2009
Lets start from beginning:
What does

Give you?
If nothing
do you know your local IP?
If so give it to the DISPLAY variable:
export DISPLAY=<your IP>:0.0

What shell are you using ? (syntax given for ksh...)

---------- Post updated at 18:55 ---------- Previous update was at 18:50 ----------

This is what I have set on my host: (/etc/ssh/sshd_config)

AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
X11UseLocalhost yes


# 5  
Old 10-29-2009
cc@amd8:~$ echo $DISPLAY:192.168.0

and this is sshd_config
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

AllowTcpForwarding yes
X11Forwarding yes
# X11DisplayOffset 10
X11UseLocalhost yes   
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes

and still
cc@amd8:~$ gedit
(gedit:6383): Gtk-WARNING **: cannot open display: :192.168.0

I'm using bash
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies

3. UNIX for Dummies Questions & Answers

What is the significance of sh -s in ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh?

Please can you help me understand the significance of providing arguments under sh -s in > ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh (4 Replies)
Discussion started by: Sree10
4 Replies

4. Red Hat

(PMT:6498): Gtk-WARNING **: cannot open display:

Error message: (PMT:6498): Gtk-WARNING **: cannot open display: How to solve this issue in linux? (1 Reply)
Discussion started by: vinayd
1 Replies

5. Linux

(PMT:6498): Gtk-WARNING **: cannot open display:

Hai (PMT:6498): Gtk-WARNING **: cannot open display: how to solve this in linux Double post.. continue here (0 Replies)
Discussion started by: vinayd
0 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Solaris

X11 and "Cannot Open Display" errors

Greetings Forumers! I'm posting a solution to an Issue I ran into this week: Getting applications to display on another through X11 and SSH. I have run into this issue many years ago and finally found my notes. Some of you may already know the answer to this issue but it took me a while to... (1 Reply)
Discussion started by: bluescreen
1 Replies

8. IP Networking

Unknown open port: "6881/tcp open bittorrent-tracker" found with nmap

Hi. I ran nmap on my server, and I get the following: Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-19 16:33 EDT Interesting ports on -------- (-----): Not shown: 997 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 6881/tcp open bittorrent-tracker The... (0 Replies)
Discussion started by: Rledley
0 Replies

9. SuSE

VMDB Failure" followed by "Unable to open snapshot file"

keep getting an error when I try to revert to a snapshot: "VMDB Failure" followed by "Unable to open snapshot file" Im using vmware server 1.0.4, host OS is windows xp and guest OS is SLES. Is there anything I can do to recover the snapshot or am I in trouble!?!?! (0 Replies)
Discussion started by: s_linux
0 Replies
Login or Register to Ask a Question