I have Ubuntu Mate 15.04 on my "remote" PC. I can connect with ssh and start vncserver and access the resulting desktop with Vinagre on my CentOS desktop without being logged onto the physical terminal of the remote PC. This is all well and good. Except...
Sometimes I need to access the physical terminal session on the remote PC. I have installed x11vnc for this purpose. If I manually logon to the remote PC first I can connect with x11vnc thusly:
However, if I am not logged in to the physical terminal I am unable to start x11vnc. The messages provide in part this information
Quote:
** If NO ONE is logged into an X session yet, but there is a greeter login
program like "gdm", "kdm", "xdm", or "dtlogin" running, you will need
to find and use the raw display manager MIT-MAGIC-COOKIE file.
Some examples for various display managers:
gdm: -auth /var/gdm/:0.Xauth
-auth /var/lib/gdm/:0.Xauth
kdm: -auth /var/lib/kdm/A:0-crWk72
-auth /var/run/xauth/A:0-crWk72
xdm: -auth /var/lib/xdm/authdir/authfiles/A:0-XQvaJk
dtlogin: -auth /var/dt/A:0-UgaaXa
Sometimes the command "ps wwwwaux | grep auth" can reveal the file location.
Starting with x11vnc 0.9.9 you can have it try to guess by using:
-auth guess
|
-auth guess does not work so I tried
Code:
ps wwwwaux | grep auth
/var/run/lightdm/root/:0
/var/run/lightdm/root of course belongs to root so I am forced to use this command to start x11vnc
Code:
sudo x111vnc -auth /var/run/lightdm/root/:0
This is certainly a workable solution. However, I am wondering if I can start x11vnc as my normal user ID? Perhaps the greeter, before anyone logs in belongs to root? If I start x11vnc with sudo from my user ID "ken" and then attempt to login to the remote system with another user ID... perhaps something will tilt? I will have to try.
While I am setting up a second user on the remote system and testing... am I wrong in wanting to start x11vnc on a non-logged on PC without sudo?
TIA,
Ken
p.s. I have created a second, not sudoer user. I can start x11vnc and logon as that user on the remote PC using the x11vnc remote desktop. When I logout as that user x11vnc shuts down as it is supposed to. I did notice that if I restart x11vnc or logon physically to the remote PC with MY ID there is a terminal in the upper left part of the screen. This is not normally present. If I login as the new user, exit, restart x11vnc and login as the new user again I do not sees the terminal window. Strange.