Search This Blog

Sunday, June 17, 2012

Ubuntu Server 12.04 xrdp failed to load session 'ubuntu'


This error is caused by xrdp trying to run the classic Ubuntu desktop when it is not installed. This can happen when you install Ubuntu server without graphical environment and then install gnome-classic desktop only.

There are 2 files you need to worry about:

/etc/xrdp/startwm.sh

which should have:
. /etc/X11/Xsession
at the end.
(there is a space between '.' and '/etc')

and ~/.xsession 
(Don't worry if there isn't – it just means you haven't created it yet)
This file should have:
gnome-session --session=gnome-classic

restart xrdp with:
/etc/init.d/xrdp restart


Connect with
"sesman-Xvnc"
settings.

12 comments:

  1. Thanks a lot!!!!

    I've been hours trying to solve it by myself.

    ReplyDelete
  2. This is great info, saved me a bunch of time troubleshooting. Thanks!!

    ReplyDelete
  3. Just the right info at the right time. Thumbs up!

    ReplyDelete
  4. whats the name of the session when using xubuntu?

    gnome-session --session=???

    ReplyDelete
  5. how would I do that for the other window managers?

    ReplyDelete
  6. Thanks! After making these changes I can connect but I am disconnected about 90 seconds in.

    ReplyDelete
  7. xfce desktop.

    The script startwm.sh does little more than executes /etc/X11/Xsession. Executing that file directly yields in the same gnome session error. The fix is for example to replace this last line in startwm.sh with line:
    /usr/bin/xfce4-session

    My screept is:
    /etc/xrdp# cat startwm.sh
    #!/bin/sh

    if [ -r /etc/default/locale ]; then
    . /etc/default/locale
    export LANG LANGUAGE
    fi

    #. /etc/X11/Xsession - my comments
    /usr/bin/xfce4-session

    ReplyDelete
  8. I am running Linux Deepin and about to give up setting XRDP on it. You have solved a great problem. Thank you

    ReplyDelete
  9. It resolved my problem ! Thanks a lot !

    ReplyDelete
  10. doesn't work, I can login but no usable desktop

    ReplyDelete

If you like this post, please leave a comment :)