“哦不!出了点问题”/ ubuntu 23.04 / xrdp / xfce-desktop / Google Compute

“哦不!出了点问题”/ ubuntu 23.04 / xrdp / xfce-desktop / Google Compute

如何在 Google Compute 节点上通过 xrdp 运行桌面?

这是我所做的:

  1. 使用 Ubunutu 23.04 (Lunar Lobster) 映像创建计算节点
gcloud compute instances create ask-ubuntu \
    --zone=europe-west1-c \
    --machine-type=e2-standard-2 \
    --network-interface=network-tier=PREMIUM,stack-type=IPV4_ONLY,subnet=default \
    --maintenance-policy=MIGRATE \
    --provisioning-model=STANDARD \
    --no-service-account \
    --no-scopes \
    --enable-display-device \
    --create-disk=auto-delete=yes,boot=yes,device-name=ask-ubuntu,image=projects/ubuntu-os-cloud/global/images/ubuntu-2304-lunar-amd64-v20230621,mode=rw,size=16,type=projects/chrome-formula-338416/zones/europe-west1-c/diskTypes/pd-balanced \
    --no-shielded-secure-boot \
    --shielded-vtpm \
    --shielded-integrity-monitoring \
    --labels=goog-ec-src=vm_add-gcloud \
    --reservation-affinity=any
  1. 采取命令行
gcloud compute ssh --zone "europe-west1-c" "ask-ubuntu"
  1. 安装软件
sudo apt update -y && sudo apt dist-upgrade -y
sudo reboot
sudo apt install tasksel -y
sudo tasksel install xfce-desktop
sudo tasksel install ssh-server
sudo apt install xrdp -y
sudo usermod -a -G ssl-cert xrdp
sudo passwd mareklall
sudo reboot
  1. 通过 rdp 登录显示正常

登录屏幕截图

  1. 登录失败并显示消息“哦不!出了点问题”

失败截图

  1. 猫/var/log/xrdp-sesman.log
[20230627-14:24:50] [INFO ] starting xrdp-sesman with pid 17185
[20230627-14:26:16] [INFO ] sesman_main_loop: sesman asked to terminate
[20230627-14:26:47] [INFO ] starting xrdp-sesman with pid 652
[20230627-14:31:51] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 49770
[20230627-14:31:52] [INFO ] Terminal Server Users group is disabled, allowing authentication
[20230627-14:31:52] [INFO ] ++ created session (access granted): username mareklall, ip ::ffff:95.153.36.59:61913 - socket: 12
[20230627-14:31:52] [INFO ] starting Xorg session...
[20230627-14:31:52] [INFO ] Starting session: session_pid 2099, display :10.0, width 2560, height 1440, bpp 24, client ip ::ffff:95.153.36.59:61913 - socket: 12, user name mareklall
[20230627-14:31:52] [ERROR] sesman_data_in: scp_process_msg failed
[20230627-14:31:52] [INFO ] [session start] (display 10): calling auth_start_session from pid 2099
[20230627-14:31:52] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
[20230627-14:31:52] [INFO ] Starting X server on display 10: /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20230627-14:31:52] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20230627-14:31:52] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20230627-14:31:52] [INFO ] Session started successfully for user mareklall on display 10
[20230627-14:31:52] [INFO ] Session in progress on display 10, waiting until the window manager (pid 2100) exits to end the session
[20230627-14:31:52] [INFO ] Starting the xrdp channel server for display 10
[20230627-14:31:52] [INFO ] Found X server running at /tmp/.X11-unix/X10
[20230627-14:31:52] [INFO ] Starting the default window manager on display 10: /etc/xrdp/startwm.sh
[20230627-14:32:17] [INFO ] Calling auth_stop_session and auth_end from pid 2099
[20230627-14:32:17] [INFO ] Terminating X server (pid 2101) on display 10
[20230627-14:32:17] [INFO ] Terminating the xrdp channel server (pid 2104) on display 10
[20230627-14:32:17] [INFO ] X server on display 10 (pid 2101) returned exit code 0 and signal number 0
[20230627-14:32:17] [INFO ] xrdp channel server for display 10 (pid 2104) exit code 0 and signal number 0
[20230627-14:32:17] [INFO ] cleanup_sockets:
[20230627-14:32:17] [INFO ] Process 2099 has exited
[20230627-14:32:17] [INFO ] ++ terminated session:  username mareklall, display :10.0, session_pid 2099, ip ::ffff:95.153.36.59:61913 - socket: 12
  1. 猫/var/log/xrdp.log
[20230627-14:24:50] [INFO ] address [0.0.0.0] port [3389] mode 1
[20230627-14:24:50] [INFO ] listening to port 3389 on 0.0.0.0
[20230627-14:24:50] [INFO ] xrdp_listen_pp done
[20230627-14:24:52] [INFO ] starting xrdp with pid 17195
[20230627-14:24:52] [INFO ] address [0.0.0.0] port [3389] mode 1
[20230627-14:24:52] [INFO ] listening to port 3389 on 0.0.0.0
[20230627-14:24:52] [INFO ] xrdp_listen_pp done
[20230627-14:26:15] [INFO ] Received termination signal, stopping the server accept new connections thread
[20230627-14:26:47] [INFO ] address [0.0.0.0] port [3389] mode 1
[20230627-14:26:47] [INFO ] listening to port 3389 on 0.0.0.0
[20230627-14:26:47] [INFO ] xrdp_listen_pp done
[20230627-14:26:49] [INFO ] starting xrdp with pid 706
[20230627-14:26:49] [INFO ] address [0.0.0.0] port [3389] mode 1
[20230627-14:26:49] [INFO ] listening to port 3389 on 0.0.0.0
[20230627-14:26:49] [INFO ] xrdp_listen_pp done
[20230627-14:30:36] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:95.153.36.59 port 61913
[20230627-14:30:36] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20230627-14:30:36] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20230627-14:30:36] [INFO ] Security protocol: configured [SSL|RDP], requested [SSL|HYBRID|HYBRID_EX|RDP], selected [SSL]
[20230627-14:30:38] [INFO ] Connected client computer name: Marek-Mac-2022
[20230627-14:30:38] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20230627-14:30:38] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20230627-14:30:38] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00c is unknown (ignored)
[20230627-14:30:38] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000425]
[20230627-14:30:38] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
[20230627-14:30:38] [INFO ] TLS connection established from ::ffff:95.153.36.59 port 61913: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384
[20230627-14:30:39] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20230627-14:30:39] [INFO ] xrdp_process_offscreen_bmpcache: support level 0 cache size 0 MB cache entries 0
[20230627-14:30:39] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[20230627-14:30:39] [WARN ] Cannot find keymap file /etc/xrdp/km-00000425.ini
[20230627-14:30:39] [WARN ] Cannot find keymap file /etc/xrdp/km-00000425.ini
[20230627-14:30:39] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20230627-14:30:39] [WARN ] local keymap file for 0x00000425 found and doesn't match built in keymap, using local keymap file
[20230627-14:31:24] [ERROR] xrdp_rdp_recv: xrdp_channel_process failed
[20230627-14:31:51] [INFO ] connecting to sesman on 127.0.0.1:3350
[20230627-14:31:52] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20230627-14:31:52] [INFO ] sesman connect ok
[20230627-14:31:52] [INFO ] sending login info to session manager. Please wait...
[20230627-14:31:52] [INFO ] xrdp_wm_log_msg: login successful for user mareklall on display 10
[20230627-14:31:52] [INFO ] login successful for user mareklall on display 10
[20230627-14:31:52] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20230627-14:31:52] [INFO ] started connecting
[20230627-14:31:52] [INFO ] lib_mod_connect: connecting via UNIX socket
[20230627-14:31:52] [INFO ] lib_mod_log_peer: xrdp_pid=2093 connected to X11rdp_pid=2101 X11rdp_uid=1001 X11rdp_gid=1002 client_ip=::ffff:95.153.36.59 client_port=61913
[20230627-14:31:52] [INFO ] connected ok
  1. cat /var/log/Xorg.0.log
[    31.469]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[    31.469] Current Operating System: Linux ask-ubuntu 6.2.0-1007-gcp #7-Ubuntu SMP Mon Jun 12 07:10:41 UTC 2023 x86_64
[    31.469] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.2.0-1007-gcp root=PARTUUID=48b49461-3f90-4f4b-8362-e8a2a5321da9 ro console=ttyS0 panic=-1
[    31.469] xorg-server 2:21.1.7-1ubuntu3 (For technical support please see http://www.ubuntu.com/support)
[    31.469] Current version of pixman: 0.42.2
[    31.469]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    31.469] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    31.469] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Jun 27 14:26:59 2023
[    31.470] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    31.470] (==) No Layout section.  Using the first Screen section.
[    31.470] (==) No screen section available. Using defaults.
[    31.470] (**) |-->Screen "Default Screen Section" (0)
[    31.470] (**) |   |-->Monitor "<default monitor>"
[    31.470] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    31.470] (==) Automatically adding devices
[    31.470] (==) Automatically enabling devices
[    31.470] (==) Automatically adding GPU devices
[    31.471] (==) Automatically binding GPU devices
[    31.471] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    31.471] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    31.471]    Entry deleted from font path.
[    31.471] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    31.471]    Entry deleted from font path.
[    31.471] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    31.471]    Entry deleted from font path.
[    31.471] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    31.471]    Entry deleted from font path.
[    31.471] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    31.471]    Entry deleted from font path.
[    31.471] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        built-ins
[    31.471] (==) ModulePath set to "/usr/lib/xorg/modules"
[    31.471] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    31.471] (II) Loader magic: 0x55e8cf872020
[    31.471] (II) Module ABI versions:
[    31.471]    X.Org ANSI C Emulation: 0.4
[    31.471]    X.Org Video Driver: 25.2
[    31.471]    X.Org XInput driver : 24.4
[    31.471]    X.Org Server Extension : 10.0
[    31.472] (++) using VT number 7

[    31.472] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    31.476] (--) PCI:*(0@0:5:0) 1ae0:a002:1ae0:0001 rev 1, Mem @ 0xc0000000/8388608, BIOS @ 0x????????/131072
[    31.476] (II) LoadModule: "glx"
[    31.476] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    31.478] (II) Module glx: vendor="X.Org Foundation"
[    31.478]    compiled for 1.21.1.7, module version = 1.0.0
[    31.478]    ABI class: X.Org Server Extension, version 10.0
[    31.478] (==) Matched modesetting as autoconfigured driver 0
[    31.478] (==) Matched fbdev as autoconfigured driver 1
[    31.478] (==) Matched vesa as autoconfigured driver 2
[    31.478] (==) Assigned the driver to the xf86ConfigLayout
[    31.478] (II) LoadModule: "modesetting"
[    31.478] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    31.478] (II) Module modesetting: vendor="X.Org Foundation"
[    31.478]    compiled for 1.21.1.7, module version = 1.0.0
[    31.478]    ABI class: X.Org Server Extension, version 10.0
[    31.478] (==) Matched modesetting as autoconfigured driver 0
[    31.478] (==) Matched fbdev as autoconfigured driver 1
[    31.478] (==) Matched vesa as autoconfigured driver 2
[    31.478] (==) Assigned the driver to the xf86ConfigLayout
[    31.478] (II) LoadModule: "modesetting"
[    31.478] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    31.478] (II) Module modesetting: vendor="X.Org Foundation"
[    31.478]    compiled for 1.21.1.7, module version = 1.21.1
[    31.478]    Module class: X.Org Video Driver
[    31.478]    ABI class: X.Org Video Driver, version 25.2
[    31.478] (II) LoadModule: "fbdev"
[    31.478] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[    31.479] (II) Module fbdev: vendor="X.Org Foundation"
[    31.479]    compiled for 1.21.1.3, module version = 0.5.0
[    31.479]    Module class: X.Org Video Driver
[    31.479]    ABI class: X.Org Video Driver, version 25.2
[    31.479] (II) LoadModule: "vesa"
[    31.479] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[    31.479] (II) Module vesa: vendor="X.Org Foundation"
[    31.479]    compiled for 1.21.1.3, module version = 2.5.0
[    31.479]    Module class: X.Org Video Driver
[    31.479]    ABI class: X.Org Video Driver, version 25.2
[    31.479] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    31.479] (II) FBDEV: driver for framebuffer: fbdev
[    31.479] (II) VESA: driver for VESA chipsets: vesa
[    31.479] (EE) open /dev/dri/card0: No such file or directory
[    31.479] (WW) Falling back to old probe method for modesetting
[    31.479] (EE) open /dev/dri/card0: No such file or directory
[    31.479] (II) Loading sub module "fbdevhw"
[    31.479] (II) LoadModule: "fbdevhw"
[    31.479] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    31.479] (II) Module fbdevhw: vendor="X.Org Foundation"
[    31.479]    compiled for 1.21.1.7, module version = 0.0.2
[    31.479]    ABI class: X.Org Video Driver, version 25.2
[    31.479] (EE) Unable to find a valid framebuffer device
[    31.479] (WW) Falling back to old probe method for fbdev
[    31.479] (II) Loading sub module "fbdevhw"
[    31.479] (II) LoadModule: "fbdevhw"
[    31.480] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    31.480] (II) Module fbdevhw: vendor="X.Org Foundation"
[    31.480]    compiled for 1.21.1.7, module version = 0.0.2
[    31.480]    ABI class: X.Org Video Driver, version 25.2
[    31.480] (EE) open /dev/fb0: No such file or directory
[    31.480] (EE) Screen 0 deleted because of no matching config section.
[    31.480] (II) UnloadModule: "modesetting"
[    31.480] (EE) Screen 0 deleted because of no matching config section.
[    31.480] (II) UnloadModule: "fbdev"
[    31.480] (II) UnloadSubModule: "fbdevhw"
[    31.480] (II) Loading sub module "vbe"
[    31.480] (II) LoadModule: "vbe"
[    31.480] (II) Loading /usr/lib/xorg/modules/libint10.so
[    31.480] (II) Module int10: vendor="X.Org Foundation"
[    31.480]    compiled for 1.21.1.7, module version = 1.0.0
[    31.480]    ABI class: X.Org Video Driver, version 25.2
[    31.480] (II) Loading sub module "int10"
[    31.480] (II) LoadModule: "int10"
[    31.480] (II) Loading /usr/lib/xorg/modules/libint10.so
[    31.480] (II) Module int10: vendor="X.Org Foundation"
[    31.480]    compiled for 1.21.1.7, module version = 1.0.0
[    31.480]    ABI class: X.Org Video Driver, version 25.2
[    31.480] (II) VESA(0): initializing int10
[    31.481] (II) VESA(0): Bad V_BIOS checksum
[    31.481] (II) VESA(0): Primary V_BIOS segment is: 0xc000
[    31.483] f000:8bb0: 20 ILLEGAL EXTENDED X86 OPCODE!
[    31.483] (II) VESA(0): VESA BIOS not detected
[    31.484] (II) UnloadModule: "vesa"
[    31.484] (II) UnloadSubModule: "int10"
[    31.484] (II) Unloading int10
[    31.484] (II) UnloadSubModule: "int10"
[    31.484] (II) Unloading int10
[    31.484] (EE) Screen(s) found, but none have a usable configuration.
[    31.484] (EE)
Fatal server error:
[    31.484] (EE) no screens found(EE)
[    31.484] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[    31.484] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    31.484] (EE)
[    31.484] (EE) Server terminated with error (1). Closing log file.

答案1

默认设置x-session-manager通常为 Gnome。正如您所测试的,您可以使用 覆盖它~/.xsession,但还有更好的方法。

理论上,设置新版本的正确方法x-session-manager是使用sudo update-alternatives --config x-session-manager,这应该允许您选择 XFCE startxfce4- 从而避免 Gnome 显示的错误。

相关内容