OS: OSX 10.10 Yosemite
enable screen sharing
connection from client
-
if client is Apple, simple:
open vnc://ipaddr
-
if client is Linux or Win, sounds simple:
vncviewer vnc://ipaddr
, possible issues:-
no matching security types mac
, solution: make sure a vnc password is given inComputer Settings
, it is the password (not the Mac User Account's password) that will be used when vnc client tries to connect Mac usingvncviewer
-
Mac drop wireless connection after client enters the correct vnc password and tries to estabilish the connection, solution:
sudo defaults write /Library/Preferences/com.apple.RemoteManagement VNCAlwaysStartOnConsole -bool true
from VNC connection to Mavericks Screen Sharing drops WiFi connection
-
ssh tunneling
- meaning of
ssh -L port1:localhost:port2 user@serveraddr
(suppose i issue this command inMachineA
): it is a normal ssh logging, but after logging in serveraddr, all the traffic toport1
inMachineA
will beforwarded
toport2
inserveraddr
, emp. in my ubuntu client
ssh -L 5900:localhost:5900 zerry@serveraddr
after logging in and stay logged in, open a new terminal
vncviewer localhost:5900 # or vncviewer localhost
then we can vnc view Mac through ssh tunneling. Basically using ssh tunneling is for safety reason as it provides better encription of communication compared to directly using vnc protocol, but in low level they both reply on tcp connection. Can check 5900
port number by lsof -i :5900
in MachineA
and see if it is listening
-
Mac's beautful ui including all apps is called Aqua, it's very different from XServer in Linux, that's why you need to install
XQuartz
to setup an XServer in Mac so that it can render XWindows forwarded from Linux servers. However, in Mac server Linux client settings, after ssh logged in, when trying to open Mac native apps likeFinder
usingopen .
command in Linux client, rather than a pop up window in Linux client, the apps will be opened in Mac server, think of Linux client helping Mac server to fire a command, this is because Linux client can't render Aqua native apps. But X11 Windows/Programs likexclock
,firefox
can be forwarded to Linux client properly -
experiments:
- Linux client ssh into Mac, then run
open vnc://localhost
:you cannot control your own screen
, this is because5900
is by default already served for the display of Mac itself - Prepare a ssh tunneling inside Mac server
ssh -L 5901:localhost:5900 localhost
, so that vnc to5901
in the server is equal to vnc to server's5900
(can check state of port5901
usinglsof
as mentioned above), then Linux client ssh into Mac and runopen vnc://localhost:5901
, this will be what happens in the Mac server:
- Linux client ssh into Mac, then run
remmina version issues
-
remmina in ubuntu 12.04 's password is not the vnc password set in
computer settings
, but the account password. And it never makes Mac server drop wireless connection. -
remmina in ubuntu 14.04 's password is the vnc password set in
computer settings
, just like run the normalvncviewer
in command line. -
bug of version issues, even now is not fixed in
reminna-test
,It has to do with the fact that when the remmina vnc plugin is built on newer versions of Debian (and/or Ubuntu) the compiler builds against the system package version of libvncserver rather than the customized internal version of libvncserver packaged with the remmina-plugin-vnc source. These days the system package version of libvncserver is the better option, and this is probably intended behavior, but remmina-plugin-vnc looks for certain custom defined flags in its personal version of libvncserver in order to enable Apple Authentication support. It doesnt see these flags, so this feature doesnt work.
-
check versions:
apt-cache policy remmina