Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 11517  / 2 Years ago, sun, february 20, 2022, 1:12:10

I can log into the remote Ubuntu (Kubuntu 12.04) machine. Using the info from (How to start 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 (https://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

More From » xorg

 Answers
2

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

[#30607] Sunday, February 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
splenueak

Total Points: 448
Total Questions: 118
Total Answers: 110

Location: Vanuatu
Member since Mon, Oct 3, 2022
2 Years ago
;