<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Frederik Frey on Medium]]></title>
        <description><![CDATA[Stories by Frederik Frey on Medium]]></description>
        <link>https://medium.com/@frederik_frey?source=rss-8035d5c28ec2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vxHlucBUvemVgaMxI2q0sQ.jpeg</url>
            <title>Stories by Frederik Frey on Medium</title>
            <link>https://medium.com/@frederik_frey?source=rss-8035d5c28ec2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 16:46:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@frederik_frey/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Fix Remote Desktop (xrdp + GNOME) After Upgrading to Ubuntu 24.04]]></title>
            <link>https://medium.com/@frederik_frey/how-to-fix-remote-desktop-xrdp-gnome-after-upgrading-to-ubuntu-24-04-959f30ffcb0c?source=rss-8035d5c28ec2------2</link>
            <guid isPermaLink="false">https://medium.com/p/959f30ffcb0c</guid>
            <category><![CDATA[ubuntu-24-04]]></category>
            <category><![CDATA[upgrade]]></category>
            <category><![CDATA[ubuntu-22-04]]></category>
            <category><![CDATA[remote-working]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Frederik Frey]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 07:38:45 GMT</pubDate>
            <atom:updated>2026-06-17T07:38:45.324Z</atom:updated>
            <content:encoded><![CDATA[<p>After upgrading from Ubuntu 22.04 to 24.04, many users find themselves locked out of their remote desktop. The screen stays black, connections drop immediately, or the session crashes within seconds. This guide documents every step of the troubleshooting process — including the dead ends — so you don’t have to go through them alone.</p><h3>The Problem</h3><p>Ubuntu 24.04 made several significant changes under the hood:</p><ul><li>GNOME now defaults to <strong>Wayland</strong>, which xrdp does not support</li><li>The display manager changed behavior around <strong>GDM3</strong></li><li><strong>gnome-settings-daemon</strong> installs its .desktop files to /etc/xdg/autostart/ instead of /usr/share/applications/, where gnome-session expects them</li><li>A missing package — <strong>dbus-x11</strong> — prevents gnome-session from starting entirely</li></ul><p>The result: xrdp connects, but you see a black screen or the session drops immediately.</p><h3>Prerequisites</h3><p>Before you start, make sure you can reach the machine via <strong>SSH</strong>. If your remote desktop is broken, SSH is your lifeline:</p><pre>ssh username@ip-address</pre><h3>Step 1: Install and Verify xrdp</h3><pre>sudo apt install xrdp<br>sudo systemctl enable --now xrdp<br>sudo systemctl status xrdp</pre><p>xrdp should show as active (running). If it does but connections still fail, continue below.</p><h3>Step 2: Switch from GDM3 to LightDM</h3><p>GDM3 starts its own gnome-session as the gdm user on tty1. This session holds D-Bus names that conflict with your xrdp session, causing immediate crashes.</p><p>Switch to LightDM:</p><pre>sudo apt install lightdm<br>sudo dpkg-reconfigure lightdm</pre><p>Select <strong>lightdm</strong> when prompted, then:</p><pre>sudo systemctl restart xrdp</pre><h3>Step 3: Disable Wayland</h3><p>gnome-shell refuses to start under xrdp when Wayland is active. Force X11:</p><pre>sudo sed -i &#39;s/#WaylandEnable=false/WaylandEnable=false/&#39; /etc/gdm3/custom.conf</pre><h3>Step 4: Fix Missing gnome-settings-daemon Desktop Files</h3><p>gnome-session looks for settings daemon components in /usr/share/applications/, but Ubuntu 24.04 installs them to /etc/xdg/autostart/. Create symlinks:</p><pre>sudo ln -s /etc/xdg/autostart/org.gnome.SettingsDaemon.*.desktop /usr/share/applications/</pre><h3>Step 5: Install the Missing Package — dbus-x11</h3><p>This is the key fix. Without dbus-launch, gnome-session silently exits with code 1 and no error output whatsoever:</p><pre>sudo apt install dbus-x11</pre><h3>Step 6: Configure ~/.xsession</h3><p>Create the correct session startup file:</p><pre>cat &gt; ~/.xsession &lt;&lt; &#39;EOF&#39;<br>export GNOME_SHELL_SESSION_MODE=ubuntu<br>export XDG_CURRENT_DESKTOP=ubuntu:GNOME<br>export XDG_SESSION_TYPE=x11<br>export XDG_SESSION_CLASS=user<br>export LIBGL_ALWAYS_SOFTWARE=1<br>exec dbus-launch --exit-with-session gnome-session --session=ubuntu<br>EOF</pre><h3>Step 7: Reinstall ubuntu-session</h3><p>The upgrade may have lost some systemd session units. Reinstall to restore them:</p><pre>sudo apt install --reinstall ubuntu-session<br>systemctl --user daemon-reload</pre><h3>Step 8: Restart and Connect</h3><pre>sudo systemctl restart xrdp</pre><p>Connect with your RDP client (Windows Remote Desktop, Remmina, etc.) to port 3389.</p><h3>Why This Is So Hard to Debug</h3><p>The most frustrating part of this issue is that gnome-session exits with code 1 and produces <strong>zero output</strong> when dbus-x11 is missing. No log entry, no error message — just silence. Standard debugging steps (checking journalctl, xsession-errors, running gnome-session --debug) all point to different suspects before the real culprit emerges.</p><p>The full chain of issues:</p><ol><li>GDM3 blocks D-Bus names needed by the user session</li><li>Wayland blocks gnome-shell from starting</li><li>Settings daemon desktop files are in the wrong location</li><li>dbus-launch is missing, causing gnome-session to exit silently</li></ol><p>All four need to be fixed together.</p><h3>Fallback: XFCE + xrdp</h3><p>If GNOME over xrdp remains unstable on your hardware, XFCE is a rock-solid alternative:</p><pre>sudo apt install xfce4 xfce4-goodies<br>echo &quot;startxfce4&quot; &gt; ~/.xsession<br>sudo systemctl restart xrdp</pre><p>XFCE works reliably with xrdp on Ubuntu 24.04 out of the box.</p><h3><strong>Summary of Fixes</strong></h3><ul><li><strong>Session drops immediately</strong> → Switch from GDM3 to LightDM (sudo dpkg-reconfigure lightdm)</li><li><strong>Black screen</strong> → Disable Wayland in /etc/gdm3/custom.conf by setting WaylandEnable=false</li><li><strong>gnome-session exits silently with code 1</strong> → Install the missing package dbus-x11</li><li><strong>Settings daemon components not found</strong> → Symlink /etc/xdg/autostart/org.gnome.SettingsDaemon.*.desktop to /usr/share/applications/</li><li><strong>gnome-shell crashes on start</strong> → Reinstall ubuntu-session and reload systemd user units</li></ul><p><em>Tested on Ubuntu 24.04 LTS (Noble Numbat) with xrdp 0.9.24 and GNOME 46.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=959f30ffcb0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>