diff --git a/SSH-VPN-VNC/README.md b/SSH-VPN-VNC/README.md index ca86386f5bff8e555bbf27e812bb4362dfb2c867..24416bac8ede6627c3081c43bc9afff8560aef91 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>