VNC
Be aware! Everyone with the VNC password will get access to your account
It is recommended not to use VNC. Use jupyterhub or screen or tmux instead. However, for GUI applications there is no other way.
The VNC (Virtual Network Computing) allows to view a graphical user interface (GUI) from a remote server in an viewer application. This can be used to launch GUI programs on the servers.
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.
Currently VNC is installed on: - JET01 - AURORA
Userservices
It is highly recommended to use the userservices scripts available on all IMGW Servers to make configurations for VNC.
using the userservices | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Running the script without any options will run all necessary steps. In case of error try removing your .vnc
directory, as older configurations might be in the way. There shall be at least two desktop options: icewm and xfce. You can specify this directly with the -w [DESKTOP]
option.
Connecting
Use a VNC client (e.g. TigerVNC Viewer (All OS) or RealVNC VNC Viewer on Windows, or Remmina on any Linux distribution) and connect to login.img.univie.ac.at:[DISPLAY]
.
Note: Since version 1.10 of tigerVNC it is possible to resize the windows directly
Connect with a viewer:
- Hostname:
login.img.univie.ac.at
orjet01.img.univie.ac.at
- VNC Port:
userservices vnc
, but do not stop the server. Just get the port of a running server.
Setting a window manager
This is more advanced. 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 | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
It is recommended to use IceWM instead. This is a more lightweight alternative to GNOME. To switch to IceWM, first log out from GNOME and disconnect from your VNC viewer, then change your .vnc/xstartup
to this:
Bash | |
---|---|
1 2 3 4 5 6 7 |
|
Some information on what could be put into .Xresources
is given here. It might be possible to replace icewm
here with startxfce4
to choose XFCE Desktop environment.
Change the resolution of your VNC Session
xrandr
gives you a list of available resolutions, that can be use. Requires a $DISPLAY
variable to be set, using your VNC display number does the trick, e.g. :3
.
Bash | |
---|---|
1 2 |
|
Change the resolution to e.g. 1920x1080 (HD):
Bash | |
---|---|
1 |
|
Adding resolutions according to your display's resolution have a look at
add_xrandr_resolution
Add a new monitor resolution to VNC | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
and run it like this:
Add a custom resolution to your virtual display | |
---|---|
1 2 |
|
Note: $DISPLAY
is an environment variable that is usually set to your VNC server port.
Created: January 26, 2023