## Getting Remote Desktop Server to work on Cinnamon Desktop

xrdp+xorg is a huge pain in the butt as it does not account for variations in systems properly (or automatically) so often it breaks out of the box.

First of all, if you are using cinnamon (including Ubuntu Cinnamon Remix, I suspect it is the same for Linux Mint too), you will run into this shit after successfully logging in:

This is a GNOME session crash. The information on the web points to some other modes of failure in ArchLinux and the like. That’s not the reason. By going through my own notes on xrdp, I noticed the gut of /etc/xrdp/startwm.sh is to call the executable script /etc/X11/Xsession:

test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession

However /etc/X11/Xsession in term look plough through a bunch of scripts in /etc/X11/Xsession.d folder and one step was to look for the executable script ~/.xsession, which is not established by default! For some reason the Xsession scripts can figure out the local desktop environment but not when it’s launched through xrdp!

So the solution is to make an executable script ~/.xsession with just one call to cinnamon-session and that’s it!

I initially thought the call was just ‘cinnamon’ because the most popular answer in the Stack Exchange page suggested writing to ~/.Xclients but this redirection was now obsolete and they use ~/.xsession instead:

but when I did that, the desktop loads but there are no icon and the theme colors are way off. The answer was buried here in a comment in one of the answers:

If you want this behavior to be universal across all user (don’t have to establish the ~/.xsession for each user), and is ok with hard-coding to stick to Cinnamon desktop for everybody including local users (i.e. no redirection script to figure out based on context and conditional config files), you can just replace the last two lines of /etc/xrdp/startwm.sh, which calls /etc/X11/Xsession, with simply cinnamon-session.

Geeze! Why does every basic feature in Windows has to turn into a freaking research project in Linux. I’ve wasted so many hours compiling XRDP from scratch from the author’s webpage thinking it’d solve the problem because he had many tutorials for a lot of cases that xrdp breaks out of the box. Turns out they didn’t matter: it’s just that xrdp couldn’t figure out the right desktop environment so it crashed after loggint in through xorg!

30 total views,  1 views today

## Linux WTF – KDE on Ubuntu and how to get rid of it.

I had quite a bit of trouble getting Cinnamon to work with xrdp (Remote Desktop Protocol for Linux) to work and was misguided to try out other Desktop environments such as KDE. I couldn’t be more displeased about how unfinished and poorly integrated KDE is.

Linux, no matter how good the programmers are with the core code with multiple people’s scrutiny, never had a proper QA team to take care of integration. Linux in 2022 is still like assembling a PC in the 1990s: I’d be super lucky if everything worked out at the first try after very careful planning and knowing every step of the way. There’s always something that just breaks out of the box for the most obvious use cases.

First I installed the ‘kde-full’ package, chose sddm, and rebooted to find out my 4k screen was covered by a giant freaking on screen keyboard:

What the fuck? It’s trying to be smart-ass accommodating handheld devices yet it’s not smart enough to figure that it’s a desktop computer with a keyboard, so it ended up with shitty out of the box behavior that nobody wants under any circumstances!

After I clicked the bottom down keyboard icon to close to the damn on screen keyboard, it keeps popping up as I set the focus to the edit box to type my password so I have to close it again. Aargh!

Once I get into the plasma desktop, the window designed looked like BeOS so I think I cannot accept anything less than Cinnamon for now, so I wanted out. I thought just removing the same ‘kde-full’ package will put me back to where I was, but hell no! I’m still stuck with that ugly and confusing welcome screen and my software menu was cluttered with a boatload of KDE default apps that I do not want!

After a bit of digging around, I’m not the only one perplexed by this behavior. Turns out there’s a lot of clean up the uninstaller didn’t do! That’s why Windows has installer instead of package managers. One size does not fit it all. Installing something just to find out that uninstalling it immediately right after doesn’t put you back to where you were is deeply frustrating.

I adapted his tutorial uninstalling KDE with Ubuntu Cinnamon Remix:

# The desktop is still not removed even if you did "sudo apt remove kde-full"
sudo apt remove plasma-desktop --autoremove
# Default apps the came with KDE and plasma desktop are still there
sudo apt-get remove kde* --autoremove
sudo apt-get remove plasma* --autoremove
# This will give you a menu to pick the old splash screen (it's called plymouth)
sudo update-alternatives --config default.plymouth

# Reflect changes in early startup scripts (initramfas) and boot loader (grub)
sudo update-initramfs -u
sudo update-grub
# Stop and remove SDDM service to get back the old lockscreen
sudo systemctl disable sddm
# Note that you might be thrown out to text mode when you stop SDDM
# Switch to other virtual consoles (e.g. Ctrl+Alt+F2) and run startx to get to the GUI
sudo systemctl stop sddm
# Delete SDDM
sudo apt-get remove --auto-remove sddm
# Clean up SDDM
sudo apt-get purge --auto-remove sddm

# Message in SDDM removal suggests reconfiguring lightdm
# (lightdm is Cinnamon's default greeter)
# Don't need to systemctl enable/start, that's for GDM3
sudo dpkg-reconfigure lightdm

# Reboot
reboot

30 total views