From fcc1b72fde9227f7b9331cdc68992b142bbfa19c Mon Sep 17 00:00:00 2001 From: emanuele <emanuele.petagna@garr.it> Date: Mon, 7 Feb 2022 18:18:55 +0100 Subject: [PATCH] fixed? --- web/support/FAQ.rst | 70 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/web/support/FAQ.rst b/web/support/FAQ.rst index 4e6e1327..c00bd46f 100644 --- a/web/support/FAQ.rst +++ b/web/support/FAQ.rst @@ -651,3 +651,73 @@ I have registered through the Form-based registration and now I am trying to log ------------------------------------------------------------------------------------------------------------------------------------------------- Please enter `cloudusers` in the domain field. +How to get a Graphical GUI for your OpenStack VM (tested on Ubuntu 20.04 server) +---------------------------------------------------------------------------- +This FAQ explains how to install a grphical Environment and VNC on an OpenStack instance and how to access +it without exposing VNC service to the Internet. + +Requirements for local machine: + +- a VNC Client (Remmina, TigerVNC, ChickenOfTheVNC...) +- an SSH Client + +The following instructions work straightforward on Linux and MacOS; on Windows some adjustments are required, +it depends on your SSH Client. + +**XFCE4 Desktop Environment** + +1. SSH login to your OpenStack VM +2. install XFCE4: `sudo apt-get install xfce4 xfce4-goodies gnome-icon-theme tigervnc-standalone-server` + (if you need a more complete desktop environment then install also **xubuntu-desktop**) +3. create a .vnc folder in your user home: `mkdir .vnc` +4. create xstartup file in `~/.vnc/` and paste the following content: + :: + #!/bin/bash + xrdb $HOME/.Xresources + startxfce4 & + :: +5. run `vncpasswd` and set VNC password (you can skip the viewer password) +6. run `vncserver -geometry WIDTHxHEIGHT -localhost yes -rfbport PORT`, replace **WIDTH** and **HEIGHT** with + desired values (ex: 1024x768) and PORT (ex: 5901, default port) +7. on your local machine run: `ssh -L LOCAL_PORT:127.0.0.1:PORT USER@VM_IP`; choose a port and replace + **LOCAL_PORT** with a valid port; replace **PORT** with the same port used in previous step. +8. on your local machine run a VNC Client and connect to **127.0.0.1:LOCAL_PORT**, when required insert VNC password (from step 5) + + +**GNOME Desktop Environment** + +1. SSH login to your OpenStack VM +2. install XFCE4: `sudo apt-get install ubuntu-gnome-desktop gnome-icon-theme tigervnc-standalone-server` +3. create a .vnc folder in your user home: `mkdir .vnc` +4. create xstartup file in `~/.vnc/` and paste the following content: + :: + #!/bin/sh + # Start Gnome 3 Desktop + [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup + [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources + vncconfig -iconic & + dbus-launch --exit-with-session gnome-session & + :: +5. run `vncpasswd` and set VNC password (you can skip the viewer password) +6. run `vncserver -geometry WIDTHxHEIGHT -localhost yes -rfbport PORT`, replace **WIDTH** and **HEIGHT** with + desired values (ex: 1024x768) and PORT (ex: 5901, default port) +7. on your local machine run: `ssh -L LOCAL_PORT:127.0.0.1:PORT USER@VM_IP`; choose a port and replace + **LOCAL_PORT** with a valid port; replace **PORT** with the same port used in previous step. +8. on your local machine run a VNC Client and connect to **127.0.0.1:LOCAL_PORT**, when required insert VNC password (from step 5) + + +When you do not need anymore VNC you can stop it; on your OpenStack VM: + +1. run `vncserver --list`, you should get a list of active VNC displays + :: + testuser@test-gui:~$ vncserver --list + + TigerVNC server sessions: + + X DISPLAY # RFB PORT # PROCESS ID + :2 5902 36811 + :: +2. kill the proper VNC display: `vncserver -kill :DISPLAY`, replace **DISPLAY** with correct value (ex: 2 in our example) +3. logout + +To restart VNC server just login and follow steps from 6. to 8.. \ No newline at end of file -- GitLab