From c18bffc57f9686a1f3d46f306879212c4baf5710 Mon Sep 17 00:00:00 2001
From: Michael Blaschek <michael.blaschek@univie.ac.at>
Date: Mon, 12 Apr 2021 15:47:24 +0200
Subject: [PATCH] Update SSH-VPN-VNC/README.md

---
 SSH-VPN-VNC/README.md | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/SSH-VPN-VNC/README.md b/SSH-VPN-VNC/README.md
index ca86386..24416ba 100644
--- a/SSH-VPN-VNC/README.md
+++ b/SSH-VPN-VNC/README.md
@@ -77,8 +77,32 @@ The VNC (Virtual Network Computing) allows to view a graphical user interface (G
 
 Xvnc is the Unix VNC server. Applications can display themselves on Xvnc as if it were a normal display, but they will appear on any connected VNC viewers rather than on a physical screen. The VNC protocol uses the TCP/IP ports 5900+N, where N is the display number.
 
+### Setup
+First of all check if a VNC server is already running or not. Depending on the results you have two options:
+1. Use an existing. (Note the Port/Display Number)
+2. Stop all and start a new VNC server
+
+```bash
+# Check VNC Server directly, lists available with DISPLAY/PORT
+vncserver -list
+
+# Check for processes:
+ps ux | grep Xvnc
+
+# Kill a VNC Display
+vncserver -kill :[DISPLAY]
+
+# Start a new VNC Server
+vncserver
+```
+
 ### Connecting, setting the window manager
-Use a VNC client (e.g. the [RealVNC VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/windows/) on Windows, or [Remmina](https://remmina.org/) on any Linux distribution) and connect to `131.130.157.215:[DISPLAY]`.
+Use a VNC client (e.g. the [RealVNC VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/windows/) on Windows, or [Remmina](https://remmina.org/) on any Linux distribution) and connect to `srvx?.img.univie.ac.at:[DISPLAY]`.
+
+Connect with a viewer:
+1. Hostname: `srvx1.img.univie.ac.at` or `jet01.img.univie.ac.at`
+2. VNC Port: `vncserver -list` or `systemctl status --user vncserver.slice`
+3. VNC passwort (`vncpasswd` allows to set this on the server)
 
 The VNC server will automatically start a graphical window manager/desktop environment. Details are stored in `.vnc/xstartup`. Your default configuration will load GNOME, and `.vnc/xstartup` will be something like this:
 ```bash
@@ -110,9 +134,13 @@ Finally stop/restart the VNC server.
 ```bash
 $ systemctl --user restart vncserver@:[DISPLAY].service --now
 ```
+
 Monitor the status:
 ```bash
+# Like this
 $ systemctl --user status vncserver@:[DISPLAY].service
+# or
+$ systemctl --user status vncserver.slice
 
  vncserver@:7.service - Remote desktop service (VNC)
    Loaded: loaded (/jetfs/home/mblaschek/.config/systemd/user/vncserver@.service; enabled; vendor preset: e>
-- 
GitLab