16

I've looked around online about this issue and haven't really found anything that helps me. I'm relatively new to Ubuntu and recently set up a tower so that I could connect to it over the internet via xRDP. That aspect of it works fine, but, for some reason, the desktop looks different on the remote login.

The GNOME dock isn't present on the home screen and looks different when I open the activities thing. Plus I'm missing the dock's customization section in the Settings application. That's really all I've immediately noticed, but I also don't have the experience with Ubuntu to really know what else might be missing.

Is there some way to fix this? I only have one user set up on the computer and use it to log in when connecting remotely, I don't know if that's of any importance or not.

2 Answers2

18

We are assuming that you are running Ubuntu 18.04 or later, as you are connecting to the GNOME Desktop. The problem you are describing is expected when you perform a manual installation (with no further actions).

To solve your issue, you have multiple options:

1. Manually change the look and feel within your remote session

This post from my personal blog provides a step by step explanation on what you need to do. In a nutshell:

  1. Install Tweak tool:

    sudo apt-get install gnome-tweak-tool
    sudo apt install gnome-tweaks  # for Ubuntu 22.04 ref. https://askubuntu.com/questions/1233088/xrdp-desktop-looks-different-when-connecting-remotely#comment2580018_1407324
    
  2. Open the tool, go to the Extensions node, and enable the Dock bar.

  3. Go to the Appearance node and select the Theme to be used (often it's Yaru).

2. Create a login script file

Copy the code below into your Terminal console and let it execute. This will create a file called .xsessionrc. This file is kind of a login script that will load your desktop configuration into the remote session. After the file is created, login back to the xRDP session and see if the desktop looks like the one you have when logged on locally.

cat <<EOF > ~/.xsessionrc
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
EOF

3. Use scripted installation

Next time, you perform a xRDP installation, you could use the script that can be found in my personal blog to automate the installation and let it perform for you the post-configuration actions that make the desktop interface look similar when connected locally or remotely through xRDP. There is also a how-to guide provided as well with the script (see the above link).

Please note that the script is updated on a regular base, so please be sure to check if a new version of the script is available.

Nam G VU
  • 2,268
Griffon
  • 2,375
  • 1
    I tried Option 2 and it did not work for me. – SaTa Sep 20 '20 at 15:32
  • Hello, Ok sorry to here that.... are you using Ubuntu 18.04 and gnome desktop ? The command above in option 2 would only work for Ubuntu running the gnome desktop interfaces.... – Griffon Oct 04 '20 at 10:27
  • Thanks. I am using Ubuntu 20.04 with gnome desktop. – SaTa Oct 04 '20 at 12:20
  • The reason it didn't worked for you @SaTa is because of the echo at the beginning of the second line. Try it like this: cat < ~/.xsessionrc export GNOME_SHELL_SESSION_MODE=ubuntu export XDG_CURRENT_DESKTOP=ubuntu:GNOME export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg EOF – Marcel Bernic Jun 01 '21 at 12:18
  • For some reason , the version 1.4.7 from your blog is not working for me. Client window automatically closes after trying to connect. Can you please let me know what I am doing wrong? – McLovin Oct 12 '23 at 12:54
  • ok.. do not know yet... check that the file ~/.xsessionrc is indeed created with the correct content. You can also try this piece of code and see if this is better DesktopVer="$XDG_CURRENT_DESKTOP" SessionVer="$GNOME_SHELL_SESSION_MODE" ConfDir="$XDG_DATA_DIRS" sudo sed -i "4 a #Improved Look n Feel Method\ncat < ~/.xsessionrc\nexport GNOME_SHELL_SESSION_MODE=$SessionVer\nexport XDG_CURRENT_DESKTOP=$DesktopVer\nexport XDG_DATA_DIRS=$ConfDir\nEOF\n" /etc/xrdp/startwm.sh – Griffon Oct 14 '23 at 17:18
  • On Ubuntu 23.10 I found that to enable the dock I had to enter gnome-extensions enable ubuntu-dock@ubuntu.com from this answer https://askubuntu.com/questions/1403431/update-to-22-04-problem-with-dock – brianlmerritt Nov 30 '23 at 10:11
8

The answer above is great, but note that in Ubuntu 22.04 step 1 has changed to:

sudo apt install -y gnome-tweaks

There you just enable the 3 built-in options (Especially the Ubuntu Dock), and you should be good to go.

Joshua K
  • 313
  • 1
    @Pilot6 Incorrect, this absolutely helped with the problem, I'm having exactly the same issue as OP and this helped. I had to combine this solution with the above xsessionrc script to get everything working in xRDP. – Pecacheu Oct 02 '22 at 00:44
  • @Pilot6 what's up with the flagging? This is the second post I've seen you report answers as non-answers that are, in fact, answers. – brandonscript Jun 12 '23 at 14:57
  • 2
    Worth noting that gnome-shell-extension-prefs is in fact deprecated, the only supported version is now gnome-tweaks. – brandonscript Jun 12 '23 at 15:01
  • Please describe in detail what " 3 built-in options" you are referring to. – Robert Feb 26 '24 at 13:07