canonical / canonical/ubuntu-cloud-docs
"Launch an Ubuntu desktop on EC2" procedure does not work on Ubuntu 26.04
- Dominant language
- No language data
- Stars
- 24
- Forks
- 67
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 22
Description
Page: https://ubuntu.com/aws/docs/aws-how-to/instances/launch-ubuntu-desktop/
Source: docs/aws/aws-how-to/instances/launch-ubuntu-desktop.rst
Affected: Ubuntu 26.04 LTS (resolute). Ubuntu 24.04 LTS is not affected.
Summary
Following the guide verbatim on Ubuntu 26.04 produces an RDP server that authenticates
successfully and then immediately terminates the session. The RDP client connects, the
user enters valid credentials, and the connection closes within roughly 400 ms.
The cause is not xrdp. It is that the guide's "Configure the Ubuntu session" step
prescribes a GNOME-on-Xorg session, which GNOME 50 (shipped in 26.04) no longer supports
under any configuration.
The page currently instructs readers to retrieve a 26.04 AMI, so a reader following it
today lands on the broken path by default.
Reproduction
Two EC2 instances, same instance type and security group (22 + 3389), built by following
the published guide end to end with no deviations:
| Ubuntu 24.04 LTS | Ubuntu 26.04 LTS
-- | -- | --
Result | Desktop loads normally | Session closes immediately after password
gnome-session-bin | 46.0-1ubuntu4 | 50.1-0ubuntu0.1
xrdp | 0.9.24-4 | 0.10.1-4.1
xorgxrdp | 1:0.9.19-1 | 1:0.10.2-1build1
/etc/xrdp/startwm.sh, /usr/local/bin/ubuntu-session, and the x-session-manager
alternative are byte-identical on both hosts. The only material difference is the GNOME
version.
Root cause
On 26.04, /usr/lib/systemd/user/org.gnome.Shell@.service line 15 ships:
AssertEnvironment=XDG_SESSION_TYPE=wayland
The guide's wrapper is invoked through /etc/X11/Xsession, which runs with
XDG_SESSION_TYPE=x11 because xorgxrdp provides an X server. The assertion evaluates
false, so systemd declines to start GNOME Shell at all.
Because an assertion failure is a refusal rather than a failure, nothing is reported in
~/.xsession-errors, xrdp-sesman.log, or systemctl --user list-units --state=failed,
which makes this difficult to diagnose from the logs a user would normally check.
Cascade, from the systemd user journal:
gnome-session-manager@ubuntu.service: Started
org.gnome.Shell@ubuntu.service: Starting requested but asserts failed.
Assertion failed for org.gnome.Shell@ubuntu.service - GNOME Shell.
Dependency failed for gnome-session@ubuntu.target - GNOME Session (session: ubuntu).
gnome-session@ubuntu.target: Job .../start failed with result 'dependency'.
gnome-session@ubuntu.target: Triggering OnFailure= dependencies.
Reached target gnome-session-shutdown.target - Shutdown running GNOME Session.
graphical-session.target - Current graphical user session is inactive.
Xorg then exits cleanly with no clients (Server terminated successfully (0)), and the
RDP client drops.
xrdp and xorgxrdp are working correctly throughout. The Xorg log shows all modules
loading, matching ABI 25.2, a negotiated RFX session at 1056x761, and functioning input
devices. xrdp-sesman shows PAM opening the session successfully for the user.
The assertion cannot be worked around
gnome-shell on 26.04 has no X11 backend compiled in:
$ strings /usr/bin/gnome-shell | grep -i -c "x11-display\|meta_x11"
0
$ gnome-shell --help | grep -i -E 'x11|wayland'
--wayland Run as a wayland compositor
--no-x11 Run wayland compositor without starting Xwayland
--wayland-display Specify Wayland display name to use
There is no --x11 option and no X11 symbols. Overriding the assertion would move the
failure later rather than resolve it.
This matches the upstream change: GNOME 49 disabled the X11 session and GNOME 50 removed
the majority of the supporting code. Canonical announced the corresponding removal of the
Xorg-based Ubuntu session in 25.10, ahead of the 26.04 LTS.
Second defect in the same section
The wrapper exports:
export DESKTOP_SESSION=ubuntu-xorg
export XDG_SESSION_DESKTOP=ubuntu-xorg
On 26.04, /usr/share/xsessions/ does not exist. Only
/usr/share/wayland-sessions/ubuntu.desktop ships. On 24.04 both ubuntu-xorg.desktop
and ubuntu.desktop are present under /usr/share/xsessions/.
These variables therefore reference a session that is not installed.
Third observation
gnome-remote-desktop (50.2-0ubuntu0.1) is installed automatically as a dependency of
ubuntu-desktop on 26.04. The guide directs readers to install and configure a separate
RDP server that cannot work, when a supported one is already present.
Why 24.04 is unaffected
/usr/lib/systemd/user/org.gnome.Shell@.service does not exist on 24.04. Under GNOME 46,
gnome-session managed the session itself, so there was no systemd unit and no assertion.
GNOME 50 delegates session management to systemd, which the 26.04 journal states directly:
gnome-session-service: App at-spi-dbus-bus.desktop sets X-GNOME-Autostart-Phase,
but gnome-session no longer manages session services
The mechanism the guide depends on was replaced, not merely reconfigured.
Proposed fix
Replace the xrdp + custom-session procedure with gnome-remote-desktop in system
(remote login) mode for 26.04.
I have validated a replacement procedure on a clean 26.04 instance built from a bare AMI
with xrdp never installed: ubuntu-desktop, reboot, passwd ubuntu, then GRD
configuration. It connects successfully and survives reboot with the service starting
unattended.
Notes from that validation that a rewrite should account for:
grdctlin GNOME 50 has aset-auth-methodssubcommand not present in earlier
versions. The man page states at least one auth method must be set.credentialsis
the default on a fresh install, but setting it explicitly is clearer.sudo systemctl enable --now gdm.serviceis unnecessary and misleading. GDM starts via
thedisplay-manager.servicealias created byubuntu-desktop. Running the enable and
then checkingsystemctl is-enabled gdm.servicereturnsdisabled, which reads as a
failed step.systemctl is-enabled display-manager.servicereturnsalias.grdctlprintsInit TPM credentials failed because No TPM device found, using GKeyFile as fallbackon every invocation. EC2 instances have no TPM by default. This
is informational; a note would save readers investigating it.- Remote login requires two authentications: the GRD system credentials, then the user's
own credentials at the GDM screen. This differs from the single prompt under xrdp and
should be stated. - GNOME displays a remote-desktop indicator in the top bar with a stop control that ends
the session when clicked. Worth mentioning, as it is new to users migrating from xrdp.
Before opening a PR I would like to know whether a version-split section
(24.04 vs 26.04) or a full replacement of the RDP sections is preferred.
If any logs or details are required, let me know. I regularly use disposable VM and found the setup broke for Ubuntu 26.04 one :).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with docs/aws/aws-how-to/instances/launch-ubuntu-desktop.rst and compare its current xrdp and custom-session steps with the validated 26.04 procedure described in the issue. Test the revised instructions on a clean Ubuntu 26.04 EC2 instance and confirm that the guide works there while retaining accurate guidance for Ubuntu 24.04.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, shell, ubuntu
- Domain
- cloud, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100