neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.61k stars 1.72k forks source link

Unable to use xrdp on Alpine Linux V3.15 #2177

Closed Cyanat closed 2 years ago

Cyanat commented 2 years ago

Hi! I have a fresh install of Linux Alpine 3.15.0 with XFCE. I try to enable xrdp on it like this:

apk add  xrdp
rc-service xrdp start
rc-service xrdp-sesman start

From a windows, i use mstcs.exe to access my server. I get login screen. But when i validate, credentials popup disappears then nothing happens during few minutes. Then, I get connection log popup indicating "connection problem, giving up"

My /var/log/xrdp-sesman.log indicate: [20220316-16:24:10] [WARN ] Window manager (pid 3251, display 10) exited quickly (0 secs). This could indicate a window manager config problem

And here are errors in my .xorgxrdp10.log:


[  1808.287] (EE) Unable to locate/open config file: "xrdp/xorg.conf"
[  1808.348] (EE) Failed to load module "fbdev" (module does not exist, 0)
[  1808.348] (EE) Failed to load module "vesa" (module does not exist, 0)
[  1808.449] (EE) AIGLX error: dlopen of /usr/lib/xorg/modules/dri/swrast_dri.so failed (Error loading shared library /usr/lib/xorg/modules/dri/swrast_dri.so: No such file or directory)
[  1808.449] (EE) AIGLX error: unable to load driver swrast
[  1808.449] (EE) GLX: could not load software renderer

Any clue of what could be the problem?

metalefty commented 2 years ago

Have you installed xorgxrdp?

Cyanat commented 2 years ago

No indeed... Now it's done. When I validate my credentials, windows remains blank (blue) for a while, then automatically close. Here are logs:

[INFO ] Found X server running at /tmp/.X11-unix/X10
[INFO ] Found X server running at /tmp/.X11-unix/X10
[INFO ] Found X server running at /tmp/.X11-unix/X10
[INFO ] Session started successfully for user root on display 10
[INFO ] Starting the xrdp channel server for display 10
[INFO ] Starting the default window manager on display 10: /etc/xrdp/startwm.sh
[INFO ] Session in progress on display 10, waiting until the window manager (pid 2995) exits to end the session
[WARN ] Window manager (pid 2995, display 10) exited quickly (0 secs). This could indicate a window manager config problem
[INFO ] Calling auth_stop_session and auth_end from pid 2994
pam_unix(xrdp-sesman:session): session closed for user root
[INFO ] Terminating X server (pid 2996) on display 10
[INFO ] Terminating the xrdp channel server (pid 3001) on display 10
[INFO ] X server on display 10 (pid 2996) returned exit code 0 and signal number 0
[INFO ] xrdp channel server for display 10 (pid 3001) exit code 0 and signal number 0
[INFO ] cleanup_sockets:
[INFO ] ++ terminated session:  username root, display :10.0, session_pid 2994, ip 10.0.0.70:53285 - socket: 12
[WARN ] xrdp_mm_connect_chansrv: connect failed trying again...
[WARN ] xrdp_mm_connect_chansrv: connect failed trying again...
[WARN ] xrdp_mm_connect_chansrv: connect failed trying again...
[WARN ] xrdp_mm_connect_chansrv: connect failed trying again...
[ERROR] xrdp_mm_connect_chansrv: error in trans_connect chan
[ERROR] SSL_shutdown: Failure in SSL library (protocol error?)
[ERROR] SSL: error:14094123:SSL routines:ssl3_read_bytes:application data after close notify

In .xorgxrdp10.log, I still have following errors:

[   493.600] (EE) AIGLX error: dlopen of /usr/lib/xorg/modules/dri/swrast_dri.so failed (Error loading shared library /usr/lib/xorg/modules/dri/swrast_dri.so: No such file or directory)
[   493.600] (EE) AIGLX error: unable to load driver swrast
[   493.600] (EE) GLX: could not load software renderer
metalefty commented 2 years ago

Then, you should install a package that includes /usr/lib/xorg/modules/dri/swrast_dri.so. After installing that, if there's something not found, install it next.

Cyanat commented 2 years ago

Thanks for your help. This package solved the errors in .xorgxrdp10.log: apk add mesa-dri-swrast

Still, behavior of the RDP windows remains the same (closing after few seconds). See log in my previous message.

matt335672 commented 2 years ago

@Cyanat

The session is started by calling /etc/xrdp/startwm.sh

Assuming you're running xrdp-0.9.18.r0, this should be calling /etc/X11/xinit/xinitrc which is a dependency of xrdp.

This does a bit of setup, and then (on your system) should call startxfce4 which is provided by the xfce4-session package. This is not a dependency of xrdp, as you may be running any one of several session managers.

Have you got xfce4-session installed?

If you have, we'll need to find out what the session is doing. You can do that by putting the following line near the top of /etc/xrdp/startwm.sh :-

exec >$HOME/xsession-errors.log 2>&1

That will give us a log file containing further clues

Cyanat commented 2 years ago

@matt335672 I have installed xrdp from the Alpine Linux repository, where version is xrdp-0.9.17-r3. I also have xfce4-session-4.16.0-r0.

Here is what I get in my xsession-errors.log when enabling debug logs:

Running X session wrapper
Loading profile from /etc/profile
Loading xinit script /etc/X11/xinit/xinitrc.d/*
X session wrapper complete, running session

Don't know if it's normal, but my folder /etc/X11/xinit/xinitrc.d/ is empty...

matt335672 commented 2 years ago

The empty folder is normal.

Those log messages look like they're generated by lightdm (i.e. on the console) rather than xrdp.

Can you check a couple of things:- 1) The date and time on xsession-errors.log is consistent with the xrdp login? 2) That /etc/xrdp/startwm.sh is executable.

I might inadvertently have picked the same log name lightdm uses. It might be worth changing the log file name as well.

Cyanat commented 2 years ago
  1. Date and time on xsession-errors.log file is contistent with the xrdp login. If i delete this file, it's recreated right after a new RDP access try.
  2. /etc/xrdp/startwm.sh is executable

I've tried to redirect logs to a file named xsession-errors_customs.log, logs are the same than before.

matt335672 commented 2 years ago

Thanks - that's useful information, although at the moment it makes no sense to me at all!

Let's try executing thing with a trace. What do you get with this command from the command line?

DISPLAY= sh -x /etc/X11/xinit/xinitrc

On my system, the trace ends with a call to startxfce4 which I then have to ctrl-c out of.

Cyanat commented 2 years ago

@matt335672 My Alpine server automatically start XFCE on boot. So connecting on ssh to run this command give me these logs:

test-alpine-xfce:~# DISPLAY= sh -x /etc/X11/xinit/xinitrc
+ userresources=/root/.Xresources
+ usermodmap=/root/.Xmodmap
+ xinitdir=/etc/X11
+ sysresources=/etc/X11/Xresources
+ sysmodmap=/etc/X11/Xmodmap
+ '[' -f /etc/X11/Xresources ]
+ '[' -f /etc/X11/Xmodmap ]
+ '[' -f /root/.Xresources ]
+ '[' -f /root/.Xmodmap ]
+ '[' -f /root/.xinitrc ]
+ '[' -d /etc/X11/xinit/xinitrc.d ]
+ '[' -x '/etc/X11/xinit/xinitrc.d/?*' ]
+ unset f
+ command -v startxfce4
+ exec startxfce4
/usr/bin/startxfce4: Starting X server

(EE)
Fatal server error:
(EE) Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE)
Invalid MIT-MAGIC-COOKIE-1 keyxinit: giving up
xinit: unable to connect to X server: Resource temporarily unavailable
xinit: server error

And here is what I get when stopping lightdm:

test-alpine-xfce:~# /etc/init.d/lightdm stop
 * Stopping Display Manager ...                                                                                                                                                                                                        [ ok ]
test-alpine-xfce:~# DISPLAY= sh -x /etc/X11/xinit/xinitrc
+ userresources=/root/.Xresources
+ usermodmap=/root/.Xmodmap
+ xinitdir=/etc/X11
+ sysresources=/etc/X11/Xresources
+ sysmodmap=/etc/X11/Xmodmap
+ '[' -f /etc/X11/Xresources ]
+ '[' -f /etc/X11/Xmodmap ]
+ '[' -f /root/.Xresources ]
+ '[' -f /root/.Xmodmap ]
+ '[' -f /root/.xinitrc ]
+ '[' -d /etc/X11/xinit/xinitrc.d ]
+ '[' -x '/etc/X11/xinit/xinitrc.d/?*' ]
+ unset f
+ command -v startxfce4
+ exec startxfce4
/usr/bin/startxfce4: Starting X server

X.Org X Server 1.21.1.2
X Protocol Version 11, Revision 0
Current Operating System: Linux test-alpine-xfce 5.15.28-0-lts #1-Alpine SMP Wed, 16 Mar 2022 10:51:37 +0000 x86_64
Kernel command line: BOOT_IMAGE=vmlinuz-lts root=UUID=fe92e9c0-86ee-4afc-a174-ba04f85900e6 modules=sd-mod,usb-storage,ext4 pax_nouderef quiet rootfstype=ext4 initrd=initramfs-lts

Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Mar 21 09:35:51 2022
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
VMware: No 3D enabled (0, No error information).
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86BrightnessAuto
> Warning:          Could not resolve keysym XF86DisplayOff
> Warning:          Could not resolve keysym XF86Info
> Warning:          Could not resolve keysym XF86AspectRatio
> Warning:          Could not resolve keysym XF86DVD
> Warning:          Could not resolve keysym XF86Audio
> Warning:          Could not resolve keysym XF86ChannelUp
> Warning:          Could not resolve keysym XF86ChannelDown
> Warning:          Could not resolve keysym XF86Break
> Warning:          Could not resolve keysym XF86VideoPhone
> Warning:          Could not resolve keysym XF86ZoomReset
> Warning:          Could not resolve keysym XF86Editor
> Warning:          Could not resolve keysym XF86GraphicsEditor
> Warning:          Could not resolve keysym XF86Presentation
> Warning:          Could not resolve keysym XF86Database
> Warning:          Could not resolve keysym XF86Voicemail
> Warning:          Could not resolve keysym XF86Addressbook
> Warning:          Could not resolve keysym XF86DisplayToggle
> Warning:          Could not resolve keysym XF86SpellCheck
> Warning:          Could not resolve keysym XF86ContextMenu
> Warning:          Could not resolve keysym XF86MediaRepeat
> Warning:          Could not resolve keysym XF8610ChannelsUp
> Warning:          Could not resolve keysym XF8610ChannelsDown
> Warning:          Could not resolve keysym XF86Images
> Warning:          Could not resolve keysym XF86NotificationCenter
> Warning:          Could not resolve keysym XF86PickupPhone
> Warning:          Could not resolve keysym XF86HangupPhone
> Warning:          Could not resolve keysym XF86Fn
> Warning:          Could not resolve keysym XF86Fn_Esc
> Warning:          Could not resolve keysym XF86FnRightShift
> Warning:          Could not resolve keysym XF86Numeric0
> Warning:          Could not resolve keysym XF86Numeric1
> Warning:          Could not resolve keysym XF86Numeric2
> Warning:          Could not resolve keysym XF86Numeric3
> Warning:          Could not resolve keysym XF86Numeric4
> Warning:          Could not resolve keysym XF86Numeric5
> Warning:          Could not resolve keysym XF86Numeric6
> Warning:          Could not resolve keysym XF86Numeric7
> Warning:          Could not resolve keysym XF86Numeric8
> Warning:          Could not resolve keysym XF86Numeric9
> Warning:          Could not resolve keysym XF86NumericStar
> Warning:          Could not resolve keysym XF86NumericPound
> Warning:          Could not resolve keysym XF86NumericA
> Warning:          Could not resolve keysym XF86NumericB
> Warning:          Could not resolve keysym XF86NumericC
> Warning:          Could not resolve keysym XF86NumericD
> Warning:          Could not resolve keysym XF86CameraFocus
> Warning:          Could not resolve keysym XF86WPSButton
> Warning:          Could not resolve keysym XF86CameraZoomIn
> Warning:          Could not resolve keysym XF86CameraZoomOut
> Warning:          Could not resolve keysym XF86CameraUp
> Warning:          Could not resolve keysym XF86CameraDown
> Warning:          Could not resolve keysym XF86CameraLeft
> Warning:          Could not resolve keysym XF86CameraRight
> Warning:          Could not resolve keysym XF86AttendantOn
> Warning:          Could not resolve keysym XF86AttendantOff
> Warning:          Could not resolve keysym XF86AttendantToggle
> Warning:          Could not resolve keysym XF86LightsToggle
> Warning:          Could not resolve keysym XF86ALSToggle
> Warning:          Could not resolve keysym XF86Buttonconfig
> Warning:          Could not resolve keysym XF86Taskmanager
> Warning:          Could not resolve keysym XF86Journal
> Warning:          Could not resolve keysym XF86ControlPanel
> Warning:          Could not resolve keysym XF86AppSelect
> Warning:          Could not resolve keysym XF86Screensaver
> Warning:          Could not resolve keysym XF86VoiceCommand
> Warning:          Could not resolve keysym XF86Assistant
> Warning:          Could not resolve keysym XF86BrightnessMin
> Warning:          Could not resolve keysym XF86BrightnessMax
> Warning:          Could not resolve keysym XF86KbdInputAssistPrev
> Warning:          Could not resolve keysym XF86KbdInputAssistNext
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgroup
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgroup
> Warning:          Could not resolve keysym XF86KbdInputAssistAccept
> Warning:          Could not resolve keysym XF86KbdInputAssistCancel
> Warning:          Could not resolve keysym XF86RightUp
> Warning:          Could not resolve keysym XF86RightDown
> Warning:          Could not resolve keysym XF86LeftUp
> Warning:          Could not resolve keysym XF86LeftDown
> Warning:          Could not resolve keysym XF86RootMenu
> Warning:          Could not resolve keysym XF86MediaTopMenu
> Warning:          Could not resolve keysym XF86Numeric11
> Warning:          Could not resolve keysym XF86Numeric12
> Warning:          Could not resolve keysym XF86AudioDesc
> Warning:          Could not resolve keysym XF863DMode
> Warning:          Could not resolve keysym XF86NextFavorite
> Warning:          Could not resolve keysym XF86StopRecord
> Warning:          Could not resolve keysym XF86PauseRecord
> Warning:          Could not resolve keysym XF86VOD
> Warning:          Could not resolve keysym XF86Unmute
> Warning:          Could not resolve keysym XF86FastReverse
> Warning:          Could not resolve keysym XF86SlowReverse
> Warning:          Could not resolve keysym XF86Data
> Warning:          Could not resolve keysym XF86OnScreenKeyboard
> Warning:          Could not resolve keysym XF86PrivacyScreenToggle
> Warning:          Could not resolve keysym XF86SelectiveScreenshot
> Warning:          Could not resolve keysym XF86Macro1
> Warning:          Could not resolve keysym XF86Macro2
> Warning:          Could not resolve keysym XF86Macro3
> Warning:          Could not resolve keysym XF86Macro4
> Warning:          Could not resolve keysym XF86Macro5
> Warning:          Could not resolve keysym XF86Macro6
> Warning:          Could not resolve keysym XF86Macro7
> Warning:          Could not resolve keysym XF86Macro8
> Warning:          Could not resolve keysym XF86Macro9
> Warning:          Could not resolve keysym XF86Macro10
> Warning:          Could not resolve keysym XF86Macro11
> Warning:          Could not resolve keysym XF86Macro12
> Warning:          Could not resolve keysym XF86Macro13
> Warning:          Could not resolve keysym XF86Macro14
> Warning:          Could not resolve keysym XF86Macro15
> Warning:          Could not resolve keysym XF86Macro16
> Warning:          Could not resolve keysym XF86Macro17
> Warning:          Could not resolve keysym XF86Macro18
> Warning:          Could not resolve keysym XF86Macro19
> Warning:          Could not resolve keysym XF86Macro20
> Warning:          Could not resolve keysym XF86Macro21
> Warning:          Could not resolve keysym XF86Macro22
> Warning:          Could not resolve keysym XF86Macro23
> Warning:          Could not resolve keysym XF86Macro24
> Warning:          Could not resolve keysym XF86Macro25
> Warning:          Could not resolve keysym XF86Macro26
> Warning:          Could not resolve keysym XF86Macro27
> Warning:          Could not resolve keysym XF86Macro28
> Warning:          Could not resolve keysym XF86Macro29
> Warning:          Could not resolve keysym XF86Macro30
> Warning:          Could not resolve keysym XF86MacroRecordStart
> Warning:          Could not resolve keysym XF86MacroRecordStop
> Warning:          Could not resolve keysym XF86MacroPresetCycle
> Warning:          Could not resolve keysym XF86MacroPreset1
> Warning:          Could not resolve keysym XF86MacroPreset2
> Warning:          Could not resolve keysym XF86MacroPreset3
> Warning:          Could not resolve keysym XF86KbdLcdMenu1
> Warning:          Could not resolve keysym XF86KbdLcdMenu2
> Warning:          Could not resolve keysym XF86KbdLcdMenu3
> Warning:          Could not resolve keysym XF86KbdLcdMenu4
> Warning:          Could not resolve keysym XF86KbdLcdMenu5
Errors from xkbcomp are not fatal to the X server
xfce4-session: No GPG agent found

(xfwm4:3218): xfwm4-WARNING **: 09:35:52.051: Unsupported GL renderer (llvmpipe (LLVM 12.0.1, 256 bits)).

** (xfce4-power-manager:3248): WARNING **: 09:35:52.515: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name

** (xfce4-power-manager:3248): WARNING **: 09:35:52.515: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name

(xfce4-power-manager:3248): libnotify-WARNING **: 09:35:52.565: Failed to connect to proxy

(xfce4-power-manager:3248): GLib-GObject-WARNING **: 09:35:52.568: ../gobject/gsignal.c:2614: signal 'Changed' is invalid for instance '0x7f0f9eb4e100' of type 'GDBusProxy'

(xfce4-power-manager:3248): xfce4-power-manager-WARNING **: 09:35:52.584: could not map keysym 1008ffa8 to keycode

** (xfce4-power-manager:3248): WARNING **: 09:35:52.585: No outputs have backlight property

(xfce4-power-manager:3248): xfce4-power-manager-WARNING **: 09:35:52.587: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/freedesktop/UPower/KbdBacklight”

** (xfce4-screensaver:3250): WARNING **: 09:35:52.593: screensaver already running in this session

** (wrapper-2.0:3262): WARNING **: 09:35:53.125: No outputs have backlight property

(wrapper-2.0:3262): Gtk-CRITICAL **: 09:35:53.171: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(wrapper-2.0:3262): Gtk-CRITICAL **: 09:35:53.176: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(wrapper-2.0:3262): Gtk-CRITICAL **: 09:35:53.176: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(wrapper-2.0:3262): Gtk-CRITICAL **: 09:35:53.221: gtk_icon_theme_has_icon: assertion 'icon_name != NULL' failed

(wrapper-2.0:3276): Gtk-WARNING **: 09:35:53.224: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)

(wrapper-2.0:3262): Gtk-WARNING **: 09:35:53.234: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PowerManagerButton)

Running this command without using ssh access but directly on the server ( vmware mmachine) start the GUI without particular error.

matt335672 commented 2 years ago

That's fine - I just wanted to check that startxfce4 was run.

It looks like /etc/xrdp/startwm.sh is for some reason not calling /etc/X11/xinit/xinitrc, which is odd.

In your /etc/xrdp/startwm.sh, after the exec line we've added to generate a log file, can you add this line:-

set -x

That will add more tracing to the log file, so we should be able to follow the calls through.

Cyanat commented 2 years ago

Sure, here is log file:

+ wm_start
+ '[' -r /etc/default/locale ']'
+ '[' -r /etc/X11/Xsession ']'
+ '[' -r /etc/X11/xinit/Xsession ']'
+ pre_start
+ '[' -r /etc/profile ']'
+ . /etc/profile
++ append_path /usr/local/sbin
++ case ":$PATH:" in
++ PATH=/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
++ append_path /usr/local/bin
++ case ":$PATH:" in
++ append_path /usr/sbin
++ case ":$PATH:" in
++ PATH=/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin
++ append_path /usr/bin
++ case ":$PATH:" in
++ append_path /sbin
++ case ":$PATH:" in
++ append_path /bin
++ case ":$PATH:" in
++ unset -f append_path
++ export PATH
++ export PAGER=less
++ PAGER=less
++ umask 022
++ : test-alpine-xfce
++ PS1='${HOSTNAME%%.*}:$PWD'
+++ id -u
++ '[' 0 = 0 ']'
++ PS1='${HOSTNAME%%.*}:$PWD# '
+++ id -u
++ '[' 0 = 0 ']'
++ '[' -n '5.1.16(1)-release' -o '' ']'
++ PS1='\h:\w\$ '
++ '[' -n '' ']'
++ export PS1
++ for script in /etc/profile.d/*.sh
++ '[' -r /etc/profile.d/locale.sh ']'
++ . /etc/profile.d/locale.sh
+++ export CHARSET=UTF-8
+++ CHARSET=UTF-8
+++ export LANG=C.UTF-8
+++ LANG=C.UTF-8
+++ export LC_COLLATE=C
+++ LC_COLLATE=C
++ for script in /etc/profile.d/*.sh
++ '[' -r /etc/profile.d/vte.sh ']'
++ . /etc/profile.d/vte.sh
+++ '[' -n '5.1.16(1)-release' -o -n '' ']'
+++ [[ hxB == *i* ]]
+++ return 0
++ unset script
+ '[' -r /root/.bash_profile ']'
+ '[' -r /root/.bash_login ']'
+ '[' -r /root/.profile ']'
+ return 0
+ . /etc/X11/xinit/Xsession
++ echo 'Running X session wrapper'
Running X session wrapper
++ for file in /etc/profile "$HOME/.profile" /etc/xprofile "$HOME/.xprofile"
++ '[' -f /etc/profile ']'
++ echo 'Loading profile from /etc/profile'
Loading profile from /etc/profile
++ . /etc/profile
+++ append_path /usr/local/sbin
+++ case ":$PATH:" in
+++ append_path /usr/local/bin
+++ case ":$PATH:" in
+++ append_path /usr/sbin
+++ case ":$PATH:" in
+++ append_path /usr/bin
+++ case ":$PATH:" in
+++ append_path /sbin
+++ case ":$PATH:" in
+++ append_path /bin
+++ case ":$PATH:" in
+++ unset -f append_path
+++ export PATH
+++ export PAGER=less
+++ PAGER=less
+++ umask 022
+++ : test-alpine-xfce
+++ PS1='${HOSTNAME%%.*}:$PWD'
++++ id -u
+++ '[' 0 = 0 ']'
+++ PS1='${HOSTNAME%%.*}:$PWD# '
++++ id -u
+++ '[' 0 = 0 ']'
+++ '[' -n '5.1.16(1)-release' -o '' ']'
+++ PS1='\h:\w\$ '
+++ '[' -n '' ']'
+++ export PS1
+++ for script in /etc/profile.d/*.sh
+++ '[' -r /etc/profile.d/locale.sh ']'
+++ . /etc/profile.d/locale.sh
++++ export CHARSET=UTF-8
++++ CHARSET=UTF-8
++++ export LANG=C.UTF-8
++++ LANG=C.UTF-8
++++ export LC_COLLATE=C
++++ LC_COLLATE=C
+++ for script in /etc/profile.d/*.sh
+++ '[' -r /etc/profile.d/vte.sh ']'
+++ . /etc/profile.d/vte.sh
++++ '[' -n '5.1.16(1)-release' -o -n '' ']'
++++ [[ hxB == *i* ]]
++++ return 0
+++ unset script
++ for file in /etc/profile "$HOME/.profile" /etc/xprofile "$HOME/.xprofile"
++ '[' -f /root/.profile ']'
++ for file in /etc/profile "$HOME/.profile" /etc/xprofile "$HOME/.xprofile"
++ '[' -f /etc/xprofile ']'
++ for file in /etc/profile "$HOME/.profile" /etc/xprofile "$HOME/.xprofile"
++ '[' -f /root/.xprofile ']'
++ for file in /etc/X11/Xresources "$HOME/.Xresources"
++ '[' -f /etc/X11/Xresources ']'
++ for file in /etc/X11/Xresources "$HOME/.Xresources"
++ '[' -f /root/.Xresources ']'
++ use_xkbmap=false
++ for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"
++ '[' -f /etc/X11/Xkbmap ']'
++ for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"
++ '[' -f /root/.Xkbmap ']'
++ false
++ for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"
++ '[' -f /etc/X11/Xmodmap ']'
++ for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"
++ '[' -f /root/.Xmodmap ']'
++ xinitdir=/etc/X11/xinit/xinitrc.d
++ '[' -d /etc/X11/xinit/xinitrc.d ']'
++ for script in $xinitdir/*
++ echo 'Loading xinit script /etc/X11/xinit/xinitrc.d/*'
Loading xinit script /etc/X11/xinit/xinitrc.d/*
++ '[' -x '/etc/X11/xinit/xinitrc.d/*' -a '!' -d '/etc/X11/xinit/xinitrc.d/*' ']                                                                                                                                                             '
++ echo 'X session wrapper complete, running session '
X session wrapper complete, running session
++ exec
+ post_start
+ '[' -r /root/.bash_logout ']'
+ return 0
+ exit 0
matt335672 commented 2 years ago

Your /etc/xrdp/startwm.sh appears to be out of date. You're running into the problem fixed by #2005

Mine has the following stanza which you don't appear to have:-

. . .
wm_start()
{
  if [ -r /etc/default/locale ]; then
    . /etc/default/locale
    export LANG LANGUAGE
  fi

  # debian
  if [ -r /etc/X11/Xsession ]; then
    pre_start
    . /etc/X11/Xsession
    post_start
    exit 0
  fi

  # alpine
  # Don't use /etc/X11/xinit/Xsession - it doesn't work
  if [ -f /etc/alpine-release ]; then
    if [ -f /etc/X11/xinit/xinitrc ]; then 
        pre_start
        /etc/X11/xinit/xinitrc
        post_start
    else
        echo "** xinit package isn't installed" >&2
        exit 1
    fi
  fi

  # el

What do you get for apk version xrdp?

$ apk version xrdp
Installed:                                Available:
xrdp-0.9.18.1-r0                        = 0.9.18.1-r0 
Cyanat commented 2 years ago

Matt,

test-alpine-xfce:~# apk version xrdp
Installed:                                Available:
xrdp-0.9.17-r3                          = 0.9.17-r3

Sorry matt, I thought, you had noticed that. As said earlier, I have installed xrdp from alpine repositories:

http://dl-cdn.alpinelinux.org/alpine/v3.15/main
http://dl-cdn.alpinelinux.org/alpine/v3.15/community

These repositories are apparently not up-to-date regarding xrdp. I guess I will have to install modify my startwm.sh according github version.

matt335672 commented 2 years ago

@Cyanat - my apologies. I didn't quite realise what state things were in.

xrdp 0.9.18-r0 is in edge:-

https://pkgs.alpinelinux.org/package/edge/community/x86_64/xrdp

V3.15 has the older version:-

https://pkgs.alpinelinux.org/package/v3.15/community/x86_64/xrdp

I didn't actually realise xrdp 0.9.18 hadn't made it into v3.15/community - sorry. I was working on the package with the Alpine guys and so my Alpine VM is a bit of a mess.

You could temporarily add edge/community to /etc/apk/repositories and update just xrdp. That should work. But as you say, it's safer to just down load startwm.sh from here which I think should fix things for you.

Cyanat commented 2 years ago

@matt335672 Thank you very much for your support, I confirm that xrdp is working with the updated startwm.sh