Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

Using XRDP in Ubuntu Budgie 18.10 #77

Closed
grysbok opened this issue Jan 8, 2019 · 4 comments
Closed

Using XRDP in Ubuntu Budgie 18.10 #77

grysbok opened this issue Jan 8, 2019 · 4 comments

Comments

@grysbok
Copy link

grysbok commented Jan 8, 2019

Hi guys,

I met an issue when I was trying to run Ubuntu Budgie in HyperV virtual machine. I followed these instructions, but the session closed right after I entered my login & password to XRDP screen. Finally, after several hours of debugging shell scripts, I found that the problem is with /etc/X11/Xsession script - it is not used by lightdm that is used by default in Budgie. lightdm uses it's own script /usr/sbin/lightdm-session.

The solution is pretty simple. First, use install.sh script to install xrdp and xorgxrdp:

$ sudo apt install git
$ git clone https://github.com/jterry75/xrdp-init.git ~/xrdp-init
$ cd ~/xrdp-init/ubuntu/18.04/
$ sudo chmod +x install.sh
$ sudo ./install.sh
(reboot)
$ cd ~/xrdp-init/ubuntu/18.04/
$ sudo ./install.sh

Don't forget to run this PowerShell script on the host windows machine:

PS> Set-VM -VMName <hyperv-vm-name> -EnhancedSessionTransportType HvSocket

Then, edit /etc/xrdp/startubuntu.sh script:

#!/bin/sh
exec /usr/sbin/lightdm-session /usr/bin/budgie-desktop

Another option is to change /etc/xrdp/startwm.sh script - replace line

test -x /etc/X11/Xsession && exec /etc/X11/Xsession

with

test -x /etc/X11/Xsession && exec /etc/X11/Xsession /usr/bin/budgie-desktop

Hope this helps.

@dtrunk90
Copy link

dtrunk90 commented Jul 24, 2019

Nope

danny@danny$ sudo service xrdp status
● xrdp.service - xrdp daemon
   Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2019-07-24 21:16:23 CEST; 2min 20s ago
     Docs: man:xrdp(8)
           man:xrdp.ini(5)
  Process: 1309 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
  Process: 1287 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
 Main PID: 1325 (code=exited, status=1/FAILURE)

Jul 24 21:16:20 danny systemd[1]: Starting xrdp daemon...
Jul 24 21:16:20 danny xrdp[1309]: (1309)(140563129931584)[DEBUG] Testing if xrdp can listen on 0.0.0.0 port 3389.
Jul 24 21:16:21 danny xrdp[1309]: (1309)(140563129931584)[DEBUG] Closed socket 7 (AF_INET6 :: port 3389)
Jul 24 21:16:21 danny systemd[1]: xrdp.service: Can't open PID file /var/run/xrdp/xrdp.pid (yet?) after start: No such file or directory
Jul 24 21:16:21 danny systemd[1]: Started xrdp daemon.
Jul 24 21:16:22 danny xrdp[1325]: (1325)(140563129931584)[INFO ] starting xrdp with pid 1325
Jul 24 21:16:23 danny xrdp[1325]: (1325)(140563129931584)[ERROR] xrdp_listen_main_loop: listen error, possible port already in use
Jul 24 21:16:23 danny systemd[1]: xrdp.service: Main process exited, code=exited, status=1/FAILURE
Jul 24 21:16:23 danny systemd[1]: xrdp.service: Failed with result 'exit-code'.
danny@danny:~$ sudo lsof -i :3389
danny@danny:~$ sudo lsof -i :3350

@grysbok
Copy link
Author

grysbok commented Jul 25, 2019

That's strange. What version of Budgie Desktop are you using? @dtrunk90

@dtrunk90
Copy link

@grysbok 10.4+git20180830.02.f2dbc215fdb-0+10.5ubuntu1

@dtrunk90
Copy link

Got it working by undoing the script stuff, reinstalling it manually (without the script; only xrdp package) and simply replacing the line in startwm.sh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants