Package: xrdp Version: 0.10.1-3.1+deb13u2 Severity: normal Dear Maintainer,
I'm using xrdp on a ChromeBook, not Windows. I use the penguin Linux container on the ChromeBook to run xfreerdp3 and I then work within a remote XFCE4 desktop and most of my work is very text-based. I have found that when I use xterm (or uxterm), with VT100 translations to insert-selection(CLIPBOARD) into the XTerm, I get double lines. I'm not alone. Other people have recorded this problem. Here is such a entry http://superuser.com/questions/1156974/double-new-line-when-copy-to-konsole-on-xrdp/1940620#1940620 I contributed to this thread as Bonaparte. (The solution that satisfied the poster "stty -icrnl" is a red-herring. He is pasting into vim which recognizes carriage return as a new-line.) Because XRDP was written for Windows clients, it converts Unix line-endings \n to Windows \r\n. But if you are pasting to another Unix application, via a tty, then tty converts \r to \n and the windows \r\n and becomes \n\n - and you get the double lines. If you use the stty -icrnl trick then you get double ^M^M (ie. \r\r) instead of \n\n. As I mention in the post at superuser, you don't get double line spacing if you use the X11 middle button paste method. Here are my VT100 translations: UXTerm*VT100.cutNewline: false UXTerm*VT100.cutToBeginningOfLine: true UXTerm*selectToClipboard: false UXTerm*VT100.translations: #override \n\ Ctrl <Key>Insert: copy-selection(CLIPBOARD) \n\ Shift <Key>Insert: insert-selection(CLIPBOARD) \n\ So I make a listing: ls -1 Downloads etc lib local Music notes.txt Pictures profile~ Public share src super.sh Templates And then I copy it with Ctrl-Ins and paste it in od -c lib local Music notes.txt Pictures profile~ Public share src super.sh Templates 0000000 D o w n l o a d s \n \n e t c \n \n 0000020 l i b \n \n l o c a l \n \n M u s i Double lines because \n was converted \r\n and tty converts those to \n\n If I look at xclip -o etc lib local Music notes.txt Pictures profile~ Public share src super.sh (B1-root)weaves@beatrice:~$ xclip -o | od -c 0000000 e t c \n l i b \n l o c a l \n M u 0000020 s i c \n n o t e s . t x t \n P i 0000040 c t u r e s \n p r o f i l e ~ \n 0000060 P u b l i c \n s h a r e \n s r c 0000100 \n s u p e r . s h \n 0000112 So no double lines. If I use the stty -icrnl Documents Downloads etc lib local Music notes.txt Pictures profile~ Public share src super.sh Templates thinclient_drives tmp t.txt Videos (B1-root)weaves@beatrice:~$ stty -icrnl (B1-root)weaves@beatrice:~$ od -c Documents^M^MDownloads^M^Metc^M^Mlib^M^Mlocal^M^MMusic^M^Mnotes.txt^M^MPictures^M^Mprofile~^M^MPublic^M^M^M^C (B1-root)weaves@beatrice:~$ But if use mouse select and middle button insert ~$ od -c Desktop Documents Downloads etc lib local Music 0000000 D e s k t o p \n D o c u m e n t 0000020 s \n D o w n l o a d s \n e t c \n 0000040 l i b \n l o c a l \n M u s i c \n That works. I also mention in the post at super-user that other Terminal Emulators (GNOME Terminal, XFCE4 Terminal) they work because they use libvte and not tty to do their translation. If I kill the xrdp-chansrv process on the host running XRDP which supports the xterm, then it also works, but I can't copy or paste from the ChromeBook that is running xfreerdp3. Unfortunately for me, I can't switch over to using the libvte terminal applications. Would the upstream developers be able to add an extra configuration setting for sesman.ini? ClipBoard.LineEndings = u2d | u2u with u2d as the default? And u2u would do nothing but leave the existing line-endings unchanged Thanks! Wonderful application, it's my only first choice remote session tool now. -- System Information: Debian Release: 13.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.12.101+deb13-amd64 (SMP w/2 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages xrdp depends on: ii adduser 3.152 ii init-system-helpers 1.69~deb13u1 ii libc6 2.41-12+deb13u4 ii libfuse2t64 2.9.9-9 ii libjpeg62-turbo 1:2.1.5-4 ii libopus0 1.5.2-2 ii libpam0g 1.7.0-5 ii libssl3t64 3.5.7-1~deb13u2 ii libx11-6 2:1.8.12-1 ii libxfixes3 1:6.0.0-2+b4 ii libxrandr2 2:1.5.4-1+b3 ii ssl-cert 1.1.3 ii sysvinit-utils 3.14-4 Versions of packages xrdp recommends: ii fuse3 [fuse] 3.17.2-3 hi xorgxrdp 1:0.10.2-1 Versions of packages xrdp suggests: pn guacamole <none> Versions of packages xorgxrdp depends on: ii libc6 2.41-12+deb13u4 ii libepoxy0 1.5.10-2 pn xorg-input-abi-24 <none> ii xserver-xorg-core [xorg-video-abi-25] 2:21.1.16-1.3+deb13u4 Versions of packages xorgxrdp recommends: ii xorg 1:7.7+24+deb13u1 Versions of packages xrdp is related to: pn vnc-server <none> ii xserver-xorg-legacy 2:21.1.16-1.3+deb13u4 -- Configuration Files: /etc/xrdp/sesman.ini changed: ;; See `man 5 sesman.ini` for details [Globals] ; listening port EnableUserWindowManager=true ; Give in relative path to user's home directory UserWindowManager=startwm.sh ; Give in full path or relative path to /etc/xrdp DefaultWindowManager=startwm.sh ; Give in full path or relative path to /etc/xrdp ReconnectScript=reconnectwm.sh [Security] AllowRootLogin=true MaxLoginRetry=4 TerminalServerUsers=tsusers TerminalServerAdmins=tsadmins ; When AlwaysGroupCheck=false access will be permitted ; if the group TerminalServerUsers is not defined. AlwaysGroupCheck=false ; When RestrictOutboundClipboard=all clipboard from the ; server is not pushed to the client. ; In addition, you can control text/file/image transfer restrictions ; respectively. It also accepts comma separated list such as text,file,image. ; To keep compatibility, some aliases are also available: ; true: an alias of all ; false: an alias of none ; yes: an alias of all RestrictOutboundClipboard=none ; When RestrictInboundClipboard=all clipboard from the ; client is not pushed to the server. ; In addition, you can control text/file/image transfer restrictions ; respectively. It also accepts comma separated list such as text,file,image. ; To keep compatibility, some aliases are also available: ; true: an alias of all ; false: an alias of none ; yes: an alias of all RestrictInboundClipboard=none ; Set to 'no' to prevent users from logging in with alternate shells ; On Linux systems, the Xorg X11 server is normally invoked using ; no_new_privs to avoid problems if the executable is suid. This may, ; however, interfere with the use of security modules such as AppArmor. ; Leave this unset unless you need to disable it. ; Specify the group which is to have read access to the directory where ; local sockets for the session are created. This is normally the GID ; which the xrdp process runs as. ; Default is 'root' [Sessions] ;; X11DisplayOffset - x11 display number offset ; Type: integer ; Default: 10 X11DisplayOffset=10 ;; MaxSessions - maximum number of connections to an xrdp server ; Type: integer ; Default: 0 MaxSessions=50 ;; MaxDisplayNumer - maximum number considered for an X display ; Type: integer ; Default: 63 ; ; IANA only allocates TCP ports up to 6063 for X servers. If you are not ; allowing TCP connections to your X servers you may safely increase this ; number. ;; KillDisconnected - kill disconnected sessions ; Type: boolean ; Default: false ; if 1, true, or yes, every session will be killed within DisconnectedTimeLimit ; seconds after the user disconnects KillDisconnected=false ;; DisconnectedTimeLimit (seconds) - wait before kill disconnected sessions ; Type: integer ; Default: 0 ; if KillDisconnected is set to false, this value is ignored DisconnectedTimeLimit=0 ;; IdleTimeLimit (seconds) - wait before disconnect idle sessions ; Type: integer ; Default: 0 ; Set to 0 to disable idle disconnection. IdleTimeLimit=0 ;; Policy - session allocation policy ; ; Type: enum [ "Default" | "Separate" | Combination from {UBDI} ] ; "Default" Currently same as "UB" ; "Separate" All sessions are separate. Sessions can never be rejoined, ; and will need to be cleaned up manually, or automatically ; by setting other sesman options. ; ; Combination options:- ; U Sessions are separated per user ; B Sessions are separated by bits-per-pixel ; D Sessions are separated by initial display size ; I Sessions are separated by IP address ; ; The options U and B are always active, and cannot be de-selected. Policy=Default [Logging] ; Note: Log levels can be any of: core, error, warning, info, debug, or trace LogFile=xrdp-sesman.log LogLevel=INFO EnableSyslog=true [LoggingPerLogger] ; Note: per logger configuration is only used if xrdp is built with ; --enable-devel-logging ; ; 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 appropriate 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 ; FreeBSD (from 2022Q4) : param=/usr/local/libexec/Xorg ; param=/usr/lib/xorg/Xorg ; Leave the rest parameters as-is unless you understand what will happen. param=-config param=xrdp/xorg.conf param=-noreset param=-ac param=-listen param=tcp param=-logfile param=.xorgxrdp.%s.log [Xvnc] param=Xvnc param=-bs param=-nolisten param=tcp param=-localhost param=-dpi param=96 [Chansrv] ; drive redirection ; See sesman.ini(5) for the format of this parameter FuseMountName=thinclient_drives ; this value allows only the user to access their own mapped drives. ; Make this more permissive (e.g. 022) if required. FileUmask=077 ; Can be used to disable FUSE functionality - see sesman.ini(5) EnableFuseMount=false ; Uncomment this line only if you are using GNOME 3 versions 3.29.92 ; and up, and you wish to cut-paste files between Nautilus and Windows. Do ; not use this setting for GNOME 4, or other file managers ; sound redirection ; workaround for Microsoft mstsc.exe to suppress noise. ; SoundNumSilentFramesAAC | SoundNumSilentFramesMP3 silent frames are sent before SNDC_CLOSE is sent. ; during SoundMsecDoNotSend mS after SNDC_CLOSE is sent, sound data is not send. ; depending on the environment, it might be necessary to increase values. ; Defaults: SoundNumSilentFramesAAC=4, SoundNumSilentFramesMP3=2, SoundMsecDoNotSend=1000 ; If set to 0, this workaround is not applied. [ChansrvLogging] ; Note: one log file is created per display and the LogFile config value ; is ignored. The channel server log file names follow the naming convention: ; xrdp-chansrv.${DISPLAY}.log ; ; Note: Log levels can be any of: core, error, warning, info, debug, or trace LogLevel=INFO EnableSyslog=true [ChansrvLoggingPerLogger] ; Note: per logger configuration is only used if xrdp is built with ; --enable-devel-logging [SessionVariables] PULSE_SCRIPT=/etc/xrdp/pulse/default.pa SSH_AUTH_SOCK=/run/user/10014/openssh_agent -- no debconf information

