Ubuntu 22.04 Gui
Overview
This guide covers the deployment and configuration of Ubuntu 22.04 LTS with the GNOME desktop on Microsoft Azure, using SecureAnyCloud's preconfigured virtual machine image from the Azure Marketplace.
Ubuntu 22.04 LTS, codename Jammy Jellyfish, is Canonical's long-term support release. This image is the genuine Ubuntu Server base with the distribution's own desktop added: ubuntu-desktop-minimal, installed without its recommended extras so the machine stays server-shaped. You reach the desktop with any VNC viewer through TigerVNC, and each user gets a full GNOME session of their own on the virtual machine.
A freshly deployed machine exposes nothing but SSH. VNC ships switched off, no account has a password, and no VNC password exists anywhere in the image. When you turn VNC on, the server listens on localhost only, so you reach it through an SSH tunnel rather than over the internet.
What you get:
- Ubuntu 22.04.5 LTS on the 6.8 Azure kernel, with every available update applied at build time, phased updates included
- The GNOME desktop from the Ubuntu main component: GNOME Shell 42.9, the GDM 42 login screen and mutter 42.9
- Desktop applications from main, including Files (Nautilus), Terminal, Text Editor, System Monitor, Settings and Disks
- TigerVNC 1.12 (
tigervnc-standalone-server), configured for per-user desktops on localhost only, with every offered security type requiring the VNC password sac-vnc, a small helper that shows the VNC state and starts or stops a user's desktop with one command- Guest sleep disabled, so the desktop never offers a Suspend that would leave an Azure virtual machine unreachable
unattended-upgradesenabled, so the machine applies security updates automatically- AppArmor enforcing and the Azure provisioning path unchanged (cloud-init, the Azure Linux Agent, systemd-networkd)
- Gen2 Hyper-V virtual machine support
- About 1,180 packages, using about 6 GiB of the 30 GiB operating system disk and leaving the rest for your own software and data
- Platform: Microsoft Azure (Gen2 Hyper-V, x64)
- Default user:
azureuser - 24/7 SecureAnyCloud support
Why VNC, and not RDP
On Ubuntu 22.04, the two obvious remote desktop options do not fit a cloud image that must stay fully patched without a paid subscription:
- xrdp is in Ubuntu's universe component, and its security fixes on 22.04 are published only through Ubuntu Pro's Expanded Security Maintenance. An image built on it could not be kept current without a Pro subscription. SecureAnyCloud does not ship it. The image checks that xrdp is absent at build time and again on every machine.
- GNOME Remote Desktop on this release is version 42, which only shares a session that someone is already logged into at the machine. Headless remote login over RDP arrived in GNOME 46. The package is present because the desktop depends on it, but it is never enabled and holds no credentials.
TigerVNC is the option that is both first party and fully maintained on 22.04. Its one security fix for this release (CVE-2023-1393) shipped in the ordinary security pocket, in exactly the version this image carries, so the machine can keep itself patched from the free archive. Every package in the image is covered by ordinary Ubuntu security updates: none of them needs Ubuntu Pro.
The VNC password protocol is old: it uses only the first 8 characters of the password. That is why this image never exposes VNC to the network. The policy file /etc/tigervnc/vncserver-config-mandatory forces two settings for every user. TigerVNC loads this file after each user's own configuration and after the command line, so a user's settings cannot undo it:
$localhost = "yes";makes the VNC server listen on127.0.0.1and::1only. You connect through an SSH tunnel, which is encrypted and authenticated with your SSH key.$SecurityTypes = "TLSVnc,VncAuth";offers only security types that require the VNC password.None(no password) is never offered.
GDM runs with Wayland disabled (WaylandEnable=false in /etc/gdm3/custom.conf), so the login screen and the VNC sessions both run on X11.
The two passwords, and which one goes where
Neither password exists until you create it, and both belong to you:
- Your VNC password. You set it yourself by running
vncpasswdas your own user, withoutsudo. On TigerVNC 1.12 it is stored at~/.vnc/passwd, readable only by you. Your VNC viewer asks for it when it connects. Only the first 8 characters count. - Your account password. You set it yourself with
sudo passwd <your-user>. The VNC session logs you straight into GNOME, but the desktop still asks for this password when the screen locks and when an application needs administrator rights. The image ships with no account password at all.
SSH stays key-only throughout. Setting either password does not enable password logins over SSH.
Security posture
This image ships with no known credentials:
- No account has a password. The root account is locked and your administrator account is created at first boot with only the SSH key you supply.
- SSH is key-only (
PasswordAuthentication no). - No VNC password exists for any account, no VNC desktop is configured, and a new virtual machine listens on SSH port 22 only. Port 22 is the only port the listing advertises.
- When VNC is on, it listens on localhost only and every offered security type requires the VNC password.
- The helper refuses to start a desktop for a user who has no account password or no VNC password.
- Guest sleep is disabled, so the desktop menu offers Restart, Power Off and Log Out but never Suspend.
- SSH host keys are removed before capture and regenerated on each machine at first boot, and
/etc/machine-idis regenerated per machine, so no two machines share a host identity. The login screen's own PulseAudio cookie is removed before capture and is recreated per machine. - AppArmor is enforcing and GDM automatic login is not enabled.
- The network renderer is pinned to
systemd-networkd(see "Important Notes"), and NetworkManager is not installed.
Known issue: TigerVNC and CVE-2026-34352
CVE-2026-34352 does not apply to this image. The reason, checked on 18 September 2026 against Ubuntu's security tracker, is as follows:
- The CVE is against
x0vncserver, TigerVNC's screen-scraping server, whoseImage.cxxuses incorrect permissions so that other local users can observe or manipulate screen contents. Ubuntu lists it for 22.04 asneeds-triage, priority medium. - On Ubuntu,
x0vncserveris packaged intigervnc-scraping-server, which this image does not install. The binary is not on the machine at all. You can check this yourself with the commands in Step 11. - The remote desktop this image ships is Xvnc, a virtual X server from
tigervnc-standalone-server. It is a different program and is not the subject of that CVE.
Support window
Ubuntu 22.04 LTS receives standard security maintenance until 1 June 2027. That is the date when the free archive stops publishing updates for it. After that date, continued security updates require an Ubuntu Pro subscription. This image does not use Ubuntu Pro and does not need it before that date. Plan a move to Ubuntu 24.04 LTS before then. SecureAnyCloud publishes a 24.04 LTS desktop image on the same design.
Prerequisites
Before you deploy this image, make sure you have the following:
- An active Microsoft Azure subscription
- Access to the Azure Portal or Azure CLI
- An SSH key pair for Linux VM access
- A VNC viewer: TigerVNC Viewer (Windows, macOS, Linux), RealVNC Viewer, Remmina on Linux, or the built-in Screen Sharing app on macOS
Recommended VM Size: Standard_B2ms (2 vCPU, 8 GB RAM) or larger. Measured on this image, the login screen alone uses about 400 MiB of memory, and one idle GNOME VNC session brings the total to roughly 900 MiB. Standard_B2ms therefore leaves comfortable room for a browser and a few applications. There is no GPU requirement, because the desktop renders in software.
Deploy the Virtual Machine
Option A: Azure Portal
- Go to the Azure Marketplace and search for "Ubuntu 22.04 LTS with GNOME Desktop SecureAnyCloud"
- Select the image, then select Create
- Configure the basics:
- Subscription: Select your Azure subscription
- Resource Group: Create new or select existing
- Virtual Machine Name: Enter a name for your VM
- Region: Select your preferred Azure region
- Size:
Standard_B2msor larger - Under Administrator Account, select SSH public key and enter your key
- Under Inbound Port Rules, allow SSH (port 22) only. Do not open any VNC port: the desktop is reached through an SSH tunnel
- Select Review + Create, then select Create
Option B: Azure CLI
Run these commands on your own workstation, substituting your own resource group, VM name and preferred region. Accept the Marketplace terms once per subscription, then create the machine:
az vm image terms accept --urn sac1647283583153:ubuntu-22-04-gui:default:latest
az vm create \
--resource-group myResourceGroup \
--name my-ubuntu-desktop \
--image sac1647283583153:ubuntu-22-04-gui:default:latest \
--size Standard_B2ms \
--admin-username azureuser \
--generate-ssh-keys \
--public-ip-sku StandardConnect via SSH
Run these commands on your own workstation, not on the VM. Find the public IP address, then connect:
az vm show --resource-group myResourceGroup --name my-ubuntu-desktop --show-details --query publicIps -o tsv ssh azureuser@<vm-ip>There is no password to enter. If SSH asks for one, your client is offering a different key from the one you supplied at creation time.
Confirm the release and the desktop
Check that the machine runs Ubuntu 22.04 and boots to the graphical target. Also check that the GNOME login screen (GDM) is running with Wayland disabled, and see which desktop and VNC packages are installed:
lsb_release -ds uname -srm systemctl get-default systemctl is-active gdm.service grep '^WaylandEnable' /etc/gdm3/custom.conf dpkg-query -W -f='${Package} ${Version}\n' ubuntu-desktop-minimal gdm3 gnome-shell mutter-common xserver-xorg-core tigervnc-standalone-serverExpected output:
Ubuntu 22.04.5 LTS Linux 6.8.0-1067-azure x86_64 graphical.target active WaylandEnable=false ubuntu-desktop-minimal 1.481.5 gdm3 42.0-1ubuntu7.22.04.4 gnome-shell 42.9-0ubuntu2.3 mutter-common 42.9-0ubuntu9 xserver-xorg-core 2:21.1.4-2ubuntu1.7~22.04.16 tigervnc-standalone-server 1.12.0+dfsg-4ubuntu0.22.04.1The desktop comes from Ubuntu's main component and TigerVNC from universe, both from Canonical's own archive. Nothing comes from a third-party repository:
echo "packages installed: $(dpkg-query -W -f='${Package}\n' | wc -l)" apt-cache policy ubuntu-desktop-minimal | sed -n '4,6p' apt-cache policy tigervnc-standalone-server | sed -n '4,6p' df -h /Check that VNC is off
A new virtual machine has VNC switched off. The helper shows the full VNC status with one command:
sudo sac-vnc statusExpected output on a new VM:
VNC policy: localhost only, security types TLSVnc,VncAuth (/etc/tigervnc/vncserver-config-mandatory) VNC desktops configured: none listening on VNC ports 5900-5999: none users with a VNC password set: none (each user runs: vncpasswd)The helper lives at /usr/local/sbin/sac-vnc, with /usr/sbin/sac-vnc as a symlink so that sudo sac-vnc works whatever sudo's secure_path happens to be. Its subcommands are status, enable [<user>], disable [<user>] and details. The <user> argument defaults to your administrator account.
Also confirm the policy and the network side:
grep -vE '^#|^$' /etc/tigervnc/vncserver-config-mandatory
sudo ss -tln | awk '$1=="LISTEN"{print $4}' | sort echo "off-box listeners: $(sudo ss -tln | awk '$1=="LISTEN"{print $4}' | grep -vcE '^(127\.|\[::1\])' || true)"The first-boot details for this VM are readable by root:
sudo sac-vnc detailsBy design, that file contains no password. TigerVNC has no per-machine server secret, and both of the secrets involved are yours to choose.
Set your two passwords
Set your account password first. The desktop asks for it when the screen locks and when an application needs administrator rights:
sudo passwd azureuserThen set your VNC password. Run this without sudo, as your own user, because it writes into your own home directory:
vncpasswdAnswer n when it offers a view-only password, unless you want one. Only the first 8 characters of a VNC password are significant.
Check that the password file was written and is readable only by you. Resolving the path from the first-boot details file works whether you run the command as yourself or with sudo.
VNCUSER="$(sudo awk -F= '/^VNC_USERNAME=/{print $2}' /root/sac-vnc-details.txt)"
sudo ls -l "$(getent passwd "$VNCUSER" | cut -d: -f6)/.vnc/passwd"Start your VNC desktop
Enable the desktop for your user:
sudo sac-vnc enable azureuserThe helper picks the first free display, adds the mapping to /etc/tigervnc/vncserver.users, starts tigervncserver@:1.service, waits for the port, and then checks that the port is bound to localhost only. If it is not, the helper stops the desktop again and tells you.
Expected output:
VNC desktop for azureuser enabled on display :1: listening on localhost port 5901 only from your own machine: ssh -N -L 5901:localhost:5901 azureuser@<vm-ip> then point a VNC viewer at localhost:5901 and enter azureuser's VNC passwordCheck what is now running:
sudo sac-vnc status
sudo ss -tln | awk '$1=="LISTEN"{print $4}' | grep 5901 || echo "no VNC desktop running"Connect through an SSH tunnel
Run this command on your own workstation, not on the VM. It opens a tunnel and stays in the foreground, so leave it running.
ssh -N -L 5901:localhost:5901 -o ServerAliveInterval=60 azureuser@<vm-ip>The ServerAliveInterval option matters. Without it, an idle SSH tunnel to an Azure VM is dropped after about four minutes.
Point your VNC viewer at localhost:5901 and enter your VNC password. TigerVNC Viewer warns that the certificate is not signed by a known authority. This warning is expected, because the connection uses anonymous TLS inside a tunnel that your SSH key has already authenticated.
Use the desktop
The VNC session logs you straight into GNOME as your own user, at 1920x1080 by default. The dock is on the left, and the Activities overview is in the top-left corner.
To change the resolution, create ~/.vnc/tigervnc.conf with your own geometry and restart the desktop:
mkdir -p ~/.vnc printf '$geometry = "2560x1440";\n1;\n' | tee ~/.vnc/tigervnc.confsudo sac-vnc disable azureuser
sudo sac-vnc enable azureuserYou cannot change the localhost and security type settings this way. The mandatory policy file is loaded after your configuration and overrides both.
Desktops for more users
Each user gets a desktop of their own, on their own display and port. Create the account and give it a password. Let that user set their own VNC password, then enable the desktop:
sudo adduser alice
sudo passwd alice
sudo -u alice -i vncpasswd
sudo sac-vnc enable aliceThe user alice gets display :2 on port 5902. Tunnel to that port the same way.
Turn VNC off again
Disable the desktop for your user:
sudo sac-vnc disable azureuserThis command stops the session, removes the mapping and the boot-time enablement, and confirms that nothing is listening on the port any more. Your passwords are untouched, so turning VNC back on takes one command.
Verify the security posture
SecureAnyCloud runs these checks on every build. Run them yourself on a new machine as well.
No account has a usable password before you set one, and the root account is locked:
sudo awk -F: '{h=$2; sub(/^!+/,"",h); if (h ~ /^\$[0-9a-z]+\$/) print $1}' /etc/shadow | sed 's/^/usable password: /' || true echo "accounts with a usable password: $(sudo awk -F: '{h=$2; sub(/^!+/,"",h); if (h ~ /^\$[0-9a-z]+\$/) print $1}' /etc/shadow | grep -c . || true)"
sudo passwd -S rootSSH is key only:
sudo sshd -T | grep -E '^(passwordauthentication|kbdinteractiveauthentication|permitrootlogin) 'Nothing but SSH is reachable from off the machine:
echo "off-box TCP ports: $(sudo ss -tln | awk '$1=="LISTEN"{print $4}' | grep -vE '^(127\.[0-9.]+|::1|\[::1\])(%[a-z0-9]+)?:' | sed -E 's/.*:([0-9]+)$/\1/' | sort -un | tr '\n' ' ')"The screen-scraping server that CVE-2026-34352 concerns is not installed:
echo "tigervnc-scraping-server installed: $(dpkg -s tigervnc-scraping-server >/dev/null 2>&1 && echo yes || echo no)"
echo "x0vncserver present: $([ -e /usr/bin/x0vncserver ] && echo yes || echo no)"xrdp, whose 22.04 fixes are available only through Ubuntu Pro, is not installed:
echo "xrdp installed: $(dpkg -s xrdp >/dev/null 2>&1 && echo yes || echo no)"No installed package needs an Ubuntu Pro subscription to stay patched. This is the most important check on a 22.04 image. The command apt list --upgradable does not answer it, because fixes that are available only through Pro never appear there:
sudo pro security-status --format json | python3 -c 'import json,sys; s=json.load(sys.stdin)["summary"]; print("packages needing Ubuntu Pro (esm-infra):", s["num_esm_infra_updates"]); print("packages needing Ubuntu Pro (esm-apps):", s["num_esm_apps_updates"]); print("universe packages installed:", s["num_universe_packages"]); print("main packages installed:", s["num_main_packages"])'Expected output:
packages needing Ubuntu Pro (esm-infra): 0 packages needing Ubuntu Pro (esm-apps): 0 universe packages installed: 6 main packages installed: 1174The six universe packages are TigerVNC's three, one Perl module that TigerVNC uses, and two that Ubuntu Server already carried. Everything else, the whole desktop included, comes from main.
The desktop cannot suspend the machine:
busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager CanSuspend busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager CanPowerOffCanSuspend answers na and CanPowerOff answers yes.
Patching and updates
The machine applies security updates automatically. Confirm that the service and the periodic settings are enabled:
systemctl is-enabled unattended-upgrades.service apt-config dump | grep -E 'APT::Periodic::(Update-Package-Lists|Unattended-Upgrade)'To check and apply updates by hand:
sudo apt-get update apt list --upgradable 2>/dev/null | tail -n +2 | wc -lsudo apt-get -y dist-upgradeA kernel update needs a restart, which ends any VNC session. Check whether a restart is required, restart from SSH, and then start your desktop again:
[ -f /var/run/reboot-required ] && echo "restart required" || echo "no restart required"Desktop applications you add yourself follow the same route. Firefox is deliberately not preinstalled. On Ubuntu it is a snap, and installing it at build time would bake this machine's snap identity into every copy of the image. Install it on your own machine when you want it:
sudo snap install firefoxNetworking, the firewall, and services that ship switched off
The image ships no firewall rules of its own. Your Azure Network Security Group is the boundary, and it should allow port 22 only. Do not open a VNC port: doing so would expose a protocol whose password is truncated to 8 characters.
Printing and network discovery daemons are not installed on this profile, so nothing is listening for them. If you want them, install them in the usual way and remember that they add listening ports. Check their state with:
echo "cups-daemon installed: $(dpkg -s cups-daemon >/dev/null 2>&1 && echo yes || echo no)"
echo "avahi-daemon installed: $(dpkg -s avahi-daemon >/dev/null 2>&1 && echo yes || echo no)"The network is managed by systemd-networkd, pinned by /etc/netplan/00-network-manager-all.yaml:
netplan get network.renderer networkctl status eth0 | grep -E 'State:|Online state:' || trueVerify what you are running
Run this command to confirm the release, the desktop and the VNC state:
lsb_release -ds systemctl get-default systemctl is-active gdm.service graphical.target
sudo sac-vnc status echo "failed units: $(systemctl --failed --no-legend | wc -l)"Common Use Cases
- Cloud workstation. A full GNOME desktop on a long-term support Ubuntu release, close to your cloud resources and reached only through an SSH tunnel.
- Graphical administration. Database and cloud consoles, diagramming, and tools that have no command line equivalent.
- Training and lab desktops. One desktop per user on its own display and port, each with its own two passwords.
- Secure jump desktop. A machine that exposes nothing but SSH, from which you reach the rest of a private network.
Troubleshooting
"Connection refused" on localhost:5901
Either the tunnel is not up or the desktop is not running. Run sudo sac-vnc status on the VM. Also check that the ssh -N -L command on your workstation is still in the foreground and has not exited.
The viewer says "Authentication failure"
The VNC password is wrong. Only the first 8 characters count, so two passwords that share their first 8 characters are the same password. Reset it by running vncpasswd as your own user.
Connecting directly to the VM's public IP on port 5901 does not work
This is by design. The VNC server binds 127.0.0.1 and ::1 only, and the policy that enforces this is loaded after every user configuration. Use the SSH tunnel.
The tunnel drops after a few minutes
Azure closes idle connections at about four minutes. Add -o ServerAliveInterval=60 to the ssh -N -L command.
The screen is locked and asks for a password
The prompt is for your account password, not your VNC password. If you have not set an account password, open a second SSH session and run sudo passwd <your-user>.
The desktop does not start for a user
sac-vnc enable refuses to run when the account has no password or the user has no VNC password, and it says which. If both are set and the desktop still fails to start, read the output of journalctl -u tigervncserver@:1 and the log in that user's ~/.vnc/ directory.
"This connection is not secure" in TigerVNC Viewer
This warning is expected. The VNC layer uses anonymous TLS, so there is no certificate to verify, and the connection is already inside an SSH tunnel that is authenticated with your key.
Cannot connect via SSH
Check that the NSG allows port 22 from your address, that the VM is running, and that your client is offering the key you supplied at creation time. There is no password login to fall back on.
Important Notes
- Do not delete
/etc/netplan/00-network-manager-all.yaml. The Ubuntu desktop metapackage depends onubuntu-settings, which declaresrenderer: NetworkManagerfor the whole netplan configuration. This image does not install NetworkManager, so that file in/etcshadows the declaration and keeps the network onsystemd-networkd. If you remove the file, the machine loses its network on the next restart. - Ubuntu 22.04 LTS receives free security updates until 1 June 2027. Plan a move to 24.04 LTS before then.
- Only the first 8 characters of a VNC password are significant.
- Firefox is not preinstalled on purpose. Install the snap yourself when you want it.
- The image ships with no account password and no VNC password. Both are yours to set.
Support
SecureAnyCloud provides 24/7 support for this image. Contact support through the Azure Marketplace listing or at secureanycloud.com.
Deploy on Azure
Launch Ubuntu 22.04 LTS with GNOME Desktop on Azure with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com