Score:1

Ubuntu 18.04 xrdp "Fix" Broke Everything

sv flag

I have a Ubuntu 18.04 box I remotely access using xrdp. I noticed at login I kept getting this "Authentication is required to create a color profile/managed device" message whenever I logged in.

To fix this, I googled the problem and came upon this guide. Which basically had me create a file /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla

Upon logging out and logging back in, the color profile message went away, but so many things are now messed up. The desktop background image changed, Ubuntu asks me to upgrade to a newer version every 5 minutes, "favorites" in the taskbar cannot be saved and it just has the default items there, my terminal keeps saying "/bin/ls: cannot access 'thinclient_drives': Transport endpoint is not connected", my terminal colorscheme was replaced with the default, and so many more little things like that.

I deleted the file I created above, but even after logging on/off, these annoying thing still persist.

Any help would be appreciated. I have no idea what is going on.

Thank you

Score:1
tt flag

Not fully understanding the issue...but if the problem is that when you remote login via xrdp, you have the default gnome desktop interface....this is expected if you have simply installed xrdp package using sudo apt-get install xrdp

After installing xrdp on ubuntu, you need to perform some post actions configuration in order to have something that look like the Ubuntu desktop... So in a nutshell, you need to perform the following

Step 1 - create a file that will configure your desktop within the remote session

Simply issue the following command within the session of the user that will be performing the remote session

touch ~/.xsessionrc

Then populate this file with the following content (assuming you are using Ubuntu desktop - the one with the Dock on the left side)

export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg

Step 2 - Configure Polkit to avoid repetitive popup

You will also need to create some other files to avoid annoying authentication popup. This was the file you created originally and it is needed to avoid repetitive popups... This is not breaking your look and feel...but tackle some security settings on your ubuntu system

Open a terminal console on your ubuntu and copy/paste this code below

sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla" <<EOF
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF

After that, you should be good to go and have something similar to the your desktop

An important point- you cannot have the same user connecting at the same time locally on the machine and remotely. So, if you need to remote connect with userA, ensure that userA is not locally connected on Ubuntu machine

Finally, please note that we have developed a small script that ease installation and configuration of xrdp on Ubuntu. If you want to give it a try, you can have a look at our blog and test it (see this post for all instructions)

Hope this help Till next time

Hart Russell avatar
sv flag
Thank you for trying to help. Unfortunately this did not fix all the strange errors I am seeing. If I had to guess, something is affecting polkit from working properly.
Griffon avatar
tt flag
Hello, Thanks for the feedback...So at this stage, not sure how to help...maybe you could first try to have xrdp working on a new machine (or VM), see if this is working (you could use the script)...if this is working, maybe you would need to re-install your problematic machine (if possible) and see if you can get xrdp working..... till next time
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.