neutrinolabs / xrdp

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

Unicode input, Enter Chinese. Sometimes you can, sometimes you can't. #3230

Open mengsongshan opened 2 weeks ago

mengsongshan commented 2 weeks ago

xrdp version

xrdp devel

Detailed xrdp version, build options

Argument 0 - xrdp
Argument 1 - --version
xrdp 0.10.80
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2024 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-devel-logging
      --enable-fuse
      --enable-ibus
      --enable-jpeg
      --enable-pixman

  Compiled with OpenSSL 3.0.2 15 Mar 2022

Operating system & version

Ubuntu 22.04 LTS Gnome 42.9 X11

Installation method

git clone & make install

Which backend do you use?

xorgxrdp

What desktop environment do you use?

Gnome

Environment xrdp running on

cloud ecs

What's your client?

guacamole

Area(s) with issue?

No response

Steps to reproduce

I use Guacamole as the client and XRDP as the server to access the ECS running the Ubuntu desktop system on my cloud.

Ubuntu installed the fcitx framework, uninstalled it, installed ibus, rebuilt the devel branch of xrdp, and enabled ibus. After installation is unstable, you need to refresh the guacamole page many times, that is, reconnect xrdp to enter Chinese normally, after a few days, I found that it was completely not good, refresh is useless.

Check the syslog to study the ibus-related code blocks in xrdp. It is found that the interaction between xrdp and ibus is abnormal. Once the problem was locked, I analyzed the detailed log, and sometimes "xrdp_ibus_init: Timed out waiting for iBus daemon" came up. After reading the code, I have checked the following problems: Check the ~/.config/ibus/bus/ directory. It is found that there are multiple files in the directory. The redundant files are deleted. The above error still occurs occasionally, so I adjusted the startup sequence of xrdp and ibus services so that ibus starts before xrdp. I found that it was much better. Later, I used ibus-setup to adjust the input method to Chinese input method. I found that it was much better and basically stable.

However, there is a small problem. Sometimes when you enter the system for the first time, you cannot enter Chinese. After you refresh the guacamole, you can enter the process.

This is the log when enter the system. You can enter ASCII characters , but can not Chinese characters.

8月 31 15:20:41 mycloud systemd[1]: Starting xrdp daemon...
8月 31 15:20:41 mycloud systemd[1]: Starting xrdp daemon...
8月 31 15:20:41 mycloud systemd[1]: Started xrdp daemon.
8月 31 15:20:41 mycloud systemd[1]: Starting xrdp daemon...
8月 31 15:20:41 mycloud systemd[1]: Started xrdp daemon.
8月 31 15:20:43 mycloud xrdp[994]: [INFO ] [xrdp_listen_init(xrdp_listen.c:592)] address [0.0.0.0] port [3389] mode 1
8月 31 15:20:43 mycloud xrdp[994]: [INFO ] [xrdp_listen_init(xrdp_listen.c:601)] listening to port 3389 on 0.0.0.0
8月 31 15:20:43 mycloud xrdp[994]: [INFO ] [xrdp_listen_init(xrdp_listen.c:588)] xrdp_listen_pp done
8月 31 15:20:43 mycloud xrdp[994]: [CORE ] [check_drop_privileges(xrdp.c:430)] You are running xrdp as root. This is not safe.
8月 31 15:20:43 mycloud xrdp[994]: [INFO ] [main(xrdp.c:750)] starting xrdp with pid 994
8月 31 15:21:26 mycloud xrdp[994]: [INFO ] [g_sck_accept(os_calls.c:1252)] Socket 14: connection accepted from 10.0.0.120:60826
8月 31 15:21:26 mycloud xrdp[1661]: [INFO ] [xrdp_rdp_read_config(xrdp_rdp.c:225)] Using default X.509 certificate: /etc/xrdp/cert.pem
8月 31 15:21:26 mycloud xrdp[1661]: [INFO ] [xrdp_rdp_read_config(xrdp_rdp.c:257)] Using default X.509 key file: /etc/xrdp/key.pem
8月 31 15:21:26 mycloud xrdp[1661]: [INFO ] [xrdp_iso_negotiate_security(xrdp_iso.c:194)] Security protocol: configured [SSL|RDP], requested [SSL|HYBRID|RDP], selec>
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_sec_process_mcs_data_CS_CORE(xrdp_sec.c:2027)] Connected client computer name: Guacamole RDP
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_sec_process_mcs_data_CS_CORE(xrdp_sec.c:2163)] client DOES NOT support gfx
8月 31 15:21:27 mycloud xrdp[1661]: [WARN ] [xrdp_sec_process_mcs_data_CS_CORE(xrdp_sec.c:2229)] Physical desktop dimensions (0x0) are invalid
8月 31 15:21:27 mycloud xrdp[1661]: [WARN ] [xrdp_sec_process_mcs_data(xrdp_sec.c:2652)] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
8月 31 15:21:27 mycloud xrdp[1661]: [WARN ] [xrdp_sec_process_mcs_data(xrdp_sec.c:2652)] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_load_keyboard_layout(xrdp_sec.c:378)] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyb>
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_load_keyboard_layout(xrdp_sec.c:587)] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_rdp_incoming(xrdp_rdp.c:951)] TLS connection established from 10.0.0.120:60826 TLSv1.3 with cipher TLS_AES_256_GCM>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:823)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:828)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_bitmap(xrdp_caps.c:151)] Client supports single-screen resizes by xrdp
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:833)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_order(xrdp_caps.c:252)] Client Capability: not enough orders supported by client, using painter.
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:897)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:856)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_pointer(xrdp_caps.c:390)] xrdp_caps_process_pointer: client supports new(color) cursor
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:873)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_input(xrdp_caps.c:437)] Client supports Unicode input
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:882)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:887)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:902)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:869)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:861)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:878)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:843)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:865)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:852)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:929)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:924)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:934)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:939)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:944)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:1001)] Client Capability: LARGE_POINTER_FLAG_96x96 supported
8月 31 15:21:28 mycloud xrdp[1661]: [WARN ] [xrdp_rdp_process_data_control(xrdp_rdp.c:1172)] Received [MS-RDPBCGR] TS_CONTROL_PDU action 4 is unknown (skipped)
8月 31 15:20:41 mycloud systemd[1]: Starting xrdp daemon...
8月 31 15:20:41 mycloud systemd[1]: Started xrdp daemon.
8月 31 15:20:43 mycloud xrdp[994]: [INFO ] [xrdp_listen_init(xrdp_listen.c:592)] address [0.0.0.0] port [3389] mode 1
8月 31 15:20:43 mycloud xrdp[994]: [INFO ] [xrdp_listen_init(xrdp_listen.c:601)] listening to port 3389 on 0.0.0.0
8月 31 15:20:43 mycloud xrdp[994]: [INFO ] [xrdp_listen_init(xrdp_listen.c:588)] xrdp_listen_pp done
8月 31 15:20:43 mycloud xrdp[994]: [CORE ] [check_drop_privileges(xrdp.c:430)] You are running xrdp as root. This is not safe.
8月 31 15:20:43 mycloud xrdp[994]: [INFO ] [main(xrdp.c:750)] starting xrdp with pid 994
8月 31 15:21:26 mycloud xrdp[994]: [INFO ] [g_sck_accept(os_calls.c:1252)] Socket 14: connection accepted from 10.0.0.120:60826
8月 31 15:21:26 mycloud xrdp[1661]: [INFO ] [xrdp_rdp_read_config(xrdp_rdp.c:225)] Using default X.509 certificate: /etc/xrdp/cert.pem
8月 31 15:21:26 mycloud xrdp[1661]: [INFO ] [xrdp_rdp_read_config(xrdp_rdp.c:257)] Using default X.509 key file: /etc/xrdp/key.pem
8月 31 15:21:26 mycloud xrdp[1661]: [INFO ] [xrdp_iso_negotiate_security(xrdp_iso.c:194)] Security protocol: configured [SSL|RDP], requested [SSL|HYBRID|RDP], selec>
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_sec_process_mcs_data_CS_CORE(xrdp_sec.c:2027)] Connected client computer name: Guacamole RDP
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_sec_process_mcs_data_CS_CORE(xrdp_sec.c:2163)] client DOES NOT support gfx
8月 31 15:21:27 mycloud xrdp[1661]: [WARN ] [xrdp_sec_process_mcs_data_CS_CORE(xrdp_sec.c:2229)] Physical desktop dimensions (0x0) are invalid
8月 31 15:21:27 mycloud xrdp[1661]: [WARN ] [xrdp_sec_process_mcs_data(xrdp_sec.c:2652)] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
8月 31 15:21:27 mycloud xrdp[1661]: [WARN ] [xrdp_sec_process_mcs_data(xrdp_sec.c:2652)] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_load_keyboard_layout(xrdp_sec.c:378)] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyb>
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_load_keyboard_layout(xrdp_sec.c:587)] xrdp_load_keyboard_layout: model [] variant [] layout [us] options []
8月 31 15:21:27 mycloud xrdp[1661]: [INFO ] [xrdp_rdp_incoming(xrdp_rdp.c:951)] TLS connection established from 10.0.0.120:60826 TLSv1.3 with cipher TLS_AES_256_GCM>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:823)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:828)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_bitmap(xrdp_caps.c:151)] Client supports single-screen resizes by xrdp
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:833)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_order(xrdp_caps.c:252)] Client Capability: not enough orders supported by client, using painter.
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:897)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:856)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_pointer(xrdp_caps.c:390)] xrdp_caps_process_pointer: client supports new(color) cursor
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:873)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_input(xrdp_caps.c:437)] Client supports Unicode input
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:882)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:887)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:902)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:869)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:861)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:878)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:843)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:865)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:852)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:929)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:924)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:934)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:939)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:944)] Received [MS-RDPBCGR] TS_CONFIRM_ACTIVE_PDU - TS_CAPS_SET capability>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_caps_process_confirm_active(xrdp_caps.c:1001)] Client Capability: LARGE_POINTER_FLAG_96x96 supported
8月 31 15:21:28 mycloud xrdp[1661]: [WARN ] [xrdp_rdp_process_data_control(xrdp_rdp.c:1172)] Received [MS-RDPBCGR] TS_CONTROL_PDU action 4 is unknown (skipped)
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_rdp_process_data_font(xrdp_rdp.c:1310)] yeah, up_and_running
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_bitmap_create(xrdp_bitmap_common.c:102)] xrdp_bitmap_create: noorders
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_mm_create(xrdp_mm.c:64)] xrdp_mm_create: bpp 16 mcs_connection_type 6 jpeg_codec_id 0 v3_codec_id 0 rfx_codec_id 0>
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [km_load_file(lang.c:368)] Loading keymap file /etc/xrdp/km-00000409.toml
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_channel_drdynvc_start(xrdp_channel.c:756)] xrdp_channel_drdynvc_start: drdynvc_channel_id -1
8月 31 15:21:28 mycloud xrdp[1661]: [WARN ] [xrdp_login_wnd_get_monitor_dpi(xrdp_login_wnd.c:705)] No information is available to determine login screen DPI
8月 31 15:21:28 mycloud xrdp[1661]: [WARN ] [xrdp_font_create(xrdp_font.c:164)] No DPI value is available to find login font
8月 31 15:21:28 mycloud xrdp[1661]: [WARN ] [xrdp_font_create(xrdp_font.c:166)] Using the default_dpi of 96
8月 31 15:21:28 mycloud xrdp[1661]: [WARN ] [scp_port_to_unix_domain_path(scp.c:138)] Ignoring obsolete SCP port value '3350'
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2393)] xrdp_wm_log_msg: sesman connect ok
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2393)] xrdp_wm_log_msg: Performing login request for developer
8月 31 15:21:28 mycloud xrdp[1661]: [ERROR] [xrdp_rdp_recv(xrdp_rdp.c:506)] xrdp_rdp_recv: xrdp_channel_process failed
8月 31 15:21:28 mycloud xrdp[1661]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2393)] xrdp_wm_log_msg: login was successful - creating session
8月 31 15:21:29 mycloud xrdp[1661]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2393)] xrdp_wm_log_msg: session is available on display 10 for user developer
8月 31 15:21:29 mycloud xrdp[1661]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2393)] xrdp_wm_log_msg: Connecting to session
8月 31 15:21:29 mycloud xrdp[1661]: [INFO ] [xrdp_mm_setup_mod1(xrdp_mm.c:362)] loaded module 'libxup.so' ok, interface size 10424, version 4
8月 31 15:21:29 mycloud xrdp[1661]: [INFO ] [lib_mod_connect(xup.c:183)] lib_mod_connect: connecting via UNIX socket
8月 31 15:21:29 mycloud xrdp[1661]: [INFO ] [lib_mod_connect(xup.c:210)] lib_mod_connect: connected to Xserver (Xorg) sck 21
8月 31 15:21:29 mycloud xrdp[1661]: [INFO ] [lib_mod_log_peer(xup.c:79)] lib_mod_log_peer: xrdp_pid=1661 connected to Xorg_pid=1687 Xorg_uid=1000 Xorg_gid=1000 clie>
8月 31 15:21:29 mycloud xrdp[1661]: [INFO ] [xrdp_wm_log_msg(xrdp_wm.c:2393)] xrdp_wm_log_msg: Connecting to chansrv
8月 31 15:21:31 mycloud xrdp[1661]: [INFO ] [lib_mod_process_message(xup.c:1800)] lib_mod_process_message: type 100 len 8
8月 31 15:21:31 mycloud xrdp[1661]: [INFO ] [lib_mod_process_message(xup.c:1812)] Received memory_allocation_complete command. width: 1920, height: 919
8月 31 15:21:31 mycloud xrdp[1661]: [INFO ] [lib_mod_process_message(xup.c:1781)] lib_mod_process_message: type 3 len 56
8月 31 15:21:32 mycloud xrdp[1661]: [INFO ] [lib_mod_process_message(xup.c:1781)] lib_mod_process_message: type 3 len 4242
8月 31 15:21:33 mycloud xrdp[1661]: [INFO ] [xrdp_mm_trans_process_unicode_ack(xrdp_mm.c:2496)] Chansrv reported an error starting the Unicode input method
8月 31 15:21:35 mycloud xrdp[1661]: [INFO ] [lib_mod_process_message(xup.c:1781)] lib_mod_process_message: type 3 len 56
8月 31 15:21:35 mycloud xrdp[1661]: [INFO ] [lib_mod_process_message(xup.c:1781)] lib_mod_process_message: type 3 len 56

✔️ Expected Behavior

Enter Chinese characters as you normally enter ASCII characters.

❌ Actual Behavior

Sometimes Chinese characters cannot be entered.

Anything else?

No response

matt335672 commented 1 week ago

Thanks for raising this @mengsongshan

Can you post the chansrv log file when this happens? chansrv will generate better logs when it tries to start the ibus input method. If it can't start the method it signals to xrdp, which is where the this single line come from:-

8月 31 15:21:33 mycloud xrdp[1661]: [INFO ] [xrdp_mm_trans_process_unicode_ack(xrdp_mm.c:2496)] Chansrv reported an error starting the Unicode input method

Chansrv log is in ~/.local/share/xrdp/xrdp-chansrv.$D.log where $D is the display number.

mengsongshan commented 1 week ago

@matt335672

I have a question. When using the ibus feature, only install the ibus? Do need some special settings? According to the logs, the interaction with the ibus is always faulty.

this is the xrdp-chansrv.$D.log

[2024-09-02T19:34:31.606+0800] [INFO ] [channel_thread_loop(chansrv.c:1533)] channel_thread_loop: trans_check_wait_objs error resetting
[2024-09-02T19:34:31.608+0800] [INFO ] [clipboard_deinit(clipboard.c:487)] clipboard_deinit:
[2024-09-02T19:34:31.623+0800] [INFO ] [scard_deinit(smartcard.c:335)] scard_deinit:
[2024-09-02T19:34:31.623+0800] [INFO ] [child_signal_handler(chansrv.c:1627)] child_signal_handler:
[2024-09-02T19:34:33.857+0800] [INFO ] [g_sck_accept(os_calls.c:1252)] Socket 15: connection accepted from AF_UNIX
[2024-09-02T19:34:33.859+0800] [INFO ] [clipboard_init(clipboard.c:343)] clipboard_init:
[2024-09-02T19:34:33.874+0800] [INFO ] [child_signal_handler(chansrv.c:1627)] child_signal_handler:
[2024-09-02T19:34:33.874+0800] [INFO ] [sound_init(sound.c:1276)] sound_init:
[2024-09-02T19:34:33.879+0800] [INFO ] [audin_init(audin.c:494)] audin_init:
[2024-09-02T19:34:33.881+0800] [INFO ] [xrdp_input_unicode_init(input_ibus.c:237)] xrdp_ibus_init: Initializing the iBus engine
[2024-09-02T19:34:33.884+0800] [ERROR] [xrdp_input_unicode_init(input_ibus.c:244)] xrdp_ibus_init: Connect to iBus failed
[2024-09-02T19:34:33.915+0800] [INFO ] [sound_process_output_format(sound.c:374)] sound_process_output_format:
[2024-09-02T19:34:33.918+0800] [INFO ] [sound_process_output_format(sound.c:375)]       wFormatNo       0
[2024-09-02T19:34:33.919+0800] [INFO ] [sound_process_output_format(sound.c:376)]       wFormatTag      WAVE_FORMAT_PCM
[2024-09-02T19:34:33.921+0800] [INFO ] [sound_process_output_format(sound.c:377)]       nChannels       2
[2024-09-02T19:34:33.923+0800] [INFO ] [sound_process_output_format(sound.c:378)]       nSamplesPerSec  44100
[2024-09-02T19:34:33.924+0800] [INFO ] [sound_process_output_format(sound.c:379)]       nAvgBytesPerSec 176400
[2024-09-02T19:34:33.926+0800] [INFO ] [sound_process_output_format(sound.c:380)]       nBlockAlign     4
[2024-09-02T19:34:33.928+0800] [INFO ] [sound_process_output_format(sound.c:381)]       wBitsPerSample  16
[2024-09-02T19:34:33.930+0800] [INFO ] [sound_process_output_format(sound.c:382)]       cbSize          0
[2024-09-02T19:34:33.932+0800] [INFO ] [sound_process_output_format(sound.c:374)] sound_process_output_format:
[2024-09-02T19:34:33.933+0800] [INFO ] [sound_process_output_format(sound.c:375)]       wFormatNo       1
[2024-09-02T19:34:33.935+0800] [INFO ] [sound_process_output_format(sound.c:376)]       wFormatTag      WAVE_FORMAT_PCM
[2024-09-02T19:34:33.937+0800] [INFO ] [sound_process_output_format(sound.c:377)]       nChannels       2
[2024-09-02T19:34:33.939+0800] [INFO ] [sound_process_output_format(sound.c:378)]       nSamplesPerSec  22050
[2024-09-02T19:34:33.941+0800] [INFO ] [sound_process_output_format(sound.c:379)]       nAvgBytesPerSec 88200
[2024-09-02T19:34:33.945+0800] [INFO ] [sound_process_output_format(sound.c:380)]       nBlockAlign     4
[2024-09-02T19:34:33.947+0800] [INFO ] [sound_process_output_format(sound.c:381)]       wBitsPerSample  16
[2024-09-02T19:34:33.949+0800] [INFO ] [sound_process_output_format(sound.c:382)]       cbSize          0
[2024-09-02T19:34:33.985+0800] [INFO ] [sound_process_training(sound.c:1044)] sound_process_training: round trip time 34
matt335672 commented 1 week ago

It looks like the ibus daemon for your session isn't running.

The ibus daemon isn't started by chansrv - it's started by the script /etc/X11/Xsession.d/70im-config_launch when you start a session. Maybe that's not working.

Let's get a trace of that process.

Can you edit /etc/xrdp/startwm.sh and add this line somewhere near the top:-

set -x

The next time you try to log in, you should have a lot of logging in ~/.xsession-errors. Can you post that?

mengsongshan commented 1 week ago

@matt335672

OKey, I add set -x at the top of the startwm.sh file. this is the content of the .xsession-errors file.

+++ date
++ echo 'Xsession: X session started for developer at 2024年 09月 03日 星期二 09:26:24 CST'
Xsession: X session started for developer at 2024年 09月 03日 星期二 09:26:24 CST
++ '[' '!' -d /etc/X11/Xsession.d ']'
+++ mktemp
++ WRITE_TEST=/tmp/tmp.GLKMmpYZ6g
++ echo '*'
++ rm -f /tmp/tmp.GLKMmpYZ6g
+++ run-parts --list /etc/X11/Xsession.d
++ SESSIONFILES='/etc/X11/Xsession.d/20dbus_xdg-runtime
/etc/X11/Xsession.d/20x11-common_process-args
/etc/X11/Xsession.d/30x11-common_xresources
/etc/X11/Xsession.d/35x11-common_xhost-local
/etc/X11/Xsession.d/40x11-common_xsessionrc
/etc/X11/Xsession.d/50x11-common_determine-startup
/etc/X11/Xsession.d/55gnome-session_gnomerc
/etc/X11/Xsession.d/60x11-common_xdg_path
/etc/X11/Xsession.d/70im-config_launch
/etc/X11/Xsession.d/75dbus_dbus-launch
/etc/X11/Xsession.d/90atk-adaptor
/etc/X11/Xsession.d/90gpg-agent
/etc/X11/Xsession.d/90qt-a11y
/etc/X11/Xsession.d/90x11-common_ssh-agent
/etc/X11/Xsession.d/90xbrlapi
/etc/X11/Xsession.d/95dbus_update-activation-env
/etc/X11/Xsession.d/99x11-common_start'
++ '[' -n '/etc/X11/Xsession.d/20dbus_xdg-runtime
/etc/X11/Xsession.d/20x11-common_process-args
/etc/X11/Xsession.d/30x11-common_xresources
/etc/X11/Xsession.d/35x11-common_xhost-local
/etc/X11/Xsession.d/40x11-common_xsessionrc
/etc/X11/Xsession.d/50x11-common_determine-startup
/etc/X11/Xsession.d/55gnome-session_gnomerc
/etc/X11/Xsession.d/60x11-common_xdg_path
/etc/X11/Xsession.d/70im-config_launch
/etc/X11/Xsession.d/75dbus_dbus-launch
/etc/X11/Xsession.d/90atk-adaptor
/etc/X11/Xsession.d/90gpg-agent
/etc/X11/Xsession.d/90qt-a11y
/etc/X11/Xsession.d/90x11-common_ssh-agent
/etc/X11/Xsession.d/90xbrlapi
/etc/X11/Xsession.d/95dbus_update-activation-env
/etc/X11/Xsession.d/99x11-common_start' ']'
++ set +e
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/20dbus_xdg-runtime
+++ '[' -z unix:path=/run/user/1000/bus ']'
+++ '[' -x /usr/bin/dbus-update-activation-environment ']'
+++ dbus-update-activation-environment --verbose --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:10.0
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/20x11-common_process-args
+++ case $# in
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/30x11-common_xresources
+++ '[' -d /etc/X11/Xresources ']'
+++ type xrdb
++++ run-parts --list /etc/X11/Xresources
+++ RESOURCEFILES=/etc/X11/Xresources/x11-common
+++ '[' -n /etc/X11/Xresources/x11-common ']'
+++ for RESOURCEFILE in $RESOURCEFILES
+++ xrdb -merge /etc/X11/Xresources/x11-common
+++ has_option allow-user-resources
++++ echo '# $Id: Xsession.options 189 2005-06-11 00:04:27Z branden $
#
# configuration options for /etc/X11/Xsession
# See Xsession.options(5) for an explanation of the available options.
allow-failsafe
allow-user-resources
allow-user-xsession
use-ssh-agent
use-session-dbus'
++++ tail -n 1
++++ grep -Eo '^(no-)?allow-user-resources\>'
+++ '[' allow-user-resources = allow-user-resources ']'
+++ return 0
+++ '[' -f /home/developer/.Xresources ']'
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/35x11-common_xhost-local
+++ type xhost
++++ id -un
+++ xhost +si:localuser:developer
localuser:developer being added to access control list
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/40x11-common_xsessionrc
+++ '[' -r /home/developer/.xsessionrc ']'
+++ . /home/developer/.xsessionrc
++++ export GNOME_SHELL_SESSION_MODE=ubuntu
++++ GNOME_SHELL_SESSION_MODE=ubuntu
++++ export XDG_CURRENT_DESKTOP=ubuntu:GNOME
++++ XDG_CURRENT_DESKTOP=ubuntu:GNOME
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/50x11-common_determine-startup
+++ '[' -z '' ']'
+++ has_option allow-user-xsession
++++ echo '# $Id: Xsession.options 189 2005-06-11 00:04:27Z branden $
#
# configuration options for /etc/X11/Xsession
# See Xsession.options(5) for an explanation of the available options.
allow-failsafe
allow-user-resources
allow-user-xsession
use-ssh-agent
use-session-dbus'
++++ tail -n 1
++++ grep -Eo '^(no-)?allow-user-xsession\>'
+++ '[' allow-user-xsession = allow-user-xsession ']'
+++ return 0
+++ for STARTUPFILE in "$USERXSESSION" "$ALTUSERXSESSION"
+++ '[' -e /home/developer/.xsession ']'
+++ for STARTUPFILE in "$USERXSESSION" "$ALTUSERXSESSION"
+++ '[' -e /home/developer/.Xsession ']'
+++ '[' -z '' ']'
+++ '[' -x /usr/bin/x-session-manager ']'
+++ STARTUP=x-session-manager
+++ '[' -z x-session-manager ']'
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/55gnome-session_gnomerc
+++ BASESTARTUP=x-session-manager
+++ BASESTARTUP=x-session-manager
+++ '[' x-session-manager = x-session-manager ']'
+++++ readlink /etc/alternatives/x-session-manager
++++ basename /usr/bin/gnome-session
+++ BASESTARTUP=gnome-session
+++ case "$BASESTARTUP" in
+++ GNOMERC=/home/developer/.gnomerc
+++ '[' -r /home/developer/.gnomerc ']'
+++ '[' -z /usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop ']'
+++ '[' -n '' ']'
+++ export XDG_DATA_DIRS
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/60x11-common_xdg_path
+++ DEFAULT_XDG_CONFIG_DIRS=/etc/xdg
+++ DEFAULT_XDG_DATA_DIRS=/usr/local/share/:/usr/share/
+++ '[' -n '' ']'
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/70im-config_launch
+++ IMLAUNCH=/usr/bin/im-launch
+++ '[' '' = 1 ']'
+++ '[' -z '' ']'
+++ '[' -z '' ']'
+++ '[' -z '' ']'
+++ '[' -z '' ']'
+++ '[' -r /usr/share/im-config/xinputrc.common ']'
+++ IM_CONFIG_PHASE=1
+++ export IM_CONFIG_PHASE
+++ . /usr/share/im-config/xinputrc.common
++++ IM_CONFIG_VERSION=0.50-2ubuntu22.04.1
++++ IM_CONFIG_DATA=/usr/share/im-config/data
++++ IM_CONFIG_XINPUTRC_USR=/home/developer/.xinputrc
++++ IM_CONFIG_XINPUTRC_SYS=/etc/X11/xinit/xinputrc
++++ IM_CONFIG_DEFAULT=/etc/default/im-config
++++ IM_CONFIG_VERBOSE=false
++++ . gettext.sh
+++++ test 'X\t' = 'X\t'
+++++ echo=echo
+++++ test -z ''
+++++ case "$0" in
++++ TEXTDOMAIN=im-config
++++ export TEXTDOMAIN
++++ TEXTDOMAINDIR=/usr/share/locale/
++++ export TEXTDOMAINDIR
++++ IM_CONFIG_CURRENT_DESKTOP=ubuntu:GNOME
++++ '[' -z ubuntu:GNOME ']'
++++ '[' -r /etc/default/im-config ']'
++++ . /etc/default/im-config
+++++ IM_CONFIG_DEFAULT_MODE=auto
+++++ CJKV_DEFAULT_DESKTOP='*'
+++++ CJKV_LOCALES=zh_TW:zh_HK:zh_SG:zh_CN:ja_JP:ko_KR:vi_VN
+++++ IM_CONFIG_PREFERRED_RULE=zh_CN,fcitx5:zh_TW,fcitx5:zh_HK,fcitx5:zh_SG,fcitx5
+++++ DESKTOP_SETUP_IBUS=GNOME
+++++ sed -nr 's/LC_CTYPE=\"?([a-zA-Z_]*).*/\1/p'
+++++ locale
++++ IM_CONFIG_LC_CTYPE=zh_CN
+++++ echo zh_CN,fcitx5:zh_TW,fcitx5:zh_HK,fcitx5:zh_SG,fcitx5
+++++ sed -rn 's/(^|.*:)zh_CN,([^:]*)($|:.*$)/\2/p'
++++ IM_CONFIG_PREFERRED=fcitx5
+++ unset TEXTDOMAIN
+++ unset TEXTDOMAINDIR
+++ '[' -r /home/developer/.xinputrc ']'
+++ . /home/developer/.xinputrc
++++ run_im ibus
++++ IM_CONFIG_CODE=run_im
++++ '[' -r /usr/share/im-config/data/21_ibus.rc ']'
++++ . /usr/share/im-config/data/21_ibus.rc
+++++ find_match ubuntu:GNOME GNOME
+++++ local 'OLDIFS=    
' R=1 X Y
+++++ IFS=:
+++++ '[' -n ubuntu:GNOME ']'
+++++ '[' -n GNOME ']'
+++++ for X in $1
+++++ for Y in $2
+++++ '[' '*' = GNOME ']'
+++++ '[' ubuntu = GNOME ']'
+++++ for X in $1
+++++ for Y in $2
+++++ '[' '*' = GNOME ']'
+++++ '[' GNOME = GNOME ']'
+++++ R=0
+++++ break 2
+++++ IFS='     
'
+++++ return 0
+++++ '[' 1 = 1 ']'
+++++ '[' x11 = x11 ']'
+++++ GTK_IM_MODULE=ibus
+++++ return
++++ IM_CONFIG_NAME=ibus
++++ false
+++ export XMODIFIERS
+++ export GTK_IM_MODULE
+++ export QT_IM_MODULE
+++ export CLUTTER_IM_MODULE
+++ '[' -x /usr/bin/im-launch ']'
+++ STARTUP='/usr/bin/im-launch x-session-manager'
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/75dbus_dbus-launch
+++ STARTDBUS=
+++ DBUSLAUNCH=/usr/bin/dbus-launch
+++ has_option use-session-dbus
++++ echo '# $Id: Xsession.options 189 2005-06-11 00:04:27Z branden $
#
# configuration options for /etc/X11/Xsession
# See Xsession.options(5) for an explanation of the available options.
allow-failsafe
allow-user-resources
allow-user-xsession
use-ssh-agent
use-session-dbus'
++++ tail -n 1
++++ grep -Eo '^(no-)?use-session-dbus\>'
+++ '[' use-session-dbus = use-session-dbus ']'
+++ return 0
+++ '[' -z unix:path=/run/user/1000/bus ']'
+++ '[' -n '' ']'
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/90atk-adaptor
+++ add_module gail
+++ case :$GTK_MODULES: in
+++ '[' -z '' ']'
+++ GTK_MODULES=gail
+++ add_module atk-bridge
+++ case :$GTK_MODULES: in
+++ '[' -z gail ']'
+++ GTK_MODULES=gail:atk-bridge
+++ export GTK_MODULES
+++ '[' -x /usr/bin/dbus-update-activation-environment ']'
+++ dbus-update-activation-environment --verbose --systemd GTK_MODULES
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/90gpg-agent
++++ gpgconf --list-dirs agent-socket
+++ agent_sock=/run/user/1000/gnupg/S.gpg-agent
+++ export GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
+++ GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
++++ gpgconf --list-options gpg-agent
++++ awk -F: '/^enable-ssh-support:/{ print $10 }'
+++ '[' -n '' ']'
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/90qt-a11y
+++ QT_ACCESSIBILITY=1
+++ export QT_ACCESSIBILITY
+++ '[' -x /usr/bin/dbus-update-activation-environment ']'
+++ dbus-update-activation-environment --verbose --systemd QT_ACCESSIBILITY
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/90x11-common_ssh-agent
+++ STARTSSH=
+++ SSHAGENT=/usr/bin/ssh-agent
+++ SSHAGENTARGS=
+++ has_option use-ssh-agent
++++ echo '# $Id: Xsession.options 189 2005-06-11 00:04:27Z branden $
#
# configuration options for /etc/X11/Xsession
# See Xsession.options(5) for an explanation of the available options.
allow-failsafe
allow-user-resources
allow-user-xsession
use-ssh-agent
use-session-dbus'
++++ tail -n 1
++++ grep -Eo '^(no-)?use-ssh-agent\>'
+++ '[' use-ssh-agent = use-ssh-agent ']'
+++ return 0
+++ '[' -x /usr/bin/ssh-agent ']'
+++ '[' -z '' ']'
+++ STARTUP='/usr/bin/ssh-agent   /usr/bin/im-launch x-session-manager'
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/90xbrlapi
+++ prefix=
+++ exec_prefix=
+++ program_directory=/bin
+++ xbrlapi=/bin/xbrlapi
+++ brltty=/bin/brltty
+++ '[' -x /bin/xbrlapi ']'
+++ /bin/xbrlapi
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/95dbus_update-activation-env
+++ '[' -n unix:path=/run/user/1000/bus ']'
+++ '[' -x /usr/bin/dbus-update-activation-environment ']'
+++ unset XDG_SEAT
+++ unset XDG_SESSION_ID
+++ unset XDG_VTNR
+++ dbus-update-activation-environment --verbose --systemd --all
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting GTK_IM_MODULE=ibus
dbus-update-activation-environment: setting HISTSIZE=10000
dbus-update-activation-environment: setting LANGUAGE=zh_CN:en
dbus-update-activation-environment: setting LC_ADDRESS=zh_CN.UTF-8
dbus-update-activation-environment: setting GNOME_SHELL_SESSION_MODE=ubuntu
dbus-update-activation-environment: setting LC_NAME=zh_CN.UTF-8
dbus-update-activation-environment: setting HISTTIMEFORMAT=%F %T developer 
dbus-update-activation-environment: setting LC_MONETARY=zh_CN.UTF-8
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting PWD=/home/developer
dbus-update-activation-environment: setting LOGNAME=developer
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting PULSE_SCRIPT=/etc/xrdp/pulse/default.pa
dbus-update-activation-environment: setting HOME=/home/developer
dbus-update-activation-environment: setting IM_CONFIG_PHASE=1
dbus-update-activation-environment: setting LC_PAPER=zh_CN.UTF-8
dbus-update-activation-environment: setting LANG=zh_CN.UTF-8
dbus-update-activation-environment: setting XDG_CURRENT_DESKTOP=ubuntu:GNOME
dbus-update-activation-environment: setting XRDP_SOCKET_PATH=/var/run/xrdp/1000
dbus-update-activation-environment: setting XRDP_PULSE_SOURCE_SOCKET=xrdp_chansrv_audio_in_socket_10
dbus-update-activation-environment: setting XDG_SESSION_CLASS=user
dbus-update-activation-environment: setting LC_IDENTIFICATION=zh_CN.UTF-8
dbus-update-activation-environment: setting USER=developer
dbus-update-activation-environment: setting XRDP_SESSION=1646
dbus-update-activation-environment: setting DISPLAY=:10.0
dbus-update-activation-environment: setting XRDP_PULSE_SINK_SOCKET=xrdp_chansrv_audio_out_socket_10
dbus-update-activation-environment: setting SHLVL=1
dbus-update-activation-environment: setting LC_TELEPHONE=zh_CN.UTF-8
dbus-update-activation-environment: setting LC_MEASUREMENT=zh_CN.UTF-8
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting LC_TIME=zh_CN.UTF-8
dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop
dbus-update-activation-environment: setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting UID=1000
dbus-update-activation-environment: setting LC_NUMERIC=zh_CN.UTF-8
dbus-update-activation-environment: setting _=/usr/bin/dbus-update-activation-environment
++ for SESSIONFILE in $SESSIONFILES
++ . /etc/X11/Xsession.d/99x11-common_start
+++ exec /usr/bin/ssh-agent /usr/bin/im-launch x-session-manager
mengsongshan commented 1 week ago

@matt335672

I found that two ibus processes were started on my system. I traced the startup processes and found that one was started by gnome-shell and the other by systemctl.

gdm         1544    1301  0 09:26 tty1     00:00:00 ibus-daemon --panel disable -r --xim
gdm         1557    1544  0 09:26 tty1     00:00:00 /usr/libexec/ibus-memconf
gdm         1563       1  0 09:26 tty1     00:00:00 /usr/libexec/ibus-x11 --kill-daemon
gdm         1568       1  0 09:26 tty1     00:00:00 /usr/libexec/ibus-portal
gdm         1581    1544  0 09:26 tty1     00:00:00 /usr/libexec/ibus-engine-simple
develop+    1937    1648  0 09:26 ?        00:00:00 sh -c /usr/bin/ibus-daemon --panel disable $([ "$XDG_SESSION_TYPE" = "x11" ] && echo "--xim")
develop+    1957    1937  0 09:26 ?        00:00:01 /usr/bin/ibus-daemon --panel disable --xim
develop+    2039    1957  0 09:26 ?        00:00:00 /usr/libexec/ibus-memconf
develop+    2041    1957  0 09:26 ?        00:00:01 /usr/libexec/ibus-extension-gtk3
develop+    2053    1648  0 09:26 ?        00:00:00 /usr/libexec/ibus-x11 --kill-daemon
develop+    2070    1648  0 09:26 ?        00:00:00 /usr/libexec/ibus-portal
develop+    2143    1957  0 09:26 ?        00:00:00 /usr/libexec/ibus-engine-simple
develop+    4171    3972  0 09:48 pts/1    00:00:00 vi 21_ibus.rc
develop+    4203    4191  0 09:49 pts/2    00:00:00 grep --color=auto ibus

In addition, xrdp.log and syslog do not have logs in input_ibus.c. I suspect that xrdp_input_unicode_init is not called.

These are what I can think of, you see what else I can provide, and I'll provide you with the analysis of this problem.

matt335672 commented 1 week ago

I believe input_ibus.c only logs to the chansrv log.

The relevant ibus-daemon is the one owned by your user. That seems to be started OK.

We're starting to get out of my knowledge here. What happens when you run im-config?