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

Package clash with Arch; Enhanced session not working in Arch #127

Closed
multipitch opened this issue Oct 8, 2020 · 14 comments
Closed

Package clash with Arch; Enhanced session not working in Arch #127

multipitch opened this issue Oct 8, 2020 · 14 comments

Comments

@multipitch
Copy link
Contributor

multipitch commented Oct 8, 2020

On a clean install of arch, running ./makepkg.sh gives an error:

configure: error: Package requirements (xrdp >= 0.9.14) were not met:

Package dependency requirement 'xrdp >= 0.9.14' could not be satisfied.
Package 'xrdp' has version '0.9.13.1', required version is '>= 0.9.14'

I can get rid of the error by replacing xrdp with xrdp-git, e.g.

$ sudo pacman -Rns xrdp xrdp-devel-git
$ sudo rm -rf /etc/xrdp
$ mkdir -p ~/git
$ cd ~/git 
$ git clone https://github.com/Microsoft/linux-vm-tools.git
$ cd linux-vm-tools/arch/
$ sed -i 's/xrdp.git/xrdp-git.git/g' makepkg.sh
$ sed -i 's/cd xrdp/cd xrdp-git/g' makepkg.sh
$ ./makepkg.sh
$ sudo ./install-config.sh

Once I do this, I cannot get enhanced sessions to work properly from the xrdp splash screen.
I can get a DE to load by running startx but it is slow/laggy and doesn't have the enhanced session features.
This seems to be an issue with DBUS. I've tried both gnome and KDE and both fail to load from the xrdp splash screen using either xorg or xnvc.

Here's my ~/.xinitrc

#!/bin/sh 

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi
if [ -f "$usermodmap” ]; then
    xmodmap "$usermodmap"
fi

if [ -d /etc/X11/xinit/xinitrc.d ]; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . ”$f”
 done
 unset f
fi

export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
exec gnome-session

And my ~/.xserverrc

#!/bin/sh

exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR

I could get the xrdp splash screen to load gnome using xvnc by changing the line exec gnome-session to exec dbus-launch gnome-session in ~/.xinitrc but this produces a buggy session - for instance the terminal won't start and the shut down button doesn't work.

Here are some logs from an attempt to log in from the xrdp splash screen using xvnc (this method used to always work for me up until a few days ago on my usual VM, but using a clean VM as an example here):

  • Output from $ journalctl -b 0 _UID=1000 --no-pager > bootlog.txt
-- Logs begin at Wed 2020-10-07 12:29:42 IST, end at Thu 2020-10-08 11:25:46 IST. --
Oct 08 11:22:19 arch xrdp-sesman[373]: (373)(139835498198848)[INFO ] Xvnc :10 -auth .Xauthority -geometry 1364x768 -depth 32 -rfbauth /home/user/.vnc/sesman_passwd-user@arch:10 -bs -nolisten tcp -localhost -dpi 96
Oct 08 11:22:19 arch gnome-session-c[415]: Failed to load module "colorreload-gtk-module"
Oct 08 11:22:19 arch gnome-session[415]: gnome-session-check-accelerated: GL Helper exited with code 512
Oct 08 11:22:19 arch gnome-session-c[458]: Failed to load module "colorreload-gtk-module"
Oct 08 11:22:19 arch gnome-session[415]: gnome-session-check-accelerated: GLES Helper exited with code 512
Oct 08 11:22:19 arch gnome-session[372]: gnome-session-binary[372]: WARNING: Failed to reset failed state of units: Could not connect: Connection refused
Oct 08 11:22:19 arch gnome-session-binary[372]: WARNING: Failed to reset failed state of units: Could not connect: Connection refused
Oct 08 11:22:19 arch gnome-session[372]: gnome-session-binary[372]: WARNING: Falling back to non-systemd startup procedure due to error: Could not connect: Connection refused
Oct 08 11:22:19 arch gnome-session[372]: gnome-session-binary[372]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Oct 08 11:22:19 arch gnome-session-binary[372]: WARNING: Falling back to non-systemd startup procedure due to error: Could not connect: Connection refused
Oct 08 11:22:19 arch gnome-session-binary[372]: WARNING: Could not make bus activated clients aware of XDG_MENU_PREFIX=gnome- environment variable: Could not connect: Connection refused
Oct 08 11:22:19 arch gnome-session[372]: gnome-session-binary[372]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
Oct 08 11:22:19 arch gnome-session-binary[372]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
Oct 08 11:22:19 arch gnome-session[372]: gnome-session-binary[372]: WARNING: Lost name on bus: org.gnome.SessionManager
Oct 08 11:22:19 arch gnome-session-binary[372]: WARNING: Lost name on bus: org.gnome.SessionManager
Oct 08 11:22:19 arch gnome-session[483]: Unable to init server: Could not connect: Connection refused
Oct 08 11:22:19 arch gnome-session-f[483]: Cannot open display: 
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.XSettings-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Sound-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-gnome\x2dkeyring\x2dpkcs11-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-gnome\x2dkeyring\x2dsecrets-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Datetime-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Smartcard-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-gnome\x2dkeyring\x2dssh-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-pulseaudio-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-at\x2dspi\x2ddbus\x2dbus-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Sharing-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Keyboard-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Wwan-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Wacom-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Power-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Color-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Housekeeping-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.Rfkill-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.ScreensaverProxy-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.A11ySettings-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.UsbProtection-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: gnome-systemd-autostart-condition not found: No such file or directory
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.PrintNotifications-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[498]: Not generating service for XDG autostart app-org.gnome.SettingsDaemon.MediaKeys-autostart.service, startup phases are not supported.
Oct 08 11:23:53 arch systemd[490]: Queued start job for default target Main User Target.
Oct 08 11:23:53 arch systemd[490]: Reached target Paths.
Oct 08 11:23:53 arch systemd[490]: Reached target Timers.
Oct 08 11:23:53 arch systemd[490]: Starting D-Bus User Message Bus Socket.
Oct 08 11:23:53 arch systemd[490]: Listening on GnuPG network certificate management daemon.
Oct 08 11:23:53 arch systemd[490]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Oct 08 11:23:53 arch systemd[490]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Oct 08 11:23:53 arch systemd[490]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Oct 08 11:23:53 arch systemd[490]: Listening on GnuPG cryptographic agent and passphrase cache.
Oct 08 11:23:53 arch systemd[490]: Listening on p11-kit server.
Oct 08 11:23:53 arch systemd[490]: Listening on Multimedia System.
Oct 08 11:23:53 arch systemd[490]: Listening on Sound System.
Oct 08 11:23:53 arch systemd[490]: Listening on D-Bus User Message Bus Socket.
Oct 08 11:23:53 arch systemd[490]: Reached target Sockets.
Oct 08 11:23:53 arch systemd[490]: Reached target Basic System.
Oct 08 11:23:53 arch systemd[490]: Starting Update XDG user dir configuration...
Oct 08 11:23:53 arch systemd[490]: xdg-user-dirs-update.service: Succeeded.
Oct 08 11:23:53 arch systemd[490]: Finished Update XDG user dir configuration.
Oct 08 11:23:53 arch systemd[490]: Reached target Main User Target.
Oct 08 11:23:53 arch systemd[490]: Startup finished in 102ms.
Oct 08 11:23:53 arch systemd[490]: Started D-Bus User Message Bus.
Oct 08 11:23:53 arch dbus-daemon[507]: [session uid=1000 pid=507] Activating via systemd: service name='org.gtk.vfs.Daemon' unit='gvfs-daemon.service' requested by ':1.1' (uid=1000 pid=505 comm="flatpak --installations ")
Oct 08 11:23:53 arch systemd[490]: Starting Virtual filesystem service...
Oct 08 11:23:54 arch dbus-daemon[507]: [session uid=1000 pid=507] Successfully activated service 'org.gtk.vfs.Daemon'
Oct 08 11:23:54 arch systemd[490]: Started Virtual filesystem service.
Oct 08 11:24:59 arch sshd[527]: Received disconnect from 172.27.37.65 port 58067:11: disconnected by user
Oct 08 11:24:59 arch sshd[527]: Disconnected from user user 172.27.37.65 port 58067
Oct 08 11:25:46 arch sshd[532]: Received disconnect from 172.27.37.65 port 58078:11: disconnected by user
Oct 08 11:25:46 arch sshd[532]: Disconnected from user user 172.27.37.65 port 58078
  • Contents of /var/log/xrdp.log
[20201008-11:20:35] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:20:35] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:35] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:35] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:20:35] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:20:35] [DEBUG] TLSv1.3 enabled
[20201008-11:20:35] [DEBUG] TLSv1.2 enabled
[20201008-11:20:35] [DEBUG] Security layer: requested 11, selected 0
[20201008-11:20:35] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:35] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:20:35] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:35] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:35] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:20:35] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:20:35] [DEBUG] TLSv1.3 enabled
[20201008-11:20:35] [DEBUG] TLSv1.2 enabled
[20201008-11:20:35] [DEBUG] Security layer: requested 0, selected 0
[20201008-11:20:35] [INFO ] connected client computer name: IEDUB10NTB880
[20201008-11:20:35] [INFO ] adding channel item name rdpdr chan_id 1004 flags 0x80800000
[20201008-11:20:35] [INFO ] adding channel item name rdpsnd chan_id 1005 flags 0xc0000000
[20201008-11:20:35] [INFO ] adding channel item name cliprdr chan_id 1006 flags 0xc0a00000
[20201008-11:20:35] [INFO ] adding channel item name drdynvc chan_id 1007 flags 0xc0800000
[20201008-11:20:35] [INFO ] Non-TLS connection established from 2 port 3389: encrypted with standard RDP security
[20201008-11:20:35] [DEBUG] xrdp_00000209_wm_login_mode_event_00000001
[20201008-11:20:35] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:20:35] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:20:35] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20201008-11:20:35] [WARN ] local keymap file for 0x00001809 found and doesn't match built in keymap, using local keymap file
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20201008-11:20:48] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20201008-11:20:48] [DEBUG] return value from xrdp_mm_connect 0
[20201008-11:20:48] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20201008-11:20:48] [DEBUG] Layout from client_info (geom=1364x768 #screens=1) : 0:(1364x768+0+0)
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC tcp connected
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC security level is 2 (1 = none, 2 = standard)
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC password ok
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC sending share flag
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC receiving server init
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC receiving pixel format
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC receiving name length
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC receiving name
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC sending pixel format
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC sending cursor
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: VNC connection complete, connected ok
[20201008-11:20:48] [DEBUG] xrdp_wm_log_msg: connected ok
[20201008-11:20:48] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20201008-11:20:48] [DEBUG] Closed socket 16 (AF_INET 127.0.0.1:56154)
[20201008-11:20:48] [DEBUG] Skipping ENC_CURSOR encoding
[20201008-11:20:48] [DEBUG] VNC matched ExtendedDesktopSize rectangle x=0, y=0 geom=1364x768
[20201008-11:20:48] [DEBUG] VNC server supports resizing
[20201008-11:20:48] [INFO ] Layout from OldLayout (geom=1364x768 #screens=1) : 1804289383:(1364x768+0+0)
[20201008-11:20:48] [DEBUG] VNC setting screen id to 1804289383 from server
[20201008-11:20:48] [DEBUG] Server layout is the same as the client layout
[20201008-11:20:48] [DEBUG] VNC got clip data
[20201008-11:20:49] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:49] [DEBUG] xrdp_mm_module_cleanup
[20201008-11:20:49] [DEBUG] VNC mod_exit
[20201008-11:20:49] [DEBUG] Closed socket 17 (AF_INET 127.0.0.1:38134)
[20201008-11:20:49] [DEBUG] Closed socket 18 (AF_UNIX)
[20201008-11:20:51] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:20:51] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:51] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:51] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:20:51] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:20:51] [DEBUG] TLSv1.3 enabled
[20201008-11:20:51] [DEBUG] TLSv1.2 enabled
[20201008-11:20:51] [DEBUG] Security layer: requested 11, selected 0
[20201008-11:20:51] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:51] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:20:51] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:51] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:51] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:20:51] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:20:51] [DEBUG] TLSv1.3 enabled
[20201008-11:20:51] [DEBUG] TLSv1.2 enabled
[20201008-11:20:51] [DEBUG] Security layer: requested 0, selected 0
[20201008-11:20:51] [INFO ] connected client computer name: IEDUB10NTB880
[20201008-11:20:51] [INFO ] adding channel item name rdpdr chan_id 1004 flags 0x80800000
[20201008-11:20:51] [INFO ] adding channel item name rdpsnd chan_id 1005 flags 0xc0000000
[20201008-11:20:52] [INFO ] adding channel item name cliprdr chan_id 1006 flags 0xc0a00000
[20201008-11:20:52] [INFO ] adding channel item name drdynvc chan_id 1007 flags 0xc0800000
[20201008-11:20:52] [INFO ] Non-TLS connection established from 2 port 3389: encrypted with standard RDP security
[20201008-11:20:52] [DEBUG] xrdp_0000027c_wm_login_mode_event_00000001
[20201008-11:20:52] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:20:52] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:20:52] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20201008-11:20:52] [WARN ] local keymap file for 0x00001809 found and doesn't match built in keymap, using local keymap file
[20201008-11:20:56] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20201008-11:20:56] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20201008-11:20:56] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20201008-11:20:56] [DEBUG] return value from xrdp_mm_connect 0
[20201008-11:20:56] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20201008-11:20:56] [DEBUG] xrdp_wm_log_msg: started connecting
[20201008-11:20:56] [INFO ] lib_mod_log_peer: xrdp_pid=636 connected to X11rdp_pid=639 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=2 client_port=3389
[20201008-11:20:56] [DEBUG] xrdp_wm_log_msg: connected ok
[20201008-11:20:56] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20201008-11:20:56] [DEBUG] Closed socket 16 (AF_INET 127.0.0.1:56160)
[20201008-11:20:57] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:57] [DEBUG] xrdp_mm_module_cleanup
[20201008-11:20:57] [DEBUG] Closed socket 17 (AF_UNIX)
[20201008-11:20:57] [DEBUG] Closed socket 18 (AF_UNIX)
[20201008-11:20:59] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:20:59] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:59] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:59] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:20:59] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:20:59] [DEBUG] TLSv1.3 enabled
[20201008-11:20:59] [DEBUG] TLSv1.2 enabled
[20201008-11:20:59] [DEBUG] Security layer: requested 11, selected 0
[20201008-11:20:59] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:59] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:20:59] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:59] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:20:59] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:20:59] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:20:59] [DEBUG] TLSv1.3 enabled
[20201008-11:20:59] [DEBUG] TLSv1.2 enabled
[20201008-11:20:59] [DEBUG] Security layer: requested 0, selected 0
[20201008-11:20:59] [INFO ] connected client computer name: IEDUB10NTB880
[20201008-11:20:59] [INFO ] adding channel item name rdpdr chan_id 1004 flags 0x80800000
[20201008-11:20:59] [INFO ] adding channel item name rdpsnd chan_id 1005 flags 0xc0000000
[20201008-11:20:59] [INFO ] adding channel item name cliprdr chan_id 1006 flags 0xc0a00000
[20201008-11:20:59] [INFO ] adding channel item name drdynvc chan_id 1007 flags 0xc0800000
[20201008-11:20:59] [INFO ] Non-TLS connection established from 2 port 3389: encrypted with standard RDP security
[20201008-11:20:59] [DEBUG] xrdp_000002ee_wm_login_mode_event_00000001
[20201008-11:20:59] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:20:59] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:20:59] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20201008-11:20:59] [WARN ] local keymap file for 0x00001809 found and doesn't match built in keymap, using local keymap file
[20201008-11:21:01] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:21:01] [DEBUG] xrdp_mm_module_cleanup
[20201008-11:21:10] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:21:23] [INFO ] address [-1] port [3389] mode 3
[20201008-11:21:23] [INFO ] listening to port 3389 on -1
[20201008-11:21:23] [INFO ] xrdp_listen_pp done
[20201008-11:21:23] [DEBUG] Closed socket 7 (AF_VSOCK cid -1 port 3389)
[20201008-11:21:25] [INFO ] starting xrdp with pid 371
[20201008-11:21:25] [INFO ] address [-1] port [3389] mode 3
[20201008-11:21:25] [INFO ] listening to port 3389 on -1
[20201008-11:21:25] [INFO ] xrdp_listen_pp done
[20201008-11:21:27] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:21:27] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:21:27] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:21:27] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:21:27] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:21:27] [DEBUG] TLSv1.3 enabled
[20201008-11:21:27] [DEBUG] TLSv1.2 enabled
[20201008-11:21:27] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:21:58] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:22:05] [INFO ] address [-1] port [3389] mode 3
[20201008-11:22:05] [INFO ] listening to port 3389 on -1
[20201008-11:22:05] [INFO ] xrdp_listen_pp done
[20201008-11:22:05] [DEBUG] Closed socket 7 (AF_VSOCK cid -1 port 3389)
[20201008-11:22:07] [INFO ] starting xrdp with pid 365
[20201008-11:22:08] [INFO ] address [-1] port [3389] mode 3
[20201008-11:22:08] [INFO ] listening to port 3389 on -1
[20201008-11:22:08] [INFO ] xrdp_listen_pp done
[20201008-11:22:10] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:22:10] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:22:10] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:22:10] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:22:10] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:22:10] [DEBUG] TLSv1.3 enabled
[20201008-11:22:10] [DEBUG] TLSv1.2 enabled
[20201008-11:22:10] [DEBUG] Security layer: requested 11, selected 0
[20201008-11:22:10] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:22:10] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:22:10] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:22:10] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:22:10] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:22:10] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:22:10] [DEBUG] TLSv1.3 enabled
[20201008-11:22:10] [DEBUG] TLSv1.2 enabled
[20201008-11:22:10] [DEBUG] Security layer: requested 0, selected 0
[20201008-11:22:10] [INFO ] connected client computer name: IEDUB10NTB880
[20201008-11:22:10] [INFO ] adding channel item name rdpdr chan_id 1004 flags 0x80800000
[20201008-11:22:10] [INFO ] adding channel item name rdpsnd chan_id 1005 flags 0xc0000000
[20201008-11:22:10] [INFO ] adding channel item name cliprdr chan_id 1006 flags 0xc0a00000
[20201008-11:22:10] [INFO ] adding channel item name drdynvc chan_id 1007 flags 0xc0800000
[20201008-11:22:10] [INFO ] Non-TLS connection established from 2 port 3389: encrypted with standard RDP security
[20201008-11:22:10] [DEBUG] xrdp_00000172_wm_login_mode_event_00000001
[20201008-11:22:10] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:22:10] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:22:10] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20201008-11:22:10] [WARN ] local keymap file for 0x00001809 found and doesn't match built in keymap, using local keymap file
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20201008-11:22:19] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20201008-11:22:19] [DEBUG] return value from xrdp_mm_connect 0
[20201008-11:22:19] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20201008-11:22:19] [DEBUG] Layout from client_info (geom=1364x768 #screens=1) : 0:(1364x768+0+0)
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC tcp connected
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC security level is 2 (1 = none, 2 = standard)
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC password ok
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC sending share flag
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC receiving server init
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC receiving pixel format
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC receiving name length
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC receiving name
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC sending pixel format
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC sending cursor
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: VNC connection complete, connected ok
[20201008-11:22:19] [DEBUG] xrdp_wm_log_msg: connected ok
[20201008-11:22:19] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20201008-11:22:19] [DEBUG] Closed socket 16 (AF_INET 127.0.0.1:51296)
[20201008-11:22:19] [DEBUG] Skipping ENC_CURSOR encoding
[20201008-11:22:19] [DEBUG] VNC matched ExtendedDesktopSize rectangle x=0, y=0 geom=1364x768
[20201008-11:22:19] [DEBUG] VNC server supports resizing
[20201008-11:22:19] [INFO ] Layout from OldLayout (geom=1364x768 #screens=1) : 1804289383:(1364x768+0+0)
[20201008-11:22:19] [DEBUG] VNC setting screen id to 1804289383 from server
[20201008-11:22:19] [DEBUG] Server layout is the same as the client layout
[20201008-11:22:19] [DEBUG] VNC got clip data
[20201008-11:22:19] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:22:20] [DEBUG] xrdp_mm_module_cleanup
[20201008-11:22:20] [DEBUG] VNC mod_exit
[20201008-11:22:20] [DEBUG] Closed socket 17 (AF_INET 127.0.0.1:41614)
[20201008-11:22:20] [DEBUG] Closed socket 18 (AF_UNIX)
[20201008-11:23:46] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:23:46] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:23:46] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:23:46] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:23:46] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:23:46] [DEBUG] TLSv1.3 enabled
[20201008-11:23:46] [DEBUG] TLSv1.2 enabled
[20201008-11:23:46] [DEBUG] Security layer: requested 11, selected 0
[20201008-11:23:46] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:23:46] [INFO ] Socket 12: AF_VSOCK connection received from cid: 2 port: 3389
[20201008-11:23:46] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:23:46] [DEBUG] Closed socket 11 (AF_VSOCK cid -1 port 3389)
[20201008-11:23:46] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20201008-11:23:46] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20201008-11:23:46] [DEBUG] TLSv1.3 enabled
[20201008-11:23:46] [DEBUG] TLSv1.2 enabled
[20201008-11:23:46] [DEBUG] Security layer: requested 0, selected 0
[20201008-11:23:46] [INFO ] connected client computer name: IEDUB10NTB880
[20201008-11:23:46] [INFO ] adding channel item name rdpdr chan_id 1004 flags 0x80800000
[20201008-11:23:46] [INFO ] adding channel item name rdpsnd chan_id 1005 flags 0xc0000000
[20201008-11:23:46] [INFO ] adding channel item name cliprdr chan_id 1006 flags 0xc0a00000
[20201008-11:23:46] [INFO ] adding channel item name drdynvc chan_id 1007 flags 0xc0800000
[20201008-11:23:46] [INFO ] Non-TLS connection established from 2 port 3389: encrypted with standard RDP security
[20201008-11:23:47] [DEBUG] xrdp_000001e8_wm_login_mode_event_00000001
[20201008-11:23:47] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:23:47] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20201008-11:23:47] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20201008-11:23:47] [WARN ] local keymap file for 0x00001809 found and doesn't match built in keymap, using local keymap file
[20201008-11:23:48] [DEBUG] Closed socket 12 (AF_VSOCK cid -1 port 3389)
[20201008-11:23:48] [DEBUG] xrdp_mm_module_cleanup
  • Contents of /var/log/xrdp-sesman.log
[20201008-11:20:48] [INFO ] A connection received from 127.0.0.1 port 56154
[20201008-11:20:48] [INFO ] ++ created session (access granted): username user, ip NULL:NULL - socket: 12
[20201008-11:20:48] [INFO ] starting Xvnc session...
[20201008-11:20:48] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:5910)
[20201008-11:20:48] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6010)
[20201008-11:20:48] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6210)
[20201008-11:20:48] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20201008-11:20:48] [INFO ] calling auth_start_session from pid 523
[20201008-11:20:48] [DEBUG] Closed socket 7 (AF_INET 127.0.0.1:3350)
[20201008-11:20:48] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20201008-11:20:48] [INFO ] Xvnc :10 -auth .Xauthority -geometry 1364x768 -depth 32 -rfbauth /home/user/.vnc/sesman_passwd-user@arch:10 -bs -nolisten tcp -localhost -dpi 96  
[20201008-11:20:48] [CORE ] waiting for window manager (pid 524) to exit
[20201008-11:20:49] [CORE ] window manager (pid 524) did exit, cleaning up session
[20201008-11:20:49] [INFO ] calling auth_stop_session and auth_end from pid 523
[20201008-11:20:49] [DEBUG] cleanup_sockets:
[20201008-11:20:49] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_audio_out_socket_10
[20201008-11:20:49] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_audio_in_socket_10
[20201008-11:20:49] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdpapi_10
[20201008-11:20:49] [INFO ] ++ terminated session:  username user, display :10.0, session_pid 523, ip NULL:NULL - socket: 12
[20201008-11:20:56] [INFO ] A connection received from 127.0.0.1 port 56160
[20201008-11:20:56] [INFO ] ++ created session (access granted): username user, ip NULL:NULL - socket: 12
[20201008-11:20:56] [INFO ] starting Xorg session...
[20201008-11:20:56] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:5910)
[20201008-11:20:56] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:6010)
[20201008-11:20:56] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:6210)
[20201008-11:20:56] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20201008-11:20:56] [INFO ] calling auth_start_session from pid 637
[20201008-11:20:56] [DEBUG] Closed socket 7 (AF_INET 127.0.0.1:3350)
[20201008-11:20:56] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20201008-11:20:56] [INFO ] Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log  
[20201008-11:20:56] [CORE ] waiting for window manager (pid 638) to exit
[20201008-11:20:57] [CORE ] window manager (pid 638) did exit, cleaning up session
[20201008-11:20:57] [INFO ] calling auth_stop_session and auth_end from pid 637
[20201008-11:20:57] [DEBUG] cleanup_sockets:
[20201008-11:20:57] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_audio_out_socket_10
[20201008-11:20:57] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_audio_in_socket_10
[20201008-11:20:57] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdpapi_10
[20201008-11:20:57] [INFO ] ++ terminated session:  username user, display :10.0, session_pid 637, ip NULL:NULL - socket: 12
[20201008-11:21:10] [INFO ] shutting down sesman 1
[20201008-11:21:10] [INFO ] shutting down sesman 1
[20201008-11:21:10] [DEBUG] Closed socket 7 (AF_INET 127.0.0.1:3350)
[20201008-11:21:23] [DEBUG] libscp initialized
[20201008-11:21:23] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350.
[20201008-11:21:23] [DEBUG] Closed socket 5 (AF_INET 127.0.0.1:3350)
[20201008-11:21:23] [INFO ] starting xrdp-sesman with pid 369
[20201008-11:21:23] [INFO ] listening to port 3350 on 127.0.0.1
[20201008-11:21:58] [INFO ] shutting down sesman 1
[20201008-11:21:58] [INFO ] shutting down sesman 1
[20201008-11:21:58] [DEBUG] Closed socket 7 (AF_INET 127.0.0.1:3350)
[20201008-11:22:05] [DEBUG] libscp initialized
[20201008-11:22:05] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350.
[20201008-11:22:05] [DEBUG] Closed socket 5 (AF_INET 127.0.0.1:3350)
[20201008-11:22:05] [INFO ] starting xrdp-sesman with pid 362
[20201008-11:22:05] [INFO ] listening to port 3350 on 127.0.0.1
[20201008-11:22:19] [INFO ] A connection received from 127.0.0.1 port 51296
[20201008-11:22:19] [INFO ] ++ created session (access granted): username user, ip NULL:NULL - socket: 12
[20201008-11:22:19] [INFO ] starting Xvnc session...
[20201008-11:22:19] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:5910)
[20201008-11:22:19] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6010)
[20201008-11:22:19] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6210)
[20201008-11:22:19] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20201008-11:22:19] [INFO ] calling auth_start_session from pid 371
[20201008-11:22:19] [DEBUG] Closed socket 7 (AF_INET 127.0.0.1:3350)
[20201008-11:22:19] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20201008-11:22:19] [INFO ] Xvnc :10 -auth .Xauthority -geometry 1364x768 -depth 32 -rfbauth /home/user/.vnc/sesman_passwd-user@arch:10 -bs -nolisten tcp -localhost -dpi 96  
[20201008-11:22:19] [CORE ] waiting for window manager (pid 372) to exit
[20201008-11:22:19] [CORE ] window manager (pid 372) did exit, cleaning up session
[20201008-11:22:19] [INFO ] calling auth_stop_session and auth_end from pid 371
[20201008-11:22:19] [DEBUG] cleanup_sockets:
[20201008-11:22:19] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_audio_out_socket_10
[20201008-11:22:20] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_audio_in_socket_10
[20201008-11:22:20] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdpapi_10
[20201008-11:22:20] [INFO ] ++ terminated session:  username user, display :10.0, session_pid 371, ip NULL:NULL - socket: 12
@multipitch
Copy link
Contributor Author

If I run...

$ cp /etc/X11/xinit/xinitrc >> ~/.xinitrc

...and reboot, I successfully reach twm using either the xorg or xvnc logins from the xrdp slash screen, so that much is working.
Not sure why I can't get things working for gnome and/or KDE.

@dgasson
Copy link

dgasson commented Oct 9, 2020

@multipitch this may have relevance: https://bbs.archlinux.org/viewtopic.php?id=258716. In particular response #8 and 9 by usul0184. I can confirm that the fix he suggests also works for me. In short, it appears to be due to a change to a PAM config (which I would not have guessed)?

@multipitch
Copy link
Contributor Author

@multipitch this may have relevance: https://bbs.archlinux.org/viewtopic.php?id=258716. In particular response #8 and 9 by usul0184. I can confirm that the fix he suggests also works for me. In short, it appears to be due to a change to a PAM config (which I would not have guessed)?

Thanks.
I can confirm that commenting out the line...
-account [success=1 default=ignore] pam_systemd_home.so
in /etc/pam.d/system-auth fixed the login issue.

It still remains the case that linux-vm-tools does not work out of the box for a clean install of arch due to the package conflict mentioned above. If xrdp 0.9.14 causes the login issues seen above, then changing the scripts to use xrdp-git instead of xrdp is just subsituting one breakage for another. Will leave this open.

@multipitch
Copy link
Contributor Author

Link to related discussion on xrdp issue: neutrinolabs/xrdp#1684

@fbanning
Copy link

We're currently facing the same problem (xrdp 9.14 required for linux-vm-tools but only 9.13.1 available on manjaro repos). Really annoying that we're stuck with laggy input (as in: unusable laggy) on this Hyper-V VM.

@nquoctuan
Copy link

nquoctuan commented Jan 26, 2021

@fbanning same issue, really frustrated for installation new manjaro 20.2.1

Do you have any solution to workaround this issue>?

@fbanning
Copy link

Do you have any solution to workaround this issue>?

Sadly not, sorry.

@Isildur981
Copy link

Okay, I think I've got this to work. I'm using a freshly installed instance of Manjaro KDE. I've modified the instructions from this Manjaro forum post slightly.

https://archived.forum.manjaro.org/t/installing-manjaro-in-hyper-v-with-enhanced-session-support/79394

For anyone else using Manjaro, you have to change 'systemctl restart lightdm' to 'systemctl restart sddm' when starting the live instance. Manjaro has apparently switched from Light DM to SDDM, since the forum post was written.

Continue to follow the instructions, but before running ./makepkg.sh edit it to point to xrdp-git and xorgxrdp-git as shown below. As of 1/26/2021 xrdp-git is version 0.91.14.r24 and xorgxrdp-git is version 0.2.13-1.

makepkg.sh:

XRDP

git clone https://aur.archlinux.org/xrdp-git.git
cd xrdp-git || exit
makepkg -sri --noconfirm

XORGXRDP

git clone https://aur.archlinux.org/xorgxrdp-git.git
cd xorgxrdp-git || exit
makepkg -sri --noconfirm


The build completed successfully, and I then edited .xinitrc as shown in the forum post. When you open Powershell be sure to run it as an administrator or the Set-VM -VMName command will fail. I was then able to restart my VM and the Xrdp login window appeared and everything appears to be working.

@Zackptg5
Copy link

Confirmed that @Isildur981 solution work

@nquoctuan
Copy link

@Isildur981 cool, let me try

@Zackptg5
Copy link

@nquoctuan @Isildur981

Quick update, I couldn't get enhanced session to work, it'd keep disconnecting so there may be some other problems unless I missed something

@nquoctuan
Copy link

It works on my case, just now.

makepkg.sh

#!/bin/bash

#
# This script is for Arch Linux to download and install XRDP+XORGXRDP
#

if [ "$(id -u)" -eq 0 ]; then
echo 'This script must be run as a non-root user, as building packages as root is
unsupported.' >&2
exit 1
fi

#################################################################
#############
# Prepare by installing build tools.
#
# Partial upgrades aren't supported in arch.
sudo pacman -Syu --needed --noconfirm base base-devel git

# Create a build directory in tmpfs
TMPDIR=$(mktemp -d)
pushd "$TMPDIR" || exit

#################################################################
#############
# XRDP
#
(
	git clone https://aur.archlinux.org/xrdp-git.git
	cd xrdp-git || exit
	makepkg -sri --noconfirm
)
#################################################################
#############
# XORGXRDP
# Devel version, because release version includes a bug crashing gnome-settings-daemon
(
	git clone https://aur.archlinux.org/xorgxrdp-git.git
	cd xorgxrdp-git || exit
	makepkg -sri --noconfirm
)
##############################################################################

#remove build directory
rm -rf $TMPDIR

and .xinitrc

[jimmy@manjaro-vm ~]$ cat ~/.xinitrc 
#!/bin/bash
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

DEFAULT_SESSION=startplasma-x11

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

get_session(){
    local dbus_args=(--sh-syntax)
    case $1 in
        awesome) dbus_args+=(awesome) ;;
        bspwm) dbus_args+=(bspwm-session) ;;
        budgie) dbus_args+=(budgie-desktop) ;;
        cinnamon) dbus_args+=(cinnamon-session) ;;
        deepin) dbus_args+=(startdde) ;;
        enlightenment) dbus_args+=(enlightenment_start) ;;
        fluxbox) dbus_args+=(startfluxbox) ;;
        gnome) dbus_args+=(gnome-session) ;;
        i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
        jwm) dbus_args+=(jwm) ;;
        kde) dbus_args+=(startplasma-x11) ;;
        lxde) dbus_args+=(startlxde) ;;
        lxqt) dbus_args+=(lxqt-session) ;;
        mate) dbus_args+=(mate-session) ;;
        xfce) dbus_args+=(xfce4-session) ;;
        openbox) dbus_args+=(openbox-session) ;;
        *) dbus_args+=($DEFAULT_SESSION) ;;
    esac

    echo "dbus-launch ${dbus_args[*]}"
}

exec $(get_session "$1")

@Zackptg5
Copy link

Zackptg5 commented Jan 27, 2021

Okay, so kde works fine. XFCE doesn't though, it keeps kicking me out. The xinitrc file does look different from the xfce one so maybe it has something to do with that

Edit: figured out what's up with xfce:

This is the original .xinitrc file with xfce (Manjaro):

#!/bin/bash
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

SESSION=${1:-xfce}

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

get_session(){
    local dbus_args=(--sh-syntax --exit-with-session)
    case $1 in
        awesome) dbus_args+=(awesome) ;;
        bspwm) dbus_args+=(bspwm-session) ;;
        budgie) dbus_args+=(budgie-desktop) ;;
        cinnamon) dbus_args+=(cinnamon-session) ;;
        deepin) dbus_args+=(startdde) ;;
        enlightenment) dbus_args+=(enlightenment_start) ;;
        fluxbox) dbus_args+=(startfluxbox) ;;
        gnome) dbus_args+=(gnome-session) ;;
        i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
        jwm) dbus_args+=(jwm) ;;
        kde) dbus_args+=(startplasma-x11) ;;
        lxde) dbus_args+=(startlxde) ;;
        lxqt) dbus_args+=(lxqt-session) ;;
        mate) dbus_args+=(mate-session) ;;
        xfce) dbus_args+=(xfce4-session) ;;
        openbox) dbus_args+=(openbox-session) ;;
        *) dbus_args+=("$1") ;;
    esac

    echo "dbus-launch ${dbus_args[*]}"
}

exec $(get_session "$1")

In addition to removing --exit with session, the problem is with the get_session function. On further testing, it appears that no DE is detected in the case statement ($1="") and so the wildcard is triggered whenever attempting to use enhanced session login.
Changing that entry to xfce4-session fixes the problem. KDE works oob because that entry is properly set.
So the fix would be (running from basic session):
[ "$DESKTOP_SESSION" == "xfce" ] && sed -i 's/args+=("$1")/args+=(xfce4-session)/' .xinitrc

@cwilhit
Copy link
Contributor

cwilhit commented Jan 28, 2021

This repo is being archived, so closing this issue.

@cwilhit cwilhit closed this as completed Jan 28, 2021
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

7 participants