Xrdp shows a blank screen with Ubuntu 18.04, Bionic Beaver

If you are trying to use remote desktop on Ubuntu or Xubuntu 18.04 you may find that after logging in all you see is a blank screen.

One cause of this is that xfce4 has added code that prevents a second session from opening. You will find that if your computer's main screen is logged into xfce4 you may not be able to use it with xrdp.

To solve this "second session" problem and allow as many sessions as you need, edit /etc/xrdp/startwm.sh and add these lines before the lines that test and execute Xsession. The $HOME/.profile is not part of the solution, but is something that should be run before starting the session anyway.

unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
. $HOME/.profile

40 comments:

  1. thank you, this is work like a charm ;)

    ReplyDelete
  2. thanks so much only thing that works!!

    ReplyDelete
  3. For Ubuntu 18.04 Bionic
    This works

    sudo apt-get install xorgxrdp-hwe-18.04
    this installs a compatible xrdp package

    The old version is not compatible and if you have it installed you
    have to:

    sudo apt-get install xserver-xorg-core
    sudo apt-get -y install xserver-xorg-input-all

    This removes the old stuff if you have it installed

    ReplyDelete
    Replies
    1. I followed these steps and lost my entire KDE environment for 18.04 Bionic. I have to reinstall Kubuntu from scratch tomorrow. This suggestion should be removed from this list so that others don't run into the same issue

      Delete
  4. The very sad work around for me is that you can't be logged in locally while trying to use RDP. The 'fix" is to log out locally and RDP works fine. Wow.

    https://github.com/neutrinolabs/xrdp/issues/1358

    ReplyDelete
  5. This is still broken all the way through Ubuntu 19 and 20 early builds.

    ReplyDelete
  6. Thank you so much. I just fixed the same issue now on Ubuntu 19.10 Desktop. Regards.

    ReplyDelete
  7. https://www.nakivo.com/blog/how-to-use-remote-desktop-connection-ubuntu-linux-walkthrough/

    save my day

    ReplyDelete
  8. OMFG, thank you so much for this fix. Huge help for this green linux guy.

    ReplyDelete
  9. you need to install a desktop to xrdp work

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. This worked for me:
    On the R Pi You can add to

    /etc/X11/Xwrapper.config

    the following line

    allowed_users = anybody

    ReplyDelete
  12. If I may suggest, use X2GO instead of the pre-installed windows RDP. Its way faster atleast on the Jetson TX2.

    ReplyDelete
    Replies
    1. Thank you for the tip. x2go looks interesting.

      Delete
  13. Thanks! worked with ubuntu 20!

    ReplyDelete
  14. Thank you so much! I finally got the desktop to load but mouse cursor gets stuck on the loading icon. Any ideas on how to fix this?

    ReplyDelete
    Replies
    1. The loading of the desktop pretty much gets stuck.

      Delete
  15. Hell yeah, bro. You rock! Also works for Ubuntu 20.04

    ReplyDelete
  16. It works for me: https://vinnyfs89.gitbook.io/knowledge/technology/operational-systems/linux/how-to#remote-access-using-the-xrdp-package

    Look at these lines below:

    ```sh
    # Allow firewall access on port 3389
    ufw allow 3389

    # Change "allowed_users" to anybody
    # like this: allowed_users=anybody
    vim /etc/X11/Xwrapper.config
    ```

    ReplyDelete
    Replies
    1. I am not sure what you are saying here.

      Are you able to login to xrdp when you are already logged into the main screen? If not you need the solution here.

      Delete
  17. perfect it works on ubuntu 20.10 also, thank you

    ReplyDelete
  18. perfect it works on ubuntu 20.10 also, thank you

    ReplyDelete
  19. This is awesome ! Saved my day on Ubutnu 20.04, thanks so much !!!

    ReplyDelete
  20. the file only has read permission it wont even allow me to replace the file

    ReplyDelete
  21. 2-23-2120

    Works Dandy!! This has been bugging me for ages! I LOVE Ubuntu, but always gave up on it not able to remote desktop in...

    ReplyDelete
  22. It works on Unbuntu Server 20.4 with Cinnamon. Thank you so much. I wish I had found this 2 days ago.

    ReplyDelete
  23. work for Ubuntu 20.10 64 bit raspberry 4

    ReplyDelete
  24. Worked on Debian GNU/Linux 10 (buster)
    Get asked to create a color managed profile though ...

    ReplyDelete
  25. These two links have been helpful to eliminate all popups:
    https://askubuntu.com/questions/1193810/authentication-required-to-refresh-system-repositories-in-ubuntu-19-10
    http://c-nergy.be/blog/?p=12043

    ReplyDelete