You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: This VNC connection is NOT secure without using a SSH tunnel !!!
Steps:
1- Activate "PackageHub" repository - Packages from this repository are unsupported:
tux@sles-15-sp4-gen2:~> sudo SUSEConnect -p PackageHub/15.4/x86_64
Registering system to registration proxy https://smt-azure.susecloud.net
Updating system details on https://smt-azure.susecloud.net ...
Activating PackageHub 15.4 x86_64 ...
-> Adding service to system ...
-> Installing release package ...
Successfully registered system
2- Install "xfce" pattern:
tux@sles-15-sp4-gen2:~> sudo zypper -n in -t pattern xfce
3- Set Systemd default target:
tux@sles-15-sp4-gen2:~> sudo systemctl set-default multi-user.target
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/multi-user.target.
4- CSP specific - Please adjust it to your needs - Make sure Azure network security group (NSG) rules added to open TCP port 5900:
9- First test and used to create a new VNC password - Initiate manually a VNC session as local user "tux":
Doc: https://documentation.suse.com/sles/15-SP4/html/SLES-all/cha-vnc.html#vnc-persistent-vncserver
tux@sles-15-sp4-gen2:~> WINDOWMANAGER=icewm vncserver :0 -alwaysshared -geometry 1280x1024 -depth 32
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
xauth: file /home/tux/.Xauthority does not exist
New 'sles-15-sp4-gen2:0 (tux)' desktop is sles-15-sp4-gen2:0
Creating default startup script /home/tux/.vnc/xstartup
Creating default config /home/tux/.vnc/config
Starting applications specified in /home/tux/.vnc/xstartup
Log file is /home/tux/.vnc/sles-15-sp4-gen2:0.log
10 - Access VNC session from Linux client:
dmich@yoda:~> vncviewer <azure-pub-ip>:0
-> "VNC Authentication" window will be opened
-> Password: <Enter VNC password>
-> Open a terminal using the VNC session
tux@sles-15-sp4-gen2:~> echo $DISPLAY
:0
11- Verify running VNC session:
tux@sles-15-sp4-gen2:~> vncserver -list
TigerVNC server sessions:
X DISPLAY # PROCESS ID
:0 2101
tux@sles-15-sp4-gen2:~> ps -ef |grep X
tux 2101 1 0 13:48 pts/0 00:00:00 /usr/bin/Xvnc :0 -auth /home/tux/.Xauthority -depth 32 -desktop sles-15-sp4-gen2:0 (tux) -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/Type1 -geometry 1280x1024 -pn -rfbauth /home/tux/.vnc/passwd -rfbport 5900 -rfbwait 30000 -alwaysshared
tux 2108 1 0 13:48 pts/0 00:00:00 dbus-launch --exit-with-x11 /etc/X11/xinit/xinitrc
tux@sles-15-sp4-gen2:~> ss -ltpn
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 5 0.0.0.0:5900 0.0.0.0:* users:(("Xvnc",pid=2101,fd=6))
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 5 [::]:5900 [::]:* users:(("Xvnc",pid=2101,fd=7))
12- Terminate VNC session:
tux@sles-15-sp4-gen2:~> vncserver -kill :0
Killing Xvnc process ID 2101
13- Manually reinitiate a VNC session after reboot:
tux@sles-15-sp4-gen2:~> WINDOWMANAGER=icewm vncserver :0 -alwaysshared -geometry 1280x1024 -depth 32
New 'sles-15-sp4-gen2:0 (tux)' desktop is sles-15-sp4-gen2:0
Starting applications specified in /home/tux/.vnc/xstartup
Log file is /home/tux/.vnc/sles-15-sp4-gen2:0.log
14- Create systemd unit file for starting a "headless" VNC server during boot:
Azure end customer were requesting "headless" VNC access while having "DISPLAY :0" variable set , I think it would be useful adding this to SUSE Public Cloud Guide: https://documentation.suse.com/sle-public-cloud/all/single-html/public-cloud/
Setup Guide - VNC access through port "5900" setting "DISPLAY :0"
Tested on Azure based SLES-15-SP4 Gen2 instance - Details:
SUSE official VNC Doc: https://documentation.suse.com/sles/15-SP4/html/SLES-all/cha-vnc.html
NOTE: This VNC connection is NOT secure without using a SSH tunnel !!!
Steps:
1- Activate "PackageHub" repository - Packages from this repository are unsupported:
2- Install "xfce" pattern:
3- Set Systemd default target:
4- CSP specific - Please adjust it to your needs - Make sure Azure network security group (NSG) rules added to open TCP port 5900:
5- Reboot the instance
6- Make sure port 5900 is not already used - Show all listening TCP connections:
7- Make sure there is no other X server running - Search for already running X servers:
8- Make sure "multi-user.target" is set - See current systemd target:
9- First test and used to create a new VNC password - Initiate manually a VNC session as local user "tux":
10 - Access VNC session from Linux client:
11- Verify running VNC session:
12- Terminate VNC session:
13- Manually reinitiate a VNC session after reboot:
14- Create systemd unit file for starting a "headless" VNC server during boot:
15- Modify the configuration file: $HOME/.vnc/xstartup
16- Reboot the instance:
17 - Verify running VNC session:
Additional information's:
While the local user "tux" is logged in using the xfce based VNC session:
The text was updated successfully, but these errors were encountered: