termux-packages/x11-packages/xrdp/fix-configs.patch
2022-04-18 14:43:53 +05:30

248 lines
6.1 KiB
Diff

diff -uNr xrdp-0.9.14/sesman/sesman.ini xrdp-0.9.14.mod/sesman/sesman.ini
--- xrdp-0.9.14/sesman/sesman.ini 2020-08-31 06:33:40.000000000 +0000
+++ xrdp-0.9.14.mod/sesman/sesman.ini 2020-09-12 21:30:47.582018081 +0000
@@ -4,11 +4,14 @@
ListenAddress=127.0.0.1
ListenPort=3350
EnableUserWindowManager=true
+
; Give in relative path to user's home directory
UserWindowManager=startwm.sh
-; Give in full path or relative path to /etc/xrdp
+
+; Give in full path or relative path to @TERMUX_PREFIX@/etc/xrdp
DefaultWindowManager=startwm.sh
-; Give in full path or relative path to /etc/xrdp
+
+; Give in full path or relative path to @TERMUX_PREFIX@/etc/xrdp
ReconnectScript=reconnectwm.sh
[Security]
@@ -16,6 +19,7 @@
MaxLoginRetry=4
TerminalServerUsers=tsusers
TerminalServerAdmins=tsadmins
+
; When AlwaysGroupCheck=false access will be permitted
; if the group TerminalServerUsers is not defined.
AlwaysGroupCheck=false
@@ -66,35 +70,13 @@
[Logging]
LogFile=xrdp-sesman.log
LogLevel=DEBUG
-EnableSyslog=1
+EnableSyslog=0
SyslogLevel=DEBUG
;
; Session definitions - startup command-line parameters for each session type
;
-[Xorg]
-; Specify the path of non-suid Xorg executable. It might differ depending
-; on your distribution and version. Find out the appropreate path for your
-; environment. The typical path is known as follows:
-;
-; Fedora 26 or later : param=/usr/libexec/Xorg
-; Debian 9 or later : param=/usr/lib/xorg/Xorg
-; Ubuntu 16.04 or later : param=/usr/lib/xorg/Xorg
-; Arch Linux : param=/usr/lib/Xorg
-; CentOS 7 : param=/usr/bin/Xorg or param=Xorg
-; CentOS 8 : param=/usr/libexec/Xorg
-;
-param=Xorg
-; Leave the rest paramaters as-is unless you understand what will happen.
-param=-config
-param=xrdp/xorg.conf
-param=-noreset
-param=-nolisten
-param=tcp
-param=-logfile
-param=.xorgxrdp.%s.log
-
[Xvnc]
param=Xvnc
param=-bs
@@ -112,4 +94,4 @@
FileUmask=077
[SessionVariables]
-PULSE_SCRIPT=/etc/xrdp/pulse/default.pa
+PULSE_SCRIPT=@TERMUX_PREFIX@/etc/xrdp/pulse/default.pa
diff -uNr xrdp-0.9.14/sesman/startwm.sh xrdp-0.9.14.mod/sesman/startwm.sh
--- xrdp-0.9.14/sesman/startwm.sh 2020-06-26 11:13:58.000000000 +0000
+++ xrdp-0.9.14.mod/sesman/startwm.sh 2020-09-12 21:30:20.244107105 +0000
@@ -4,12 +4,12 @@
# depending on your distro if it doesn't work for you.
#
# Uncomment the following line for debug:
-# exec xterm
+# exec aterm
# Execution sequence for interactive login shell - pseudocode
#
-# IF /etc/profile is readable THEN
+# IF @TERMUX_PREFIX@/etc/profile is readable THEN
# execute ~/.bash_profile
# END IF
# IF ~/.bash_profile is readable THEN
@@ -25,8 +25,8 @@
# END IF
pre_start()
{
- if [ -r /etc/profile ]; then
- . /etc/profile
+ if [ -r @TERMUX_PREFIX@/etc/profile ]; then
+ . @TERMUX_PREFIX@/etc/profile
fi
if [ -r ~/.bash_profile ]; then
. ~/.bash_profile
@@ -58,53 +58,13 @@
#start the window manager
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
-
- # el
- if [ -r /etc/X11/xinit/Xsession ]; then
- pre_start
- . /etc/X11/xinit/Xsession
- post_start
- exit 0
- fi
-
- # suse
- if [ -r /etc/X11/xdm/Xsession ]; then
- # since the following script run a user login shell,
- # do not execute the pseudo login shell scripts
- . /etc/X11/xdm/Xsession
- exit 0
- fi
-
pre_start
- xterm
+ aterm
post_start
}
-#. /etc/environment
+#PATH="@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets"
#export PATH=$PATH
-#export LANG=$LANG
-
-# change PATH to be what your environment needs usually what is in
-# /etc/environment
-#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
-#export PATH=$PATH
-
-# for PATH and LANG from /etc/environment
-# pam will auto process the environment file if /etc/pam.d/xrdp-sesman
-# includes
-# auth required pam_env.so readenv=1
wm_start
diff -uNr xrdp-0.9.14/xrdp/xrdp.ini xrdp-0.9.14.mod/xrdp/xrdp.ini
--- xrdp-0.9.14/xrdp/xrdp.ini 2020-08-31 06:33:40.000000000 +0000
+++ xrdp-0.9.14.mod/xrdp/xrdp.ini 2020-09-12 21:31:50.324403885 +0000
@@ -72,12 +72,12 @@
#hidelogwindow=true
max_bpp=32
new_cursors=true
+
; fastpath - can be 'input', 'output', 'both', 'none'
use_fastpath=both
+
; when true, userid/password *must* be passed on cmd line
#require_credentials=true
-; You can set the PAM error text in a gateway setup (MAX 256 chars)
-#pamerrortxt=change your password according to policy at http://url
;
; colors used by windows in RGB format
@@ -145,7 +145,7 @@
[Logging]
LogFile=xrdp.log
LogLevel=DEBUG
-EnableSyslog=true
+EnableSyslog=false
SyslogLevel=DEBUG
; LogLevel and SysLogLevel could by any of: core, error, warning, info or debug
@@ -165,32 +165,20 @@
tcutils=true
; for debugging xrdp, in section xrdp1, change port=-1 to this:
-#port=/tmp/.xrdp/xrdp_display_10
+#port=@TERMUX_PREFIX@/tmp/.xrdp/xrdp_display_10
; for debugging xrdp, add following line to section xrdp1
-#chansrvport=/tmp/.xrdp/xrdp_chansrv_socket_7210
+#chansrvport=@TERMUX_PREFIX@/tmp/.xrdp/xrdp_chansrv_socket_7210
;
; Session types
;
-; Some session types such as Xorg, X11rdp and Xvnc start a display server.
-; Startup command-line parameters for the display server are configured
-; in sesman.ini. See and configure also sesman.ini.
-[Xorg]
-name=Xorg
-lib=libxup.so
-username=ask
-password=ask
-ip=127.0.0.1
-port=-1
-code=20
-
[Xvnc]
name=Xvnc
lib=libvnc.so
-username=ask
+username=na
password=ask
ip=127.0.0.1
port=-1
@@ -200,27 +188,6 @@
; (1 = ExtendedDesktopSize)
#disabled_encodings_mask=0
-
-[vnc-any]
-name=vnc-any
-lib=libvnc.so
-ip=ask
-port=ask5900
-username=na
-password=ask
-#pamusername=asksame
-#pampassword=asksame
-#pamsessionmng=127.0.0.1
-#delay_ms=2000
-
-[neutrinordp-any]
-name=neutrinordp-any
-lib=libxrdpneutrinordp.so
-ip=ask
-port=ask3389
-username=ask
-password=ask
-
; You can override the common channel settings for each session type
#channel.rdpdr=true
#channel.rdpsnd=true