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:

login - "oh no something has gone wrong" after clean install of 19.10 LVM  and making changes - Ask Ubuntu

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 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!

Loading

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:

Fedora 29 graphical login screen (sddm) displays only virtual keyboard -  Unix & Linux Stack Exchange

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

Loading

Ubuntu Cinnamon Remix notes

Fix annoying bash colors

Folders (di) color ($LS_COLOR) are dark blue by default which is hard to read on a default dark background (also default): edit ~/.bashrc and add this to the last line to change folder colors to change it to bold (1) light blue (94)

LS_COLORS=$LS_COLORS:'di=1;94:' ; export LS_COLORS

The default prompt ($PS1) also contains the directory (\w), which is also in dark blue (34) but bold (1) by default. Look for the line right below the $color_prompt flag section and change the color ([\033[<STYLE>;<COLOR>m]) modified before \w from bold dark blue (01;34) to bold light blue (01;94)

if [ "$color_prompt" = yes ]; then 
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;94m\]\w\[\033[00m\]\$ '

Loading

Cinnamon Desktop UI design WTFs (1)

Out of the box, Cinnamon decides to group the taskbar buttons like later Windows did. It’s often a huge annoyance to people who hates context switching in our head (I like huge workspaces that I can see everything at once so I don’t overlook clues from the relationship between things I’m working on. This is how I find difficult twists in research problems that other people give up solving).

In Windows, you right clock the taskbar, get to settings and there’s a pulldown menu for you to decide whether and how the buttons are grouped. Easy. But Cinnamon still have the Linux smell: organize things that are logical to programmers but not users (Tektronix, DD-WRT, etc. does that too), then surprise users with poorly thought out default behavior.

This time it’s a can of worms that requires some web searching to find people with the same exact specific problem (it’s a sign of poor UI design if the users cannot guess from the UI how to do what they want).

  1. Needing to change whether buttons are grouped is common. It should not take a lot of steps to change the behavior, preferably a right click context menu
  1. I would have thought it’s under Panel Settings, but hell no, things has to be organized the way the code was designed (sarcasm). It turns out that the windows button grouping is handled by an Applet called “Grouped Window List”
  1. Some user suggested removing the applet altogether (turns out it’s wrong and unnecessary as turning it off will disable the taskbar altogether and there’s an option to disable it within the applet’s setting: the applet itself is the windows list, not just the grouping feature), but fuck by default the applet was not activated the settings button is dead. I have to go to the bottom navigation bar in the window and hit the ‘+’ sign to get to the settings so now there’s a check mark next to it and the setting (gear) button is now activated.

    They also did not dim the settings button (two gears) when the ‘grouped window list’ is not activated (bug?), which made me think I can configure an Applet that’s not in use. Not to mention the previous settings got cleared (reset) if I disable the Applet and re-enable immediately afterwards (bug?)!
  1. Now I can finally get to turn this shit off
Chris Rock’s #HNTGYAKBTP Step #4 (1. OTL, 2. UCS, 3. SI, 4. TTSO, 5. BP, 6. STFU, 7. GAWF, 8. DRWAMW)
  1. This is where I think the UI design’s really fucked up. After you activate/deactivate the “Grouped windows list” applet, the buttons aligned right instead of left (default)! WTF!?! Do not do shit to surprise users! There’s absolutely no freaking logical reason why the taskbar button alignment should change the default (or the current state) for any reason!
  2. To fix this, you have to so something similar to unlocking the taskbar in Microsoft Windows to move the task button bar. It’s easy in MS Windows as you just right click context menu on the taskbar to unlock and just drag the starting separator (the || bar on the leftmost where the taskbar starts) to specific position you wanted. In Linux/Cinnamon, you have to enter the ‘Panel Edit Mode’ to unlock the taskbar so you can drag things around:
  1. I was confused while dragging the task button bar because there’s no clear position markers of where the task button starts and where it can ‘snap to grid’. It’s easy to drop it to the center to align center, but to align left, you have to watch for the buttons you want to insert before to move around to tell if it was a valid place to drop your new taskbar position What a pain in the butt!

This UI design suck, and I can totally understand why they would do something like this because of my programming background. It’s very logical for the programmer to modularize it as one applet, but first of all, generic suffixes like -let and -get does not help users get what the name means: it’s geeks’ way to name abstract concepts without getting the essence of the use case.

In MS Windows, the ‘Applets’ are organized roughly the same as ‘Toolbar’, except Windows is slightly more specialized that they have a ‘Toolbar’, ‘Start Menu’ and ‘Systray’ as distinct concepts instead of abstracting them into a higher level object as in ‘Applets’.

The biggest gripe I have about Cinnamon’s design choices is that detailed position adjustment needs to be easily accessible it’s likely that user preferences may vary a lot.

  • By not having a separate Toolbar concept, they forgot to add direct ‘unlock grouped windows list (aka tasklist toolbar in MS Windows)’ option (context menu item). You have to click through ‘Preference > Configure’ to get to get to configure the ‘Grouped window list’
  • Since the ‘Grouped window list’ is a (container) ‘bar’ within a bigger’ bar’ (Panel), the position of the window taskbar is logically organized under the platform (the bigger bar, hence the Panel), therefore the unlock window taskbar setting belongs to Panel, not Applet. This makes sense to programmers who knows that the feature is conceptually organized as container objects, but this is hell of confusing for users if they have to reason through this when they are trying to do one of the most common things!
  • Unlike MS Windows, you cannot use the task buttons while you are in Panel edit mode. Panel edit mode (you enter a special mode where you drag objects into positions you like, but cannot actually use them, then freeze it after you leave the mode) is the same concept used in Interactive Broker’s Trader Workstation (TWS), which is a pain in the ass but I understand the massive work saved for the people who designs the code/UI. Of course it comes at the expense of user frustration.
  • The solution article was written in 2018 and I’m surprised I still need that in 2022!

Loading

Thunderbird Quirks

Mail sorts from oldest to newest by default

This design choice escapes me and is highly annoying. Go go Preferences/Settings > Config Editor (the very bottom problem at the page)

It’s called Advanced Preferences tab. Look up mailnews.default_sort_order and change the value from 1 (ascending) to 2 (descending).

You can change the field to sort by mailnews.default_sort_type. By default it’s 18 (sort by date)

Thanks https://markohoven.com/2021/01/06/descending-sort-order-thunderbird/ for the clue.

Loading