Trying a VNC for the first time

I've never used a VNC or any remote login programme before So I'm trying to use TigerVNC. However, I'm open to suggestions, I'm happy to try any VNC programme, I just want to get something working. I've also vaguely heard of TightVNC and X11VNC. I have no idea if these are Free and open source (which is a prerequisite) but I'm mainly interested in ease of use and simple step by step documentation, as I unfortunately only have about 20 minutes a day/night to spend on things like this.

I have set up two MX 19.3 (i.e. debian based) computers and I'm trying to remotely access between them. I've installed tigervnc viewer and tiger standalone server but when I try the following commands I'm getting the following issues:

$ sh -L 5901:127.0.0.1:5901 -C -N -l Robserver 192. ... . ...
ssh: connect to host 192. ... . ... port 22: Connection refused

$ vncserver -list

TigerVNC server sessions:

X DISPLAY #   RFB PORT #  PROCESS ID

$ vncserver

New 'Rob:1 (Rob)' desktop at :1 on machine Rob

Starting applications specified in /etc/X11/Xvnc-session
Log file is /home/Rob/.vnc/Rob:1.log

Use xtigervncviewer -SecurityTypes VncAuth -passwd /home/Rob/.vnc/passwd :1 to connect to the VNC server.


vncserver: Failed command '/etc/X11/Xvnc-session': 256!

=================== tail -15 /home/Rob/.vnc/Rob:1.log ===================
Underlying X server release 12004000, The X.Org Foundation


Wed May 26 21:27:33 2021
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on local interface(s), port 5901
 vncext:      created VNC server for screen 0
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
      after 173 requests (173 known processed) with 0 events remaining.
The server closed the connection.

Wed May 26 21:27:34 2021
 ComparingUpdateTracker: 0 pixels in / 0 pixels out
 ComparingUpdateTracker: (1:-nan ratio)
Killing Xtigervnc process ID 677... which seems to be deadlocked. Using SIGKILL!

=========================================================================

Starting applications specified in /etc/X11/Xvnc-session has failed.
Maybe try something simple first, e.g.,
  tigervncserver -xstartup /usr/bin/xterm

I really don't know what I'm doing and I have a weak grasp on the key concepts especially how the passwords and establishing SSH works, so I probably did something wrong (like setting-up to start on boot, how SSH works, firewall, ports). I was just following a couple guides online and I probably misapplied them. One thing I found was that they weren't clear on what to do on the server and what do to on the client, there is no differentiation. I wanted an idiots guide which said something like 'okay now write down that server I.P address and type it in on your VNC viewer' etc. Does anyone have any suggestions for a novice using MX linux?

P.S. I was thinking I could just remote login using VNC, and transfer files using RSYNC? Is this feasible?

Thanks in advance, Rob


Normally after install vncserver and vncclient on client machine, you have to activate vncserver, which looks like you have done it, but from what I've seen X11 session didn't start. When I do it I setup some lighter GUI environment ie XFCE or LXDE, but then you have to define that before starting vncserver. nano /home/UserName/.vnc/xstartup

#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
#gnome-session &
lxterminal &
/usr/bin/lxsession -s LXDE &

So you see I comment out gnome-session and activate LXDE, as normal gnome doesn't work very efficient remotely with mouse (for me at least)

I put a line in rc.local on the server to start vncserver like following:

su - UserName -c "vncserver :1 -geometry 1600x900"

Geometry optional a bit smaller so I can work within a window well.

Now from client I would connect with (I use openvpn tunnel so don't need to do it over SSH):

vncviewer servername:1

Not sure which window managers you have, but I believe it's fairly easy to add a lightweight WM to your machine.

Rysnc is very efficient in transferring data so I believe it's the best option for larger or many files. Just start it by: rsync --daemon -4 to run it only via TCP4, but before setup your /etc/rsyncd.conf something like

[data]
    path = /data
    comment = data folder
    use chroot = yes
    max connections = 4
    auth users = admusr
    read only = false
    hosts allow = 192.168.0.0/16 serverip
    secrets file = /etc/.rs_sec
    uid = root
    gid = root

Depends if you open port on public IP, obviously protect your data better, but working through tunnel is much more secure.