Vnc

From Bitpost wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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 xvnctightviewer
  • Run it!
vncviewer & # and enter [localhost:59000]

Bah bullshit, I can't get the i3 display to start up properly.

Troubleshooting

Apparently I need a better xstartup:

#!/bin/bash
xrdb $HOME/.Xresources
xsetroot -solid grey

#Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1

DISPLAY=.2 i3 &

Make sure you kill any running server before starting it again:

vncserver -kill :2 # or .3 or .4...
vncserver -localhost # should start on .2 since X is already running - is that a prob?

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, no systemd support baked in? This explains how you can set up a service. Geez oh pete.

# 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?