Open a window
I have a Linode running arch linux. I am new to both Linode and Arch Linux. I would like to open a window to view a document on my Linode.
I am connected to linode via ssh -X (X forwarding enabled). When I try:
eog myphoto.jpg
I get the error: "Cannot open display:".
The same happens when I try:
xpdf mydocumnet.pdf
Can someone tell me how I can open a window?
6 Replies
I have checked that /etc/ssh/sshd_config on linode has X11 forwarding enabled.
That usually contains some helpful clues. If you paste the output here I or someone else may be able to help you.
rnandi@salamander:~$ ssh -Xvvv robin@109.74.200.145
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 109.74.200.145 [109.74.200.145] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/rnandi/.ssh/id_rsa" as a RSA1 public key
debug2: keytypefrom_name: unknown key type '–---BEGIN'
debug3: key_read: missing keytype
debug2: keytypefrom_name: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: keytypefrom_name: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: keytypefrom_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/rnandi/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/rnandi/.ssh/id_rsa-cert type -1
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/rnandi/.ssh/id_dsa" as a RSA1 public key
debug2: keytypefrom_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: keytypefrom_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/rnandi/.ssh/id_dsa type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: identity file /home/rnandi/.ssh/id_dsa-cert type -1
debug1: identity file /home/rnandi/.ssh/id_ecdsa type -1
debug1: identity file /home/rnandi/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-7ubuntu1
debug2: fd 3 setting O_NONBLOCK
debug3: loadhostkeys: loading entries for host "109.74.200.145" from file "/home/rnandi/.ssh/knownhosts"
debug3: loadhostkeys: found key type RSA in file /home/rnandi/.ssh/knownhosts:8
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs:
debug1: SSH2MSGKEXINIT sent
debug1: SSH2MSGKEXINIT received
debug2: kexparsekexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kexparsekexinit:
debug2: kexparsekexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,
debug2: kexparsekexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,
debug2: kexparsekexinit: hmac-md5,hmac-sha1,
debug2: kexparsekexinit: hmac-md5,hmac-sha1,
debug2: kexparsekexinit: none,
debug2: kexparsekexinit: none,
debug2: kexparsekexinit:
debug2: kexparsekexinit:
debug2: kexparsekexinit: firstkexfollows 0
debug2: kexparsekexinit: reserved 0
debug2: kexparsekexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kexparsekexinit: ssh-rsa,ssh-dss
debug2: kexparsekexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,
debug2: kexparsekexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,
debug2: kexparsekexinit: hmac-md5,hmac-sha1,
debug2: kexparsekexinit: hmac-md5,hmac-sha1,
debug2: kexparsekexinit: none,
debug2: kexparsekexinit: none,
debug2: kexparsekexinit:
debug2: kexparsekexinit:
debug2: kexparsekexinit: firstkexfollows 0
debug2: kexparsekexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2MSGKEXECDHINIT
debug1: expecting SSH2MSGKEXECDHREPLY
debug1: Server host key: RSA d5:24:4c:8a:33:d2:4f:0e:5b:14:b8:00:52:56:87:1b
debug3: loadhostkeys: loading entries for host "109.74.200.145" from file "/home/rnandi/.ssh/knownhosts"
debug3: loadhostkeys: found key type RSA in file /home/rnandi/.ssh/knownhosts:8
debug3: load_hostkeys: loaded 1 keys
debug1: Host '109.74.200.145' is known and matches the RSA host key.
debug1: Found key in /home/rnandi/.ssh/known_hosts:8
debug1: sshrsaverify: signature correct
debug2: kexderivekeys
debug2: set_newkeys: mode 1
debug1: SSH2MSGNEWKEYS sent
debug1: expecting SSH2MSGNEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2MSGNEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2MSGSERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2MSGSERVICE_ACCEPT received
debug2: key: /home/rnandi/.ssh/id_rsa (0xb9474e48)
debug2: key: /home/rnandi/.ssh/id_dsa (0xb947bc90)
debug2: key: /home/rnandi/.ssh/id_ecdsa ((nil))
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethodisenabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/rnandi/.ssh/id_rsa
debug3: sendpubkeytest
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Offering DSA public key: /home/rnandi/.ssh/id_dsa
debug3: sendpubkeytest
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/rnandi/.ssh/id_ecdsa
debug3: no such identity: /home/rnandi/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethodisenabled password
debug1: Next authentication method: password
robin@109.74.200.145's password:
debug3: packetsend2: adding 64 (len 59 padlen 5 extrapad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
Authenticated to 109.74.200.145 ([109.74.200.145]:22).
debug1: channel 0: new [client-session]
debug3: sshsession2open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting
debug1: Entering interactive session.
debug2: callback start
debug2: x11getproto: /usr/bin/xauth list :0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 0
debug2: clientsession2setup: id 0
debug2: fd 3 setting TCP_NODELAY
debug3: packetsettos: set IP_TOS 0x10
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug3: Ignored env MANPATH
debug3: Ignored env SSHAGENTPID
debug3: Ignored env GPGAGENTINFO
debug3: Ignored env TERM
debug3: Ignored env SHELL
debug3: Ignored env XDGSESSIONCOOKIE
debug3: Ignored env LHAPATH
debug3: Ignored env WINDOWID
debug3: Ignored env GNOMEKEYRINGCONTROL
debug3: Ignored env GTK_MODULES
debug3: Ignored env USER
debug3: Ignored env LDLIBRARYPATH
debug3: Ignored env LS_COLORS
debug3: Ignored env XDGSESSIONPATH
debug3: Ignored env XDGSEATPATH
debug3: Ignored env SSHAUTHSOCK
debug3: Ignored env LIBPATH
debug3: Ignored env SESSION_MANAGER
debug3: Ignored env USERNAME
debug3: Ignored env DEFAULTS_PATH
debug3: Ignored env XDGCONFIGDIRS
debug3: Ignored env PATH
debug3: Ignored env DESKTOP_SESSION
debug3: Ignored env PWD
debug3: Ignored env GNOMEKEYRINGPID
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: Ignored env MANDATORY_PATH
debug3: Ignored env UBUNTU_MENUPROXY
debug3: Ignored env COMPIZCONFIGPROFILE
debug3: Ignored env GDMSESSION
debug3: Ignored env ROOTSYS
debug3: Ignored env SHLVL
debug3: Ignored env HOME
debug3: Ignored env GNOMEDESKTOPSESSION_ID
debug3: Ignored env DYLDLIBRARYPATH
debug3: Ignored env IBUSENABLESYNC_MODE
debug3: Ignored env PYTHONPATH
debug3: Ignored env LOGNAME
debug3: Ignored env XDGDATADIRS
debug3: Ignored env DBUSSESSIONBUS_ADDRESS
debug3: Ignored env LESSOPEN
debug3: Ignored env SHLIB_PATH
debug3: Ignored env DISPLAY
debug3: Ignored env GENIE
debug3: Ignored env XDGCURRENTDESKTOP
debug3: Ignored env LESSCLOSE
debug3: Ignored env COLORTERM
debug3: Ignored env XAUTHORITY
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channelinputstatus_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channelinputstatus_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Last login: Tue Apr 17 04:19:56 2012 from 78-86-30-63.zone2.bethere.co.uk
[robin@li147-145 ~]$
Try sshing with -vvv again and running xpdf/eog. ssh will output additional debug information when you try to initiate an X connection.
Also, before running xpdf/eog run:
echo $DISPLAY
which xauth
I'm curious what that says.
If I run xpdf/eog when logged in with ssh -vvv, I get the same response with no extra debug information:
"Cannot open display:"
echo $DISPLAY
gives nothing
which xauth
gives:
/usr/bin/xauth