Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I can log into the remote Ubuntu (Kubuntu 12.04) machine. Using the info from (How to start a a GUI software on a remote Linux PC via SSH) I tried the following after logging in:

user@Kub:~$ export DISPLAY=:0
user@Kub:~$ firefox
No protocol specified
No protocol specified
No protocol specified
No protocol specified
Error: cannot open display: :0

I expected the same success as stated at the question referenced. Unfortunately, as you see it didn't work for me. The machine has 3 displays. Could that be the issue?

Is there a simple solution? I also read (http://unix.stackexchange.com/questions/10121/open-a-window-on-a-remote-x-display-why-cannot-open-display) but I didn't understand how to use or apply that advice. It was too complicated. I appreciate any relatively simple solutions.

I looked at a running GUI process (Kate) with this:

# cat /proc/2857/environ | tr \\0 \\n | grep -E '^(DISPLAY|AUTHORITY)=' 
DISPLAY=:0

That further confuses me as to why this didn't work.

Using Scott Goodgame's suggestion (below), I tried this:

  1. login with -X and -C options on SSH.
  2. export DISPLAY=:0
  3. firefox &

The result was:

$ No protocol specified
No protocol specified
No protocol specified
No protocol specified
Error: cannot open display: :0
share|improve this question
    
I'm still looking for a solution. –  MountainX Jul 8 '13 at 22:58
add comment

2 Answers

A simple way to be able to start graphical programs is to start ssh like so... ssh -X -C user@MyIp it will then start your ssh session like normal, but you can then start an X program like so.. firefox & this will start firefox on the remote machine, display it local to you, and return you to the ssh prompt.

share|improve this answer
    
This gives me: $ Error: no display specified –  MountainX Jun 24 '13 at 4:48
    
Odd, just tested on my network and works fine... I'll poke around and get back. –  Scott Goodgame Jun 24 '13 at 6:35
    
My SSH connection is via a reverse tunnel. Maybe that's the reason? –  MountainX Jun 24 '13 at 18:38
    
I'm still looking for a solution –  MountainX Jul 8 '13 at 22:56
add comment
up vote 0 down vote accepted

I'm on Kubuntu 12.04. Here is what worked for me with an example of how to start x11vnc remotely.

First run the command ps wwwwaux | grep auth to find the xauth cookie. The result will look similar to this:

root      1592  3.6  6.2 665544 1023456 tty7   Ss+  Jul14 288:35 /usr/bin/X :0 vt7 -br -nolisten tcp -auth /var/run/xauth/A:0-ABCDEF

The part of interest is at the end of that line: /var/run/xauth/A:0-ABCDEF
(where ABCDEF is a unique random(?) string)

Next insert the result from that into this command:

sudo x11vnc -rfbport 5901 -rfbauth ~/.vnc/passwd -display :0 -shared -xauth /var/run/xauth/A\:0-ABCDEF
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.