Vnc

From Bitpost wiki
Revision as of 21:00, 18 July 2020 by M (talk | contribs)

Ubuntu-to-Ubuntu

tightvnc

Solid but more work.

Server installation
  • Package install:
apt install tightvncserver
  • Update the server config:
vncserver
 # enter pwd
 # optionally enter pwd for read-only sharing
 # note the result, eg: New 'X' desktop is melange:2
 # in this case, vnc desktop is running on desktop 2, because 1 was already running 'regular' X
cd ~/.vnc
cp xstartup xstartup.orig
emacs -nw xstartup # and replace with:
  #!/bin/bash
  xrdb $HOME/.Xresources
  /usr/bin/i3 &
vncserver -localhost # only allow connections from localhost; we will use ssh tunnel
Network configuration
  • Set up an ssh tunnel on the home LAN to the VNC server:
ssh -L 59000:localhost:5901 -C -N melange

You can leave this running to enable anytime-connect.

  • Set up an ssh tunnel on remote client (eg. viper) to the home LAN:
ssh -L 59000:localhost:59000 -C -N bitpost.com
Remote client connect
  • On remote machine, install client package (this is actually tightvnc, cmon assholes fix the name):
sudo apt install vncviewer

vino & remina

Using the "Ubuntu way", everything is supposed to be brought together under [mh-ubuntu-settings] Ubuntu Settings > Sharing. (but it's crap, read on...)

The packages it needs underneath are:

sudo apt-get install vino # VNC server; RESTART GNOME after installation
sudo apt-get install remina # VNC client

Ubuntu screwed the pooch on vino-server config, wtf you idiots. It's just some fucking app with no systemd support. Well fuck if I'm jumping hoops when the next LTS release is weeks away. Fuck you ubuntu. Just run the god damned thing directly

# allow local connections
gsettings set org.gnome.Vino network-interface lo

# see all settings
gsettings list-keys org.gnome.Vino

# run the fucker
/usr/lib/vino/vino-server &

Consider other VNC servers instead that allow startup on boot?