XRDP or any other remote desktop solution loads a different session

I have been trying to connect to my VM via browser and MS RDP MacOS app since it is optimized for M1 MacBook.

Whenever I use XRDP or ThinLinc they seem to load GNOME session and not the Ubuntu themed version.

Also, restart and turn off button are locked and I have to go to terminal and sudo reboot.

ThinLinc connects perfectly and then it doesn’t load Firefox. And a different session and desktop environment like XRDP.

Could you please point me to the right direction?

Asked By: Sam Bahman

||

Answering from the ThinLinc perspective here.

Thinlinc ships with a few different default profiles (That are defined in /opt/thinlinc/etc/conf.d/profiles.hconf).

If multiple desktop environments are installed on your system, it will display a list of available ones upon log on, and let you choose which one to use.

If it’s missing an environment that you know that is installed, you will have to edit said file, and add a correct xdg_session= for it to start from. You can have a look at what the system believes are installed in /usr/share/xsessions

Regarding Firefox. This is an issue in Ubuntu’s Firefox snap package (at least since 20.04) where $XAUTHORITY handling seems to be a bit broken, which results in not being able to display on remote displays. You could for another browser, or remove the snap version of firefox and install it manually.

See https://community.thinlinc.com/t/thinlinc-on-ubuntu-22-04-refuses-to-open-snap-apps-saying-cannot-open-display/401/4 for more information.

About restart / power off, this is likely PolKit blocking access since your session is remote and not local. There are ways around it, but it requires you to enable debug logging on PolKit to catch what rules are blocking, and then writing your policy to allow for this.

Answered By: Martin Östlund