htb Mailroom里容器(Debian 11 (bullseye))开启远程桌面rdp

参考我之前的文章:

容器(ubuntu20.04)开启远程桌面rdp(显示xterm和xclock)

容器(ubuntu20.04)开启远程桌面rdp(显示xterm和xclock)(下)_ubuntu xclock 安装_qq_29060627的博客-CSDN博客最后有一句:saving to /etc/xrdp/rsakeys.ini,阿里云的镜像貌似没有。报以下错误,不影响使用。https://blog.csdn.net/qq_29060627/article/details/129101890

容器环境查看:

root@071381841c9e:/tmp# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@071381841c9e:/tmp# uname -a
Linux 071381841c9e 5.4.0-146-generic #163-Ubuntu SMP Fri Mar 17 18:26:02 UTC 2023 x86_64 GNU/Linux
root@071381841c9e:/tmp# 

走代理安装deb包

export http_proxy="http://10.10.14.50:8888";
export use_proxy=on;

export LANG=en_US.UTF-8
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
apt-get update; \
apt install -y xorg dbus-x11 x11-xserver-utils xterm xinit xorgxrdp ; \
which X  && apt install -y xrdp  ;

root@071381841c9e:/tmp# export http_proxy="http://10.10.14.50:8888";
root@071381841c9e:/tmp# export use_proxy=on;
root@071381841c9e:/tmp# 
root@071381841c9e:/tmp# export LANG=en_US.UTF-8
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
apt-get update; \
apt install -y xorg dbus-x11 x11-xserver-utils xterm xinit xorgxrdp ; \
which X  && apt install -y xrdp  ;
0% [Working]
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [237 kB]                                                                                                                                       
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages.diff/Index [17.3 kB]                                                                                                                                     
Get:7 http://deb.debian.org/debian bullseye-updates/main amd64 Packages T-2023-03-25-2025.40-F-2023-02-20-2009.57.pdiff [1261 B]                                                                                                 
Get:7 http://deb.debian.org/debian bullseye-updates/main amd64 Packages T-2023-03-25-2025.40-F-2023-02-20-2009.57.pdiff [1261 B]                                                                                                 
Fetched 8647 kB in 8s (1129 kB/s)                                                                                                                                                                                                
Reading package lists... Done
N: Repository 'http://deb.debian.org/debian bullseye InRelease' changed its 'Version' value from '11.6' to '11.7'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  bsdextrautils groff-base keyboard-configuration libegl-mesa0 libegl1 libfontenc1 libgbm1 libglu1-mesa libice6 liblocale-gettext-perl libpipeline1 libsm6 libuchardet0 libudev1 libunwind8 libutempter0 libwayland-server0
  libxaw7 libxcb-shape0 libxfont2 libxft2 libxkbfile1 libxmu6 libxpm4 libxt6 libxv1 libxxf86dga1 man-db udev x11-apps x11-session-utils x11-utils x11-xkb-utils xbitmaps xfonts-100dpi xfonts-75dpi xfonts-base xfonts-encodings
  xfonts-scalable xfonts-utils xorg-docs-core xserver-common xserver-xorg xserver-xorg-core xserver-xorg-legacy
Suggested packages:
  groff apparmor mesa-utils nickle cairo-5c xorg-docs x11-xfs-utils xfonts-cyrillic
The following NEW packages will be installed:
  bsdextrautils dbus-x11 groff-base keyboard-configuration libegl-mesa0 libegl1 libfontenc1 libgbm1 libglu1-mesa libice6 liblocale-gettext-perl libpipeline1 libsm6 libuchardet0 libunwind8 libutempter0 libwayland-server0
  libxaw7 libxcb-shape0 libxfont2 libxft2 libxkbfile1 libxmu6 libxpm4 libxt6 libxv1 libxxf86dga1 man-db udev x11-apps x11-session-utils x11-utils x11-xkb-utils x11-xserver-utils xbitmaps xfonts-100dpi xfonts-75dpi
  xfonts-base xfonts-encodings xfonts-scalable xfonts-utils xinit xorg xorg-docs-core xorgxrdp xserver-common xserver-xorg xserver-xorg-core xserver-xorg-legacy xterm
The following packages will be upgraded:
  libudev1
1 upgraded, 50 newly installed, 0 to remove and 56 not upgraded.
Need to get 30.9 MB of archives.
After this operation, 59.1 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 bsdextrautils amd64 2.36.1-8+deb11u1 [145 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libuchardet0 amd64 0.0.7-1 [67.8 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 groff-base amd64 1.22.4-6 [936 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 libpipeline1 amd64 1.5.3-1 [34.3 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 man-db amd64 2.9.4-2 [1354 kB]
Get:6 http://deb.debian.org/debian bullseye/main amd64 liblocale-gettext-perl amd64 1.07-4+b1 [19.0 kB]
Get:7 http://deb.debian.org/debian bullseye/main amd64 keyboard-configuration all 1.205 [424 kB]
Get:8 http://deb.debian.org/debian bullseye/main amd64 libudev1 amd64 247.3-7+deb11u2 [168 kB]
Get:9 http://deb.debian.org/debian bullseye/main amd64 udev amd64 247.3-7+deb11u2 [1465 kB]
Get:10 http://deb.debian.org/debian bullseye/main amd64 dbus-x11 amd64 1.12.24-0+deb11u1 [113 kB]                                                                                                                                
Get:11 http://deb.debian.org/debian bullseye/main amd64 libwayland-server0 amd64 1.18.0-2~exp1.1 [34.4 kB]                                                                                                                       
Get:12 http://deb.debian.org/debian bullseye/main amd64 libgbm1 amd64 20.3.5-1 [73.5 kB]                                                                                                                                         
Get:13 http://deb.debian.org/debian bullseye/main amd64 libegl-mesa0 amd64 20.3.5-1 [141 kB]                                                                                                                                     
Get:14 http://deb.debian.org/debian bullseye/main amd64 libfontenc1 amd64 1:1.1.4-1 [24.3 kB]                                                                                                                                    
Get:15 http://deb.debian.org/debian bullseye/main amd64 libglu1-mesa amd64 9.0.1-1 [168 kB]                                                                                                                                      
Get:16 http://deb.debian.org/debian bullseye/main amd64 libice6 amd64 2:1.0.10-1 [58.5 kB]                                                                                                                                       
Get:17 http://deb.debian.org/debian bullseye/main amd64 libsm6 amd64 2:1.2.3-1 [35.1 kB]                                                                                                                                         
Get:18 http://deb.debian.org/debian bullseye/main amd64 libunwind8 amd64 1.3.2-2 [54.5 kB]                                                                                                                                       
Get:19 http://deb.debian.org/debian bullseye/main amd64 libutempter0 amd64 1.2.1-2 [8960 B]                                                                                                                                      
Get:20 http://deb.debian.org/debian bullseye/main amd64 libxt6 amd64 1:1.2.0-1 [189 kB]                                                                                                                                          
Get:21 http://deb.debian.org/debian bullseye/main amd64 libxmu6 amd64 2:1.1.2-2+b3 [60.8 kB]                                                                                                                                     
Get:22 http://deb.debian.org/debian bullseye/main amd64 libxpm4 amd64 1:3.5.12-1.1~deb11u1 [49.6 kB]                                                                                                                             
Get:23 http://deb.debian.org/debian bullseye/main amd64 libxaw7 amd64 2:1.0.13-1.1 [202 kB]                                                                                                                                      
Get:24 http://deb.debian.org/debian bullseye/main amd64 libxcb-shape0 amd64 1.14-3 [102 kB]                                                                                                                                      
Get:25 http://deb.debian.org/debian bullseye/main amd64 libxfont2 amd64 1:2.0.4-1 [136 kB]                                                                                                                                       
Get:26 http://deb.debian.org/debian bullseye/main amd64 libxft2 amd64 2.3.2-2 [57.2 kB]                                                                                                                                          
Get:27 http://deb.debian.org/debian bullseye/main amd64 libxkbfile1 amd64 1:1.1.0-1 [75.2 kB]                                                                                                                                    
Get:28 http://deb.debian.org/debian bullseye/main amd64 libxv1 amd64 2:1.0.11-1 [24.6 kB]                                                                                                                                        
Get:29 http://deb.debian.org/debian bullseye/main amd64 libxxf86dga1 amd64 2:1.1.4-1+b3 [22.1 kB]                                                                                                                                
Get:30 http://deb.debian.org/debian bullseye/main amd64 x11-apps amd64 7.7+8 [662 kB]                                                                                                                                            
Get:31 http://deb.debian.org/debian bullseye/main amd64 x11-session-utils amd64 7.7+4 [72.2 kB]                                                                                                                                  
Get:32 http://deb.debian.org/debian bullseye/main amd64 x11-utils amd64 7.7+5 [202 kB]                                                                                                                                           
Get:33 http://deb.debian.org/debian bullseye/main amd64 x11-xkb-utils amd64 7.7+5 [163 kB]                                                                                                                                       
Get:34 http://deb.debian.org/debian bullseye/main amd64 x11-xserver-utils amd64 7.7+8 [168 kB]                                                                                                                                   
Get:35 http://deb.debian.org/debian bullseye/main amd64 xbitmaps all 1.1.1-2.1 [25.8 kB]                                                                                                                                         
Get:36 http://deb.debian.org/debian bullseye/main amd64 xfonts-encodings all 1:1.0.4-2.1 [573 kB]                                                                                                                                
Get:37 http://deb.debian.org/debian bullseye/main amd64 xfonts-utils amd64 1:7.7+6 [93.0 kB]                                                                                                                                     
Get:38 http://deb.debian.org/debian bullseye/main amd64 xfonts-100dpi all 1:1.0.4+nmu1.1 [3818 kB]                                                                                                                               
Get:39 http://deb.debian.org/debian bullseye/main amd64 xfonts-75dpi all 1:1.0.4+nmu1.1 [3365 kB]                                                                                                                                
Get:40 http://deb.debian.org/debian bullseye/main amd64 xfonts-base all 1:1.0.5 [5897 kB]                                                                                                                                        
Get:41 http://deb.debian.org/debian bullseye/main amd64 xfonts-scalable all 1:1.0.3-1.2 [304 kB]                                                                                                                                 
Get:42 http://deb.debian.org/debian bullseye/main amd64 xinit amd64 1.4.0-1 [50.2 kB]                                                                                                                                            
Get:43 http://deb.debian.org/debian bullseye/main amd64 xserver-common all 2:1.20.11-1+deb11u6 [2284 kB]                                                                                                                         
Get:44 http://deb.debian.org/debian bullseye/main amd64 libegl1 amd64 1.3.2-1 [34.8 kB]                                                                                                                                          
Get:45 http://deb.debian.org/debian bullseye/main amd64 xserver-xorg-core amd64 2:1.20.11-1+deb11u6 [3603 kB]                                                                                                                    
Get:46 http://deb.debian.org/debian bullseye/main amd64 xorgxrdp amd64 1:0.2.12-1 [59.9 kB]                                                                                                                                      
Get:47 http://deb.debian.org/debian bullseye/main amd64 xserver-xorg amd64 1:7.7+22 [94.1 kB]                                                                                                                                    
Get:48 http://deb.debian.org/debian bullseye/main amd64 xorg-docs-core all 1:1.7.1-1.2 [84.2 kB]                                                                                                                                 
Get:49 http://deb.debian.org/debian bullseye/main amd64 xterm amd64 366-1+deb11u1 [819 kB]                                                                                                                                       
Get:50 http://deb.debian.org/debian bullseye/main amd64 xorg amd64 1:7.7+22 [39.0 kB]                                                                                                                                            
Get:51 http://deb.debian.org/debian bullseye/main amd64 xserver-xorg-legacy amd64 2:1.20.11-1+deb11u6 [2289 kB]                                                                                                                  
Fetched 30.9 MB in 40s (768 kB/s)                                                                                                                                                                                                
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package bsdextrautils.
(Reading database ... 27778 files and directories currently installed.)
Preparing to unpack .../0-bsdextrautils_2.36.1-8+deb11u1_amd64.deb ...
Unpacking bsdextrautils (2.36.1-8+deb11u1) ...
Selecting previously unselected package libuchardet0:amd64.
Preparing to unpack .../1-libuchardet0_0.0.7-1_amd64.deb ...
Unpacking libuchardet0:amd64 (0.0.7-1) ...
Selecting previously unselected package groff-base.
Preparing to unpack .../2-groff-base_1.22.4-6_amd64.deb ...
Unpacking groff-base (1.22.4-6) ...
Selecting previously unselected package libpipeline1:amd64.
Preparing to unpack .../3-libpipeline1_1.5.3-1_amd64.deb ...
Unpacking libpipeline1:amd64 (1.5.3-1) ...
Selecting previously unselected package man-db.
Preparing to unpack .../4-man-db_2.9.4-2_amd64.deb ...
Unpacking man-db (2.9.4-2) ...
Selecting previously unselected package liblocale-gettext-perl.
Preparing to unpack .../5-liblocale-gettext-perl_1.07-4+b1_amd64.deb ...
Unpacking liblocale-gettext-perl (1.07-4+b1) ...
Selecting previously unselected package keyboard-configuration.
Preparing to unpack .../6-keyboard-configuration_1.205_all.deb ...
Unpacking keyboard-configuration (1.205) ...
Preparing to unpack .../7-libudev1_247.3-7+deb11u2_amd64.deb ...
Unpacking libudev1:amd64 (247.3-7+deb11u2) over (247.3-7+deb11u1) ...
Setting up libudev1:amd64 (247.3-7+deb11u2) ...
Selecting previously unselected package udev.
(Reading database ... 28381 files and directories currently installed.)
Preparing to unpack .../00-udev_247.3-7+deb11u2_amd64.deb ...
Unpacking udev (247.3-7+deb11u2) ...
Selecting previously unselected package dbus-x11.
Preparing to unpack .../01-dbus-x11_1.12.24-0+deb11u1_amd64.deb ...
Unpacking dbus-x11 (1.12.24-0+deb11u1) ...
Selecting previously unselected package libwayland-server0:amd64.
Preparing to unpack .../02-libwayland-server0_1.18.0-2~exp1.1_amd64.deb ...
Unpacking libwayland-server0:amd64 (1.18.0-2~exp1.1) ...
Selecting previously unselected package libgbm1:amd64.
Preparing to unpack .../03-libgbm1_20.3.5-1_amd64.deb ...
Unpacking libgbm1:amd64 (20.3.5-1) ...
Selecting previously unselected package libegl-mesa0:amd64.
Preparing to unpack .../04-libegl-mesa0_20.3.5-1_amd64.deb ...
Unpacking libegl-mesa0:amd64 (20.3.5-1) ...
Selecting previously unselected package libfontenc1:amd64.
Preparing to unpack .../05-libfontenc1_1%3a1.1.4-1_amd64.deb ...
Unpacking libfontenc1:amd64 (1:1.1.4-1) ...
Selecting previously unselected package libglu1-mesa:amd64.
Preparing to unpack .../06-libglu1-mesa_9.0.1-1_amd64.deb ...
Unpacking libglu1-mesa:amd64 (9.0.1-1) ...
Selecting previously unselected package libice6:amd64.
Preparing to unpack .../07-libice6_2%3a1.0.10-1_amd64.deb ...
Unpacking libice6:amd64 (2:1.0.10-1) ...
Selecting previously unselected package libsm6:amd64.
Preparing to unpack .../08-libsm6_2%3a1.2.3-1_amd64.deb ...
Unpacking libsm6:amd64 (2:1.2.3-1) ...
Selecting previously unselected package libunwind8:amd64.
Preparing to unpack .../09-libunwind8_1.3.2-2_amd64.deb ...
Unpacking libunwind8:amd64 (1.3.2-2) ...
Selecting previously unselected package libutempter0:amd64.
Preparing to unpack .../10-libutempter0_1.2.1-2_amd64.deb ...
Unpacking libutempter0:amd64 (1.2.1-2) ...
Selecting previously unselected package libxt6:amd64.
Preparing to unpack .../11-libxt6_1%3a1.2.0-1_amd64.deb ...
Unpacking libxt6:amd64 (1:1.2.0-1) ...
Selecting previously unselected package libxmu6:amd64.
Preparing to unpack .../12-libxmu6_2%3a1.1.2-2+b3_amd64.deb ...
Unpacking libxmu6:amd64 (2:1.1.2-2+b3) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../13-libxpm4_1%3a3.5.12-1.1~deb11u1_amd64.deb ...
Unpacking libxpm4:amd64 (1:3.5.12-1.1~deb11u1) ...
Selecting previously unselected package libxaw7:amd64.
Preparing to unpack .../14-libxaw7_2%3a1.0.13-1.1_amd64.deb ...
Unpacking libxaw7:amd64 (2:1.0.13-1.1) ...
Selecting previously unselected package libxcb-shape0:amd64.
Preparing to unpack .../15-libxcb-shape0_1.14-3_amd64.deb ...
Unpacking libxcb-shape0:amd64 (1.14-3) ...
Selecting previously unselected package libxfont2:amd64.
Preparing to unpack .../16-libxfont2_1%3a2.0.4-1_amd64.deb ...
Unpacking libxfont2:amd64 (1:2.0.4-1) ...
Selecting previously unselected package libxft2:amd64.
Preparing to unpack .../17-libxft2_2.3.2-2_amd64.deb ...
Unpacking libxft2:amd64 (2.3.2-2) ...
Selecting previously unselected package libxkbfile1:amd64.
Preparing to unpack .../18-libxkbfile1_1%3a1.1.0-1_amd64.deb ...
Unpacking libxkbfile1:amd64 (1:1.1.0-1) ...
Selecting previously unselected package libxv1:amd64.
Preparing to unpack .../19-libxv1_2%3a1.0.11-1_amd64.deb ...
Unpacking libxv1:amd64 (2:1.0.11-1) ...
Selecting previously unselected package libxxf86dga1:amd64.
Preparing to unpack .../20-libxxf86dga1_2%3a1.1.4-1+b3_amd64.deb ...
Unpacking libxxf86dga1:amd64 (2:1.1.4-1+b3) ...
Selecting previously unselected package x11-apps.
Preparing to unpack .../21-x11-apps_7.7+8_amd64.deb ...
Unpacking x11-apps (7.7+8) ...
Selecting previously unselected package x11-session-utils.
Preparing to unpack .../22-x11-session-utils_7.7+4_amd64.deb ...
Unpacking x11-session-utils (7.7+4) ...
Selecting previously unselected package x11-utils.
Preparing to unpack .../23-x11-utils_7.7+5_amd64.deb ...
Unpacking x11-utils (7.7+5) ...
Selecting previously unselected package x11-xkb-utils.
Preparing to unpack .../24-x11-xkb-utils_7.7+5_amd64.deb ...
Unpacking x11-xkb-utils (7.7+5) ...
Selecting previously unselected package x11-xserver-utils.
Preparing to unpack .../25-x11-xserver-utils_7.7+8_amd64.deb ...
Unpacking x11-xserver-utils (7.7+8) ...
Selecting previously unselected package xbitmaps.
Preparing to unpack .../26-xbitmaps_1.1.1-2.1_all.deb ...
Unpacking xbitmaps (1.1.1-2.1) ...
Selecting previously unselected package xfonts-encodings.
Preparing to unpack .../27-xfonts-encodings_1%3a1.0.4-2.1_all.deb ...
Unpacking xfonts-encodings (1:1.0.4-2.1) ...
Selecting previously unselected package xfonts-utils.
Preparing to unpack .../28-xfonts-utils_1%3a7.7+6_amd64.deb ...
Unpacking xfonts-utils (1:7.7+6) ...
Selecting previously unselected package xfonts-100dpi.
Preparing to unpack .../29-xfonts-100dpi_1%3a1.0.4+nmu1.1_all.deb ...
Unpacking xfonts-100dpi (1:1.0.4+nmu1.1) ...
Selecting previously unselected package xfonts-75dpi.
Preparing to unpack .../30-xfonts-75dpi_1%3a1.0.4+nmu1.1_all.deb ...
Unpacking xfonts-75dpi (1:1.0.4+nmu1.1) ...
Selecting previously unselected package xfonts-base.
Preparing to unpack .../31-xfonts-base_1%3a1.0.5_all.deb ...
Unpacking xfonts-base (1:1.0.5) ...
Selecting previously unselected package xfonts-scalable.
Preparing to unpack .../32-xfonts-scalable_1%3a1.0.3-1.2_all.deb ...
Unpacking xfonts-scalable (1:1.0.3-1.2) ...
Selecting previously unselected package xinit.
Preparing to unpack .../33-xinit_1.4.0-1_amd64.deb ...
Unpacking xinit (1.4.0-1) ...
Selecting previously unselected package xserver-common.
Preparing to unpack .../34-xserver-common_2%3a1.20.11-1+deb11u6_all.deb ...
Unpacking xserver-common (2:1.20.11-1+deb11u6) ...
Selecting previously unselected package libegl1:amd64.
Preparing to unpack .../35-libegl1_1.3.2-1_amd64.deb ...
Unpacking libegl1:amd64 (1.3.2-1) ...
Selecting previously unselected package xserver-xorg-core.
Preparing to unpack .../36-xserver-xorg-core_2%3a1.20.11-1+deb11u6_amd64.deb ...
Unpacking xserver-xorg-core (2:1.20.11-1+deb11u6) ...
Selecting previously unselected package xorgxrdp.
Preparing to unpack .../37-xorgxrdp_1%3a0.2.12-1_amd64.deb ...
Unpacking xorgxrdp (1:0.2.12-1) ...
Selecting previously unselected package xserver-xorg.
Preparing to unpack .../38-xserver-xorg_1%3a7.7+22_amd64.deb ...
Unpacking xserver-xorg (1:7.7+22) ...
Selecting previously unselected package xorg-docs-core.
Preparing to unpack .../39-xorg-docs-core_1%3a1.7.1-1.2_all.deb ...
Unpacking xorg-docs-core (1:1.7.1-1.2) ...
Selecting previously unselected package xterm.
Preparing to unpack .../40-xterm_366-1+deb11u1_amd64.deb ...
Unpacking xterm (366-1+deb11u1) ...
Selecting previously unselected package xorg.
Preparing to unpack .../41-xorg_1%3a7.7+22_amd64.deb ...
Unpacking xorg (1:7.7+22) ...
Selecting previously unselected package xserver-xorg-legacy.
Preparing to unpack .../42-xserver-xorg-legacy_2%3a1.20.11-1+deb11u6_amd64.deb ...
Unpacking xserver-xorg-legacy (2:1.20.11-1+deb11u6) ...
Setting up libpipeline1:amd64 (1.5.3-1) ...
Setting up xinit (1.4.0-1) ...
Setting up libwayland-server0:amd64 (1.18.0-2~exp1.1) ...
Setting up libice6:amd64 (2:1.0.10-1) ...
Setting up libxft2:amd64 (2.3.2-2) ...
Setting up bsdextrautils (2.36.1-8+deb11u1) ...
update-alternatives: using /usr/bin/write.ul to provide /usr/bin/write (write) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/write.1.gz because associated file /usr/share/man/man1/write.ul.1.gz (of link group write) doesn't exist
Setting up libxpm4:amd64 (1:3.5.12-1.1~deb11u1) ...
Setting up libgbm1:amd64 (20.3.5-1) ...
Setting up libxcb-shape0:amd64 (1.14-3) ...
Setting up libxxf86dga1:amd64 (2:1.1.4-1+b3) ...
Setting up libunwind8:amd64 (1.3.2-2) ...
Setting up xorg-docs-core (1:1.7.1-1.2) ...
Setting up libfontenc1:amd64 (1:1.1.4-1) ...
Setting up libegl-mesa0:amd64 (20.3.5-1) ...
Setting up xfonts-encodings (1:1.0.4-2.1) ...
Setting up libxv1:amd64 (2:1.0.11-1) ...
Setting up udev (247.3-7+deb11u2) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libutempter0:amd64 (1.2.1-2) ...
Setting up dbus-x11 (1.12.24-0+deb11u1) ...
Setting up libuchardet0:amd64 (0.0.7-1) ...
Setting up libegl1:amd64 (1.3.2-1) ...
Setting up libglu1-mesa:amd64 (9.0.1-1) ...
Setting up libxkbfile1:amd64 (1:1.1.0-1) ...
Setting up libsm6:amd64 (2:1.2.3-1) ...
Setting up libxfont2:amd64 (1:2.0.4-1) ...
Setting up liblocale-gettext-perl (1.07-4+b1) ...
Setting up xbitmaps (1.1.1-2.1) ...
Setting up xfonts-utils (1:7.7+6) ...
Setting up xfonts-base (1:1.0.5) ...
Setting up libxt6:amd64 (1:1.2.0-1) ...
Setting up groff-base (1.22.4-6) ...
Setting up xfonts-75dpi (1:1.0.4+nmu1.1) ...
Setting up keyboard-configuration (1.205) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up xfonts-scalable (1:1.0.3-1.2) ...
Setting up libxmu6:amd64 (2:1.1.2-2+b3) ...
Setting up xfonts-100dpi (1:1.0.4+nmu1.1) ...
Setting up libxaw7:amd64 (2:1.0.13-1.1) ...
Setting up x11-xserver-utils (7.7+8) ...
Setting up man-db (2.9.4-2) ...
Building database of manual pages ...
Created symlink /etc/systemd/system/timers.target.wants/man-db.timer → /lib/systemd/system/man-db.timer.
Setting up x11-utils (7.7+5) ...
Setting up x11-session-utils (7.7+4) ...
Setting up xterm (366-1+deb11u1) ...
update-alternatives: using /usr/bin/xterm to provide /usr/bin/x-terminal-emulator (x-terminal-emulator) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/x-terminal-emulator.1.gz because associated file /usr/share/man/man1/xterm.1.gz (of link group x-terminal-emulator) doesn't exist
update-alternatives: using /usr/bin/lxterm to provide /usr/bin/x-terminal-emulator (x-terminal-emulator) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/x-terminal-emulator.1.gz because associated file /usr/share/man/man1/lxterm.1.gz (of link group x-terminal-emulator) doesn't exist
Setting up x11-xkb-utils (7.7+5) ...
Setting up x11-apps (7.7+8) ...
Setting up xserver-common (2:1.20.11-1+deb11u6) ...
Setting up xserver-xorg-legacy (2:1.20.11-1+deb11u6) ...
Setting up xserver-xorg-core (2:1.20.11-1+deb11u6) ...
Setting up xorgxrdp (1:0.2.12-1) ...
Setting up xserver-xorg (1:7.7+22) ...
Setting up xorg (1:7.7+22) ...
Processing triggers for fontconfig (2.13.1-4.2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...
Processing triggers for mailcap (3.69) ...
/usr/bin/X
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fuse libfuse2 ssl-cert
Suggested packages:
  guacamole xrdp-pulseaudio-installer
The following NEW packages will be installed:
  fuse libfuse2 ssl-cert xrdp
0 upgraded, 4 newly installed, 0 to remove and 56 not upgraded.
Need to get 669 kB of archives.
After this operation, 3590 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 ssl-cert all 1.1.0+nmu1 [21.0 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libfuse2 amd64 2.9.9-5 [130 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 xrdp amd64 0.9.12-1.1 [446 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 fuse amd64 2.9.9-5 [72.4 kB]
Fetched 669 kB in 3s (231 kB/s) 
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package ssl-cert.
(Reading database ... 30449 files and directories currently installed.)
Preparing to unpack .../ssl-cert_1.1.0+nmu1_all.deb ...
Unpacking ssl-cert (1.1.0+nmu1) ...
Selecting previously unselected package libfuse2:amd64.
Preparing to unpack .../libfuse2_2.9.9-5_amd64.deb ...
Unpacking libfuse2:amd64 (2.9.9-5) ...
Selecting previously unselected package xrdp.
Preparing to unpack .../xrdp_0.9.12-1.1_amd64.deb ...
Unpacking xrdp (0.9.12-1.1) ...
Selecting previously unselected package fuse.
Preparing to unpack .../fuse_2.9.9-5_amd64.deb ...
Unpacking fuse (2.9.9-5) ...
Setting up libfuse2:amd64 (2.9.9-5) ...
Setting up ssl-cert (1.1.0+nmu1) ...
Setting up fuse (2.9.9-5) ...
Setting up xrdp (0.9.12-1.1) ...

Generating 2048 bit rsa key...

ssl_gen_key_xrdp1 ok

saving to /etc/xrdp/rsakeys.ini

invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp-sesman.service → /lib/systemd/system/xrdp-sesman.service.
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp.service → /lib/systemd/system/xrdp.service.
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...
root@071381841c9e:/tmp#

修改root用户密码,并 启动xrdp:

echo root:1|chpasswd;



service  xrdp start 

# which xrdp xrdp-sesman xrdp-sessman;
# setsid /usr/sbin/xrdp-sesman --nodaemon ;
# setsid /usr/sbin/xrdp  --nodaemon ;

 service  --status-all
 service  xrdp status 
 service  x11-common status 
root@071381841c9e:/tmp#  service  --status-all
 [ - ]  apache-htcacheclean
 [ + ]  apache2
 [ - ]  dbus
 [ ? ]  hwclock.sh
 [ - ]  procps
 [ + ]  udev
 [ - ]  x11-common
 [ - ]  xrdp
root@071381841c9e:/tmp#




root@071381841c9e:/tmp# service  x11-common status 
root@071381841c9e:/tmp# 

root@071381841c9e:/tmp#  service  xrdp status 
xrdp-sesman is not running ... failed!
xrdp is not running ... failed!
root@071381841c9e:/tmp# 

root@fb6ffe3e557f:/tmp#  service  xrdp start 
Starting Remote Desktop Protocol server: xrdp-sesman xrdp.
root@fb6ffe3e557f:/tmp# 

修改xterm样式:

cat << EOF >/etc/X11/Xresources/qq5201314
xterm*ScrollBar: true
xterm.geometry: 60x25
xterm*VT100.geometry: 166x58
xterm*rightScrollBar: true
xterm*leftScrollBar: true
XTerm*jumpScroll: true
xterm*faceSize: 14
xterm*allowBoldFonts: true
xterm*foreground: green
xterm*background: rgb:60/20/10
XTerm*SaveLines: 4096
xterm*printAttributes:
xterm*printerCommand: cat > /tmp/xtermdump
*customization: -fullscreen
xterm*fullscreen: 2
EOF

猜你喜欢

转载自blog.csdn.net/qq_29060627/article/details/130464444
HTB