09 September 2020

Remote desktop Mac to Ubuntu

It should be easy, and it is, but first a few hoops:

Using in build in 'vino'

  1. On Ubuntu install vino: sudo apt-get install -y vino
  2. Use 'Settings' app (top right via preferences, or apps, select Sharing
  3. Switch on at the top, and desktop sharing
    1. Set a password
    2. Ensure selected:
      1. "Allow other users to view your desktop"
      2. "Allow other users to control your desktop"
    3. Ensure NOT selected: "You must confirm each access to the this machine"
  4. Disable encryption on Ubuntu: gsettings set org.gnome.Vino require-encryption false
  5. Restart Ubuntu and log into it locally (Vino doesn't start until user logged in)

Using VNC

Vino is ok, but having to login first on the actual machine, and screen resolution pushed me to find another method: using VNC
  1. Install vnc: sudo apt update && sudo apt install -y xfce4 xfce4-goodies
  2. sudo apt install tightvncserver
  3. Setup default password: vncserver
    1. enter password
  4. Reconfigure vnc display:
    1. vncserver -kill :1
    2. copy config: mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
    3. create startup script: vi ~/.vnc/xstartup
    4. Enter startup script:
      #!/bin/bash
      xrdb $HOME/.Xresources
      startxfce4 &
    5. Change to executable: sudo chmod +x ~/.vnc/xstartup
    6. Now connect...

To Connect

  1. Get Ubuntu ip address: apt-get install -y net-tools && ifconfig -a
  2. Connect using Screen Sharing app on Mac and ip address of Ubuntu machine

No comments:

Post a Comment