Blank desktop when logging in via xrdp

239,429

Solution 1

You might still have another desktop manager in your .xsession config.

cd /home/youruser
echo "gnome-session --session=ubuntu-2d" > .xsession
sudo /etc/init.d/xrdp restart

I've had a similar issue and this solved it.

Solution 2

For future readers of this post (I found this post top of my Google search when I had the same problem), xrdp no longer seems to work with Ubuntu-2d in Ubuntu 14.04. Instead you must install xfce

sudo apt-get install xfce4

Then add the line

xfce4-session

to your ~/.xsession file instead of the gnome-session --session=ubuntu-2d line

Solution 3

Try this. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install gnome-session-fallback
echo “gnome-session -–session=gnome-fallback” > ~/.xsession
sudo /etc/init.d/xrdp restart

Solution 4

I had to do the following before it worked:

  • Install xfce4 and configure .xsession to "xfce4-session" as per Paul Rosenberg's reply above.

  • Fix a permissions problem with /etc/xrdp/ that caused the following error in /var/log/xrdp.log:

    [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
    

    I added user xrdp to ssl-cert group, not sure if this is the best workaround though.

Solution 5

For 20.04 black screen issue is being fixed by adding gnome-session or xfce4-session to ~/.xsession file.

In my case I has been successfully logged in into gnome-session:

$ cat ~/.xsession
gnome-session
Share:
239,429

Related videos on Youtube

nitefrog
Author by

nitefrog

BY DAY: Envangilze open source technologies and roll up the sleeves to play! BY NIGHT: Write poetry and short stories into the wee hours of the morning. FOR FUN: Read a ton, live a lot, and drink as much coffee as I am humanly able.

Updated on September 18, 2022

Comments

  • nitefrog
    nitefrog over 1 year

    I am trying to access Ubuntu 11.10 using Remote Desktop from a Win 7 machine. I installed xrdp. I launch the Windows remote desktop client and login in. I then get prompted for the user name and password.

    It then logs in, but all I see is the background, no menus, nothing. I have to kill remote desktop by closing it.

    Even if I right click , nothing. Any ideas???

    The only reason I even went down the RDP road was that VNC would not work either, even after I enabled desktop sharing. I am in a bind as I need to connect to Ubuntu via Windows. In version 8 Ubuntu this was not an issue and it just worked.

    • Lozzy_uk
      Lozzy_uk over 12 years
      When you say VNC wouldn't work, did it login ok but had the same desktop background-only problem, or could you not get it to connect at all?
    • nilsonneto
      nilsonneto over 12 years
      can you confirm you tried the trick in this answer? askubuntu.com/a/3936/14356
    • nitefrog
      nitefrog over 12 years
      I re-booted Ubuntu and now the VNC can connect but it is so slow it is not useable. I never had this problem with Ubuntu 8. Is this a bug in 11.10? When I log into Ubuntu with RDP what happens is that the screen re-sizes and you cannot access the menu bar along the top or the toolbar on the left. Also when logged in via rdf you cannot even right click on the desktop. It is weird, you can see the menu on the top show then rdp does something to re-size and it is gone. I have tried several rdp client like terminals, mRemote and MS remote desktop.
    • nitefrog
      nitefrog over 12 years
      Yes, I have also tried to log in with a XP system and I get the exact same problem. All I see is a desktop image and no menus at all. I can log in but I ant do anything, no icons, no menus, no nothing. Even the items on my desktop are not there. Now if I use VNC I can see everything but the performance is so bad it is unsealable.
  • nitefrog
    nitefrog over 12 years
    I have tried it with the 2D version also and same issue. How do you use the command line from Win7 into Ubuntu?
  • macrobook
    macrobook over 12 years
    that's a very good question.. I mixed up my answer with ubuntu-to-windows rdp connection. Sorry. Still, you can do it with cygwin, but the gui rdesktop client in windows works as expected :) Try the gnome-session-fallback, maybe you will have better results
  • laurent
    laurent over 12 years
    You can add the 2nd line (echo...) in /etc/xrdp/startwm.sh before calling . /etc/X11/Xsession and it will work even if the .xsession file is modified by something else.
  • Matt Cashatt
    Matt Cashatt about 12 years
    This solution worked beautifully for me. Cheers!
  • VidiMan
    VidiMan almost 12 years
    @nitefrog Try Bitvise Tunnelier. It runs like a champ for terminal, FTP and RDP from Windows.
  • user98085
    user98085 over 10 years
    Please provide a rough summary of what you're linking to, instead of just a link. :)
  • Ismail Yavuz
    Ismail Yavuz almost 9 years
    This didnt work for me, and I also have a connection lost problem :( askubuntu.com/questions/641240/…
  • sngreco
    sngreco over 8 years
    This was my problem with Ubuntu 15.10
  • Dmitry
    Dmitry over 6 years
    Still does't work :(
  • QA Collective
    QA Collective about 6 years
    This didn't work for me either, but what I would stress is to read the /var/log/xrdp/xrdp-sesman.log file and look for errors. This lead me to find my solution to this problem: github.com/neutrinolabs/xrdp/issues/764#issuecomment-3045767‌​85
  • fIwJlxSzApHEZIl
    fIwJlxSzApHEZIl about 6 years
    This worked for me BUT I also had to do the fix down below by adding a ` in front of my username when logging it. It wasn't immediately obvious that this fixed my issue because before I used ` in front of my username windows had saved the incorrect login with the windows domain added in front of the username. So it's a two part fix.
  • fIwJlxSzApHEZIl
    fIwJlxSzApHEZIl about 6 years
    This worked for me but I also had to switch the .xsession file to use xfce in addition.
  • sancho.s ReinstateMonicaCellio
    sancho.s ReinstateMonicaCellio over 3 years
    This did not work for me. Specifying an XFCE session as in an answer below did. I wonder what else should I do. If this helped many others, it should be workable... Perhaps this is an old way, with so many changes in the session manager to this day.
  • sancho.s ReinstateMonicaCellio
    sancho.s ReinstateMonicaCellio over 3 years
    This worked for me.
  • txyoji
    txyoji over 3 years
    This was a really old version of ubuntu. What I should have said was "Check your logs". /var/log/xrdp/xrdp-sesman.log Thanks @QA Collective.