Vnc: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 4: Line 4:


Solid but more work.
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 ====
==== vino & remina ====
Line 12: Line 58:
  sudo apt-get install remina # VNC client
  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 ubuntuJust run the god damned thing directly
Ubuntu screwed the pooch on vino-server config, no systemd support baked in?  [https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-20-04 This] explains how you can set up a serviceGeez oh pete.


  # allow local connections
  # allow local connections

Latest revision as of 23:41, 18 July 2020

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?