connect to active desktop session with VNC
Problem
I mainly work on a mac laptop, but sometimes I have some tasks on an ubuntu desktop. ssh
works well for some non-GUI tasks, but for those tasks with GUI on ubuntu desktop, I have to move my hands to desktop’s keyboard away from laptop’s keyboard, back and forth. Many times I pressed laptop’s keyboard while I intended to input for desktop, or vice versa.
Solution
If I could connect to the active session on ubuntu desktop from my laptop, then I could only type on my laptop’s keyboard, which apparently solves the problem.
That is x11vnc
.
-
apt-get install x11vnc
-
run x11vnc on ubuntu
x11vnc -display :0 -usepw -allow ip_of_laptop -shared
-
From Mac laptop,
Command + k
inFinder
to connect to:vnc://ip_or_hostname_of_ubuntu:5900