Remote desktop black screen Ubuntu

$ sudo systemctl disable xrdp $ sudo systemctl stop xrdp $ sudo apt purge xrdp $ sudo apt purge xserver-xorg-core $ sudo apt purge xserver-xorg-input-all $ sudo apt purge xorgxrdp $ sudo apt install xrdp $ sudo apt install xserver-xorg-core $ sudo apt install xserver-xorg-input-all $ sudo apt install xorgxrdp

You also need to grant access to the /etc/ssl/private/ssl-cert-snakeoil.key file for xrdp user. It is available to members of the ssl-cert group by default.

$ sudo adduser xrdp ssl-cert # add xrdp into ssl-cert group $ sudo systemctl start xrdp # start xrdp service $ systemctl is-active xrdp # display current xrdp service state ... active $ sudo systemctl enable xrdp # start xrdp on system startup

3. Reboot system:

$ sudo reboot

4. Firewall configuration [optional]:

You need to open access on port 3389.

$ sudo ufw allow 3389

It is more secure to open it only for your IP address or network. For example:

$ sudo ufw allow from 10.5.5.0/24 to any port 3389

The best practice is to use an SSH tunnel to connect to the remote desktop and make xRDP listen only for local connections.

5. Setup your RDP-client

Please note that in some cases the user who will connect to xRDP must log out before doing so!

  • Connect to your server using any RDP client.
  • Enter the user credentials of your Ubuntu computer.
  • Now you can see the remote desktop initial screen.

Related commands:

$ sudo systemctl status xrdp # display current xrdp status $ sudo systemctl start xrdp # start xrdp service $ sudo systemctl stop xrdp # stop xrdp service $ sudo systemctl restart xrdp # restart xrdp service $ sudo systemctl enable xrdp # enable xrdp on system startup $ sudo systemctl disable xrdp # disable xrdp on system startup

$ sudo systemctl disable xrdp $ sudo systemctl stop xrdp $ sudo apt purge xrdp $ sudo apt purge xserver-xorg-core $ sudo apt purge xserver-xorg-input-all $ sudo apt purge xorgxrdp $ sudo apt install xrdp $ sudo apt install xserver-xorg-core $ sudo apt install xserver-xorg-input-all $ sudo apt install xorgxrdp

You also need to grant access to the /etc/ssl/private/ssl-cert-snakeoil.key file for xrdp user. It is available to members of the ssl-cert group by default.

$ sudo adduser xrdp ssl-cert # add xrdp into ssl-cert group $ sudo systemctl start xrdp # start xrdp service $ systemctl is-active xrdp # check xrdp state ... active $ sudo systemctl enable xrdp # start xrdp on system start

3. Reboot system:

$ sudo reboot

4. Firewall configuration:

You need to open access on port 3389.

$ sudo ufw allow 3389

It is more secure to open it only for your IP address or network. For example:

$ sudo ufw allow from 10.5.5.0/24 to any port 3389

The best practice is to use an SSH tunnel to connect to the remote desktop and make xRDP listen only for local connections.

5. Setup your RDP-client

Please note that in some cases the user who will connect to xRDP must log out before doing so!

  • Connect to your server using any RDP client.
  • Enter the user credentials of your Ubuntu computer.
  • Now you can see the remote desktop initial screen.

Related commands:

$ sudo systemctl status xrdp # display current xrdp status $ sudo systemctl start xrdp # start xrdp service $ sudo systemctl stop xrdp # stop xrdp service $ sudo systemctl restart xrdp # restart xrdp service $ sudo systemctl enable xrdp # enable xrdp on system start $ sudo systemctl disable xrdp # disable xrdp on system start

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_ADDRESSunset XDG_RUNTIME_DIR

. $HOME/.profile

Page 2

Video liên quan

Chủ Đề