4

I bought a virtual server from hetzner.com and I am trying to get a desktop working. I already installed xrdp and gnome-desktop and I installed xserver-xorg-video-dummy and configured etc/X11/xorg.conf to create a virtual display but I just can't seem to get a desktop to run.

Startx outputs:

enter image description here

my /etc/X11/xorg.conf file:

    Section "Device"
    Identifier "Configured Video Device"
    Driver "dummy"
    #VideoRam 4096000
    #VideoRam 256000
    VideoRam 16384
EndSection

Section "Monitor"
    Identifier "Configured Monitor"
    HorizSync 5.0 - 1000.0
    VertRefresh 5.0 - 200.0
    Modeline "1600x900" 33.92 1600 1632 1760 1792 900 921 924 946
EndSection

Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
        Viewport 0 0
        Depth 24
        Virtual 1600 900
    EndSubSection
EndSection

The error log

Akisame
  • 3,313
  • 7
  • 32
  • 63
  • Possible duplicate of https://askubuntu.com/questions/453109/add-fake-display-when-no-monitor-is-plugged-in but it looks like you have tried the xserver-xorg-video-dummy, but have you maybe tried a command line setup of the display like doing xrandr --fb 1600x900 -display :0 ? – Terrance Feb 15 '19 at 13:47
  • it outputs can't open display :0 – Akisame Feb 15 '19 at 13:53
  • Try it without the display part on the line. I am thinking though that this might be related to having Wayland running instead. I'll have to find it, but there is a way to have Wayland disabled so that you can run X.Org. Try maybe https://linuxconfig.org/how-to-disable-wayland-and-enable-xorg-display-server-on-ubuntu-18-04-bionic-beaver-linux – Terrance Feb 15 '19 at 14:38
  • I'm trying a different route now. Reflashed the server with a 18.04 image and I'm going to run a VNCserver. I'll disable wayland (thanks for that tip) and see how far I'll get. – Akisame Feb 15 '19 at 14:55
  • 1
    I got it to work using tightVNCserver – Akisame Feb 15 '19 at 15:41
  • Feel free to write up your own answer so if others that have the same problem can follow what you did. – Terrance Feb 15 '19 at 15:56

1 Answers1

7

You will need an external rdp client, else there IS no display that can be recognize

Also, you must tell xrdp to use GNOME and allow non root login (if desired). No matter the desktop, the first command is needed for non root user login

sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
echo "gnome-session" > ~/.xsession

The last command will be done with every user that needs to login via RDP

My advice, though, is use cinnamon, XFCE, or MATE. GNOME has issue with xrdp.

For cinnamon

sudo apt install cinnamon xrdp
echo "cinnamon-session" > ~/.xsession

For mate:

sudo apt install ubuntu-mate-desktop xrdp
echo "mate-session" > ~/.xsession

For XFCE:

sudo apt install xfce4 lightdm xrdp
echo "startxfce4" > ~/.xsession

Please also note you need a display manager (DM), which the server doesn't come with. Some desktops come with one, else I recommend lightdm

I also do not recommend VNC; it has performance and security issue. I usually tunnel rdp over ssh for security

  • thanks. I used a different method to get it to work but this should work as well. I unfortunately had to switch servers since Hetzner didn't support some of the options I required so I got a bit more expensive server now and that one allows me to use a simpler way to do a headless setup – Akisame Feb 15 '19 at 19:13
  • If you found it helpful, please upvote. I use hetzner and am happy with it. But that's off topic – unixandria Feb 15 '19 at 19:15
  • @linuxandria Can you explain how you tunnel xrdp through ssh ? Please share some configuration. – Khurshid Alam Jun 09 '20 at 05:38
  • @KhurshidAlam I'm going to be honest I just use a client that supports it directly, but you can ssh to the sever with openssh and create a tunnel from the server to a local port and rdp to the local port – unixandria Jun 10 '20 at 20:16