You are not logged in.

#1 2023-09-14 00:59:17

anxz
Member
Registered: 2023-09-14
Posts: 15

[SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Hi,
My environment:
ARCH 6.5.3-arch1-1
DE: Xfce 4.18
WM: Xfwm4

I found some interesting bugs after an upgrade yesterday.
here is my snippet of pacman.log:

[2023-09-13T20:03:52+0800] [PACMAN] Running 'pacman -Syu'
[2023-09-13T20:03:52+0800] [PACMAN] synchronizing package lists
[2023-09-13T20:03:54+0800] [PACMAN] starting full system upgrade
[2023-09-13T20:04:24+0800] [ALPM] transaction started
[2023-09-13T20:04:24+0800] [ALPM] upgraded sqlite (3.43.0-1 -> 3.43.1-1)
[2023-09-13T20:04:25+0800] [ALPM] upgraded brave-bin (1:1.57.57-1 -> 1:1.57.64-1)
[2023-09-13T20:04:25+0800] [ALPM] upgraded ghostscript (10.01.2-1 -> 10.02.0-1)
[2023-09-13T20:04:25+0800] [ALPM] upgraded libarchive (3.7.1-1 -> 3.7.2-1)
[2023-09-13T20:04:25+0800] [ALPM] upgraded libwebp (1.3.1-1 -> 1.3.1-2)

After this upgrade, I found that I cannot use FCITX5 in the emacs clicked to open on the desktop (app launcher of xfce)
Known affected apps:
Emacs: cannot activate FCITX5 by ALT+SPACE.
WPS: cannot activate FCITX5 by ALT+SPACE.
Wine WeChat: cannot show Chinese characters.
NOT Affected apps:
Chrome,etc...

BUT, I the emacs or WPS launched by gurun or xfce-appfinder or termimals an activate the FCITX5 as usual.
AND the character display of wine wechat launched by terminals or gurun/xfce-appfinder is normal as usual.

My locale:

LANG=en_US.UTF-8
LC_CTYPE=zh_CN.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

and:

$cat /etc/locale.conf 
# This is the fallback locale configuration provided by systemd.
LANG="en_US.UTF-8"

I've run fcitx5-diagnose, and everything seems ok.

Should there be any issue related to locale of xfce4?

Anyone can give me a clue on this issue?
Thank you.

Last edited by anxz (2023-09-17 08:05:14)

Offline

#2 2023-09-14 02:01:33

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

on another note, I found :
xls, doc files opened by thunar(launched by clicking launch.desktop) cannot active FCITX5 by SPC+ALT.
xls, doc files opened by Pcmanfm(launched by clicking launch.desktop) cannot active FCITX5 by SPC+ALT.

While:
xls, doc files opened by Pcmanfm(launched by running in gmrun) CAN active FCITX5 by SPC+ALT.

Offline

#3 2023-09-14 06:35:01

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Please use [code][/code] tags. Edit your post in this regard.

localectl
loginctl session-status
echo $DBUS_SESSION_BUS_ADDRESS

And compare the environments of affected and non-affected processes:

tr '\0' '\n' < /proc/#pid of interesting process here#/environ

Depending on where you do https://wiki.archlinux.org/title/Fcitx5#Integration they may only affect specific contexts (notbaly if "where" is your bashrc)

Last edited by seth (2023-09-14 06:39:24)

Offline

#4 2023-09-14 10:17:49

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Thank you for noticing!
I am just an engineer nothing related to computer science or programming.

It's weird that this issue occurred after a mild upgrade. 

Here is more information.

$localectl 
System Locale: LANG=en_US.UTF-8
    VC Keymap: (unset)         
   X11 Layout: (unset)   
$echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus
cat .zshrc|grep fcitx
#setup fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx

I started an emacs session by clicking the launcher on the desktop, and as expected, when ALT-SPC, it showed: C-SPC is undefined (instead of activating FCITX5 when launched in the terminal).

$loginctl session-status|grep emacs
                  └─46645 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox emacs
Sep 14 18:09:53 flow systemd-coredump[46521]: Process 46488 (emacs) of user 1000 dumped core.
ps aux|grep emacs
anix       46576  7.3  2.9 1034864 228448 ?      Sl   18:10   0:10 emacs
anix       46790 50.0  0.0  14816  2688 pts/0    S+   18:12   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox emacs
$tr '\0' '\n' < /proc/46576/environ 
HOME=/home/anix
LANG=en_US.UTF-8
LOGNAME=anix
MAIL=/var/spool/mail/anix
PATH=/usr/local/bin:/usr/bin
SHELL=/bin/zsh
USER=anix
XDG_RUNTIME_DIR=/run/user/1000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXCW3Rym/agent.7775
XAUTHLOCALHOSTNAME=
MANAGERPID=651
INVOCATION_ID=2ac564b163304f5890289fd995afc6eb
JOURNAL_STREAM=8:177329
SYSTEMD_EXEC_PID=7851
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/app.slice/thunar.service/memory.pressure
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
DISPLAY=:0.0
DESKTOP_STARTUP_ID=Thunar/emacs/7851-4-flow_TIME29149190



seth wrote:

Please use [code][/code] tags. Edit your post in this regard.

localectl
loginctl session-status
echo $DBUS_SESSION_BUS_ADDRESS

And compare the environments of affected and non-affected processes:

tr '\0' '\n' < /proc/#pid of interesting process here#/environ

Depending on where you do https://wiki.archlinux.org/title/Fcitx5#Integration they may only affect specific contexts (notbaly if "where" is your bashrc)

Last edited by anxz (2023-09-14 10:24:35)

Offline

#5 2023-09-14 14:28:19

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Your zshrc (or bashrc) isn't a good place for these environment variables and as you can see, they're not available to the emacs process.
https://wiki.archlinux.org/title/Environment_variables

If you had posted the entire session-status I'd tell you where to put them instead, but typically ~/.profile or ~/.xprofile are good candidates.

Offline

#6 2023-09-15 00:41:04

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Here is my current session status.
I was an arch user about 10 years ago, and then changed to another system, and back to arch this year, so my configuration files are mostly based on old configs. So I don't have ~/.profile or ~/.xprofile in my ~/.

Everything worked normally before that upgrade, there should be something changed by that upgrade.....

Thank you.


~ $ loginctl session-status
1 - anix (1000)
	   Since: Fri 2023-09-15 08:15:33 +08; 19min ago
	  Leader: 543 (login)
	    Seat: seat0; vc1
	     TTY: tty1
	 Service: login; type tty; class user
	   State: active
	    Idle: no
	    Unit: session-1.scope
		  ├─ 543 "login -- anix"
		  ├─ 653 -zsh
		  ├─ 696 xinit /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc vt1
		  ├─ 697 /usr/lib/Xorg -nolisten tcp :0 vt1
		  ├─ 699 xf86-video-intel-backlight-helper intel_backlight
		  ├─ 703 xfce4-session
		  ├─ 757 /usr/bin/ssh-agent -s
		  ├─ 767 xfwm4 --display :0.0 --sm-client-id 2d360d1fe-a41a-404c-a67d-a3d30a28b024
		  ├─ 780 xfsettingsd --display :0.0 --sm-client-id 21e27c6fc-dfd6-4227-aeb3-0061022287ac
		  ├─ 798 xfce4-panel --display :0.0 --sm-client-id 2731d6de7-5b0a-4c3d-8b87-46dfa09783dd
		  ├─ 805 xfdesktop --display :0.0 --sm-client-id 22034f5c7-0837-48d0-8ae9-5d35af409525
		  ├─ 820 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libsystray.so 6 14680075 systray "St…
		  ├─ 821 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libxfce4powermanager.so 9 14680076 p…
		  ├─ 822 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libnotification-plugin.so 10 1468007…
		  ├─ 832 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libpulseaudio-plugin.so 24 14680078 …
		  ├─ 836 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libactions.so 14 14680079 actions "A…
		  ├─ 837 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libweather.so 7 14680080 weather "We…
		  ├─ 838 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libwavelan.so 25 14680081 wavelan Wa…
		  ├─ 839 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libsystemload.so 8 14680082 systemlo…
		  ├─ 840 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libxfce4-sensors-plugin.so 31 146800…
		  ├─ 841 xfce4-power-manager --restart --sm-client-id 282c972d4-0fe0-40d8-b8ac-914cf55698af
		  ├─ 865 xfce4-notes
		  ├─ 869 tilda -h
		  ├─ 871 tint2
		  ├─ 877 /usr/lib/xfce4/notifyd/xfce4-notifyd
		  ├─ 882 xscreensaver -no-splash
		  ├─ 889 /usr/bin/fcitx5
		  ├─ 895 xscreensaver-systemd
		  ├─ 901 /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
		  ├─1010 /bin/zsh
		  ├─1202 xfce4-appfinder --collapsed
		  ├─1225 emacs
		  ├─1255 /usr/bin/hunspell -a "" -d en_US -i UTF-8
		  ├─1790 /bin/sh /opt/apps/com.qq.weixin.spark/files/run.sh -f
		  ├─1798 /bin/bash /opt/deepinwine/tools/spark_run_v4.sh Spark-weixin 3.8.0.41spark23.1 "c:/Program Files/T…
		  ├─2133 /usr/bin/wineserver
		  ├─2139 "C:\\windows\\system32\\services.exe"
		  ├─2142 "C:\\windows\\system32\\winedevice.exe"
		  ├─2159 "C:\\windows\\system32\\winedevice.exe"
		  ├─2167 "C:\\windows\\system32\\plugplay.exe"
		  ├─2175 "C:\\windows\\system32\\svchost.exe" -k LocalServiceNetworkRestricted
		  ├─2200 "c:/Program Files/Tencent/WeChat/WeChat.exe"
		  ├─2202 "C:\\windows\\system32\\conhost.exe" --unix --width 137 --height 38 --server 0x10
		  ├─2205 "C:\\windows\\system32\\explorer.exe" /desktop
		  ├─2210 "C:\\windows\\system32\\rpcss.exe"
		  ├─2271 "C:\\users\\anix\\Application Data\\Tencent\\WeChat\\XPlugin\\Plugins\\RadiumWMPF\\6938\\extracted…
		  ├─2281 "C:\\users\\anix\\Application Data\\Tencent\\WeChat\\XPlugin\\Plugins\\ThumbPlayer\\3782\\extracte…
		  ├─2290 "C:\\users\\anix\\Application Data\\Tencent\\WeChat\\XPlugin\\Plugins\\RadiumWMPF\\6938\\extracted…
		  ├─2330 "C:\\users\\anix\\Application Data\\Tencent\\WeChat\\XPlugin\\Plugins\\RadiumWMPF\\6938\\extracted…
		  ├─2759 "C:\\users\\anix\\Application Data\\Tencent\\WeChat\\XPlugin\\Plugins\\RadiumWMPF\\6938\\extracted…
		  ├─2777 "C:\\users\\anix\\Application Data\\Tencent\\WeChat\\XPlugin\\Plugins\\RadiumWMPF\\6938\\extracted…
		  ├─3923 "C:\\users\\anix\\Application Data\\Tencent\\WeChat\\XPlugin\\Plugins\\RadiumWMPF\\6938\\extracted…
		  ├─4384 /opt/google/chrome/chrome
		  ├─4388 cat
		  ├─4389 cat
		  ├─4392 /opt/google/chrome/chrome_crashpad_handler --monitor-self --monitor-self-annotation=ptype=crashpad…
		  ├─4394 /opt/google/chrome/chrome_crashpad_handler --no-periodic-tasks --monitor-self-annotation=ptype=cra…
		  ├─4400 "/opt/google/chrome/chrome --type=zygote --no-zygote-sandbox --crashpad-handler-pid=4392 --enable-…
		  ├─4401 "/opt/google/chrome/chrome --type=zygote --crashpad-handler-pid=4392 --enable-crash-reporter=, --c…
		  ├─4402 /opt/google/chrome/nacl_helper
		  ├─4405 "/opt/google/chrome/chrome --type=zygote --crashpad-handler-pid=4392 --enable-crash-reporter=, --c…
		  ├─4428 "/opt/google/chrome/chrome --type=gpu-process --crashpad-handler-pid=4392 --enable-crash-reporter=…
		  ├─4429 "/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=e…
		  ├─4490 "/opt/google/chrome/chrome --type=utility --utility-sub-type=storage.mojom.StorageService --lang=e…
		  ├─4509 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  ├─4531 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  ├─4540 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  ├─4550 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  ├─4560 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  ├─4608 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  ├─4924 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  ├─4965 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  ├─5457 "/opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=4392 --enable-crash-reporter=, -…
		  └─5653 /usr/bin/loginctl session-status

Sep 15 08:15:33 flow login[543]: LOGIN ON tty1 BY anix
Sep 15 08:15:33 flow systemd[1]: Started Session 1 of User anix.

Offline

#7 2023-09-15 06:04:39

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx

in your xinitrc.

You could try to downgrade those packages and see which one breaks it, but none of them looks particularily related to fcitx or keyboard shorts (certainly not w/ an isolated impact, otherwise eg. brave might be grabbing the input) so this may just be coincidental (triggered by a restart/reboot after the update?)

Offline

#8 2023-09-15 07:41:09

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Another interesting finding is :
When I click Chrome on the desktop, the gnome-keyring does not pop out.
When I start xfce-appfinder or gmrun to run Chrome, the gnome-keyring will pop out for the password.

I removed brave-bin and nothing changed.

It seems the xfce session or x session did not read the env variables when starting.

Very tricky and weired issue...

Offline

#9 2023-09-15 07:49:33

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

seth wrote:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx

in your xinitrc.

You could try to downgrade those packages and see which one breaks it, but none of them looks particularily related to fcitx or keyboard shorts (certainly not w/ an isolated impact, otherwise eg. brave might be grabbing the input) so this may just be coincidental (triggered by a restart/reboot after the update?)


Thank you for your advice, Seth.
I modified the xinitrc in /etc/xdg/xfce4.
And rebooted the system, the problem is as before.

$ cat /etc/xdg/xfce4/xinitrc

#!/bin/sh
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
# fix broken $UID on some system...
if test "x$UID" = "x"; then
  if test -x /usr/xpg4/bin/id; then
    UID=`/usr/xpg4/bin/id -u`;
  else
    UID=`id -u`;
  fi
fi

# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
# over "applications.menu" in all Xfce applications.
if test "x$XDG_MENU_PREFIX" = "x"; then
  XDG_MENU_PREFIX="xfce-"
  export XDG_MENU_PREFIX
fi

# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
if test "x$DESKTOP_SESSION" = "x"; then
  DESKTOP_SESSION="xfce"
  export DESKTOP_SESSION
fi

# set XDG_CURRENT_DESKTOP so that Qt 5 applications can identify user set Xfce theme
if test "x$XDG_CURRENT_DESKTOP" = "x"; then
  XDG_CURRENT_DESKTOP="XFCE"
  export XDG_CURRENT_DESKTOP
fi

# $XDG_CONFIG_HOME defines the base directory relative to which user specific
# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
# or empty, a default equal to $HOME/.config should be used.
if test "x$XDG_CONFIG_HOME" = "x" ; then
  XDG_CONFIG_HOME=$HOME/.config
fi
[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"

# $XDG_CACHE_HOME defines the base directory relative to which user specific
# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
# set or empty, a default equal to $HOME/.cache should be used.
if test "x$XDG_CACHE_HOME" = "x" ; then
  XDG_CACHE_HOME=$HOME/.cache
fi
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"

# set up XDG user directores.  see
# http://freedesktop.org/wiki/Software/xdg-user-dirs
if command -v xdg-user-dirs-update >/dev/null 2>&1; then
    xdg-user-dirs-update
fi

# For now, start with an empty list
XRESOURCES=""

# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
test -r "/etc/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES /etc/xdg/xfce4/Xft.xrdb"
test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"

BASEDIR=$XDG_CONFIG_HOME/xfce4
if test -r "$BASEDIR/Xft.xrdb"; then
  XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
elif test -r "$XFCE4HOME/Xft.xrdb"; then
  mkdir -p "$BASEDIR"
  cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
  XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
fi

# merge in X cursor settings
test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"

# ~/.Xresources contains overrides to the above
test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"

# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
cat /dev/null $XRESOURCES | xrdb -merge -

# load local modmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap

# if XAUTHLOCALHOSTNAME is not set in systemd user session, starting of xfce4-notifyd, DISPLAY etc. will fail
if command -v systemctl >/dev/null 2>&1 && systemctl --user list-jobs >/dev/null 2>&1; then # user session is running
  dbus-update-activation-environment --systemd XAUTHLOCALHOSTNAME=$XAUTHLOCALHOSTNAME
fi

# source system xinitrc scripts
if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

# check if we start xfce4-session with ck-launch-session. this is only
# required for starting from a console, not a login manager
if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
  if command -v ck-launch-session >/dev/null 2>&1; then
    exec ck-launch-session xfce4-session
  else
    echo
    echo "You have tried to start Xfce with consolekit support, but"
    echo "ck-launch-session is not installed."
    echo "Aborted startup..."
    echo
    exit 1
  fi
else
  # start xfce4-session normally
  exec xfce4-session
fi

# if we got here, then exec failed
exit 1

Offline

#10 2023-09-15 07:55:44

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

by the way, I just tried to put these variables into .xinitrc file, but it doesn't work. ...

Offline

#11 2023-09-15 08:46:33

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

This is the env information from an emacs process started by gmrun emacs. (working)

 tr '\0' '\n' < /proc/1775/environ  

SHELL=/bin/zsh
LSCOLORS=Gxfxcxdxbxegedabagacad
XDG_CONFIG_DIRS=/etc/xdg
LESS=-R
XDG_MENU_PREFIX=xfce-
GLFW_IM_MODULE=ibus
GTK_IM_MODULE=fcitx
HISTSIZE=10000
CREDENTIALS_DIRECTORY=/run/credentials/getty@tty1.service
OS=Arch Linux,visit www.archlinux.org for more information.
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
XMODIFIERS=@im=fcitx
DESKTOP_SESSION=xfce
EDITOR=vim
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/anix
LOGNAME=anix
XDG_SESSION_TYPE=tty
SYSTEMD_EXEC_PID=533
WINDOWPATH=1
MOTD_SHOWN=pam
HOME=/home/anix
LANG=en_US.UTF-8
HISTFILE=/home/anix/.zhistory
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
XDG_CURRENT_DESKTOP=XFCE
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/system-getty.slice/getty@tty1.service/memory.pressure
INVOCATION_ID=50a546de1cf84ed08b4d36fb8f5cfb42
SAVEHIST=10000
SDL_IM_MODULE=fcitx
XDG_SESSION_CLASS=user
TERM=linux
ZSH=/home/anix/.oh-my-zsh
USER=anix
SHLVL=1
PAGER=less
QT_IM_MODULE=fcitx
XDG_VTNR=1
XDG_SESSION_ID=1
PYTHONDOCS=/usr/share/doc/python/html/
LC_CTYPE=zh_CN.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org 
GTK3_MODULES=xapp-gtk3-module
XDG_DATA_DIRS=/usr/local/share:/usr/share
ZLSCOLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/anix
OLDPWD=/home/anix
SESSION_MANAGER=local/flow:@/tmp/.ICE-unix/708,unix/flow:/tmp/.ICE-unix/708
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXuD0Vjf/agent.761
SSH_AGENT_PID=762
DISPLAY=:0.0

This is the  env info of an emacs started by clicking the desktop shortcut.(not working properly)

$tr '\0' '\n' < /proc/46576/environ 
HOME=/home/anix
LANG=en_US.UTF-8
LOGNAME=anix
MAIL=/var/spool/mail/anix
PATH=/usr/local/bin:/usr/bin
SHELL=/bin/zsh
USER=anix
XDG_RUNTIME_DIR=/run/user/1000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXCW3Rym/agent.7775
XAUTHLOCALHOSTNAME=
MANAGERPID=651
INVOCATION_ID=2ac564b163304f5890289fd995afc6eb
JOURNAL_STREAM=8:177329
SYSTEMD_EXEC_PID=7851
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/app.slice/thunar.service/memory.pressure
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
DISPLAY=:0.0
DESKTOP_STARTUP_ID=Thunar/emacs/7851-4-flow_TIME29149190

It seems to be an issue caused by not passing the envs to the program starting from an xfce desktop.
Appreciate it if some seasoned users could give me any help on this issue. THX.

Last edited by anxz (2023-09-15 08:47:38)

Offline

#12 2023-09-15 13:54:48

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

It would seem that you log into an interactive zsh and from there run startxfce4 or a similar script, /etc/xdg/xfce4/xinitrc and your zshrc would both be relevant.
Yet, something seems to clear the environment for the problematic context, not even "DESKTOP_SESSION" is there.

Let's see what xfce4-session and xfdesktop still got

tr '\0' '\n' < /proc/$(pidof xfce4-session)/environ
tr '\0' '\n' < /proc/$(pidof xfdesktop)/environ

Offline

#13 2023-09-16 01:33:42

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

xfce-session:

$ tr '\0' '\n' < /proc/708/environ                   

SHELL=/bin/zsh
LSCOLORS=Gxfxcxdxbxegedabagacad
XDG_CONFIG_DIRS=/etc/xdg
LESS=-R
XDG_MENU_PREFIX=xfce-
GLFW_IM_MODULE=ibus
GTK_IM_MODULE=fcitx
HISTSIZE=10000
CREDENTIALS_DIRECTORY=/run/credentials/getty@tty1.service
OS=Arch Linux,visit www.archlinux.org for more information.
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
XMODIFIERS=@im=fcitx
DESKTOP_SESSION=xfce
EDITOR=vim
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/anix
LOGNAME=anix
XDG_SESSION_TYPE=tty
SYSTEMD_EXEC_PID=533
WINDOWPATH=1
MOTD_SHOWN=pam
HOME=/home/anix
LANG=en_US.UTF-8
HISTFILE=/home/anix/.zhistory
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
XDG_CURRENT_DESKTOP=XFCE
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/system-getty.slice/getty@tty1.service/memory.pressure
INVOCATION_ID=50a546de1cf84ed08b4d36fb8f5cfb42
SAVEHIST=10000
SDL_IM_MODULE=fcitx
XDG_SESSION_CLASS=user
TERM=linux
ZSH=/home/anix/.oh-my-zsh
USER=anix
DISPLAY=:0
SHLVL=1
PAGER=less
QT_IM_MODULE=fcitx
XDG_VTNR=1
XDG_SESSION_ID=1
PYTHONDOCS=/usr/share/doc/python/html/
LC_CTYPE=zh_CN.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org 
GTK3_MODULES=xapp-gtk3-module
XDG_DATA_DIRS=/usr/local/share:/usr/share
ZLSCOLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/anix
OLDPWD=/home/anix

xfdesktop:

$tr '\0' '\n' < /proc/809/environ

SHELL=/bin/zsh
LSCOLORS=Gxfxcxdxbxegedabagacad
XDG_CONFIG_DIRS=/etc/xdg
LESS=-R
XDG_MENU_PREFIX=xfce-
GLFW_IM_MODULE=ibus
GTK_IM_MODULE=fcitx
HISTSIZE=10000
CREDENTIALS_DIRECTORY=/run/credentials/getty@tty1.service
OS=Arch Linux,visit www.archlinux.org for more information.
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
XMODIFIERS=@im=fcitx
DESKTOP_SESSION=xfce
EDITOR=vim
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/anix
LOGNAME=anix
XDG_SESSION_TYPE=tty
SYSTEMD_EXEC_PID=533
WINDOWPATH=1
MOTD_SHOWN=pam
HOME=/home/anix
LANG=en_US.UTF-8
HISTFILE=/home/anix/.zhistory
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
XDG_CURRENT_DESKTOP=XFCE
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/system-getty.slice/getty@tty1.service/memory.pressure
INVOCATION_ID=50a546de1cf84ed08b4d36fb8f5cfb42
SAVEHIST=10000
SDL_IM_MODULE=fcitx
XDG_SESSION_CLASS=user
TERM=linux
ZSH=/home/anix/.oh-my-zsh
USER=anix
DISPLAY=:0
SHLVL=1
PAGER=less
QT_IM_MODULE=fcitx
XDG_VTNR=1
XDG_SESSION_ID=1
PYTHONDOCS=/usr/share/doc/python/html/
LC_CTYPE=zh_CN.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org 
GTK3_MODULES=xapp-gtk3-module
XDG_DATA_DIRS=/usr/local/share:/usr/share
ZLSCOLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/anix
OLDPWD=/home/anix
SESSION_MANAGER=local/flow:@/tmp/.ICE-unix/708,unix/flow:/tmp/.ICE-unix/708
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXuD0Vjf/agent.761
SSH_AGENT_PID=762

Offline

#14 2023-09-16 06:26:33

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

So both have the environment nicely in place, it's whatever you actually run when clicking an icon there.
Did you downgrade the other suspected packages to figure it was really that update that broke stuff?

What actually /is/ "launch.desktop" from "launched by clicking launch.desktop"?

Offline

#15 2023-09-17 07:48:34

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Definition:
Launch.desktop : an iconified shortcut created by the Xfce desktop. I can right-click the Xfce4 desktop, and choose "create launcher...", then input the name, command, icon, etc, to create a launch.desktop.

Launched by clicking the launch.desktop: start the specific program (eg. emacs, chrome-bin, etc) by clicking (or double-clicking, depending on configuration) the iconified shortcut.

It seems all programs starting from the desktop, including thunar(pcmanfm), would not read the proper variables in their proc/environ.
While programs starting from running the command in a console(terminal) could read the proper variables in the proc/environ.
Ref. to the 11# of this thread.

I don't have sufficient and profound knowledge about the arch system, it's a basic judgment from logic.

Thank you.

Offline

#16 2023-09-17 08:01:41

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Hi ,I just made another update and then rebooted the system, now everything is back to normal.
I need to input the password in gnome-keyring when starting chrome from the desktop.
And the fcitx works in emacs and WPS.
Though weird, it's back to normal. 
If it's not worth investigating the nuance, entropy, and tricky parts of this roll-releasing system, I'll close this topic.
Thank you for all your answers, really appreciate your knowledge, and well understanding of this system, Seth.
Thank you.

Here is what I've done:

[2023-09-17T15:37:00+0800] [ALPM] upgraded glslang (12.3.1-2 -> 13.0.0-1)
[2023-09-17T15:37:00+0800] [ALPM] upgraded libgirepository (1.78.0-1 -> 1.78.1-1)
[2023-09-17T15:37:00+0800] [ALPM] upgraded gobject-introspection-runtime (1.78.0-1 -> 1.78.1-1)
[2023-09-17T15:37:01+0800] [ALPM] upgraded json-glib (1.6.6-2 -> 1.8.0-1)
[2023-09-17T15:37:01+0800] [ALPM] upgraded google-chrome (117.0.5938.62-1 -> 117.0.5938.88-1)
[2023-09-17T15:37:02+0800] [ALPM] upgraded groff (1.23.0-4 -> 1.23.0-5)
[2023-09-17T15:37:02+0800] [ALPM] upgraded shaderc (2023.4-1 -> 2023.4-2)
[2023-09-17T15:37:02+0800] [ALPM] upgraded libplacebo (5.264.1-2 -> 5.264.1-3)
[2023-09-17T15:37:03+0800] [ALPM] upgraded microsoft-edge-stable-bin (116.0.1938.81-1 -> 117.0.2045.31-1)
[2023-09-17T15:37:03+0800] [ALPM] upgraded python-contourpy (1.1.0-1 -> 1.1.1-1)
[2023-09-17T15:37:04+0800] [ALPM] upgraded python-matplotlib (3.7.2-1 -> 3.7.3-1)
[2023-09-17T15:37:04+0800] [ALPM] upgraded suitesparse (7.1.0-2 -> 7.2.0-2)
[2023-09-17T15:37:04+0800] [ALPM] upgraded tree-sitter (0.20.10-1 -> 0.20.10-2)
[2023-09-17T15:37:04+0800] [ALPM] transaction completed
[2023-09-17T15:37:04+0800] [ALPM] running '30-systemd-update.hook'...
[2023-09-17T15:37:04+0800] [ALPM] running 'gtk-update-icon-cache.hook'...
[2023-09-17T15:37:04+0800] [ALPM] running 'texinfo-install.hook'...
[2023-09-17T15:37:05+0800] [ALPM] running 'update-desktop-database.hook'...
[2023-09-17T15:37:08+0800] [PACMAN] Running 'pacman -S -y --config /etc/pacman.conf --'
[2023-09-17T15:37:08+0800] [PACMAN] synchronizing package lists

Offline

#17 2023-09-17 09:59:55

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

create a launch.desktop

Probably post that file - your update list doesn't match anything in the OP, so it's more likely been the reboot and you might be facing some race condition.

Offline

#18 2023-09-20 01:44:17

anxz
Member
Registered: 2023-09-14
Posts: 15

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

I'd rebooted many times before the prior upgrade, but the problem remained.
Here is the file:

 $cat Emacs.desktop 
[Desktop Entry]
Version=1.0
Type=Application
Name=Emacs
Comment=Edit text
Exec=emacs %F
Icon=emacs
Path=
Terminal=false
StartupNotify=true
$cat WPS\ 2019.desktop 
[Desktop Entry]
Version=1.0
Type=Application
Name=WPS 2019
Comment=Use WPS Writer to office work.
Exec=/usr/bin/wps %F
Icon=wps-office2019-kprometheus
Path=
Terminal=false
StartupNotify=false

Offline

#19 2023-09-20 06:38:41

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: [SOLVED] Emacs, WPS launched by xfce4 desktop can't activate FCITX5

Looks unsuspicious.
If this flares up again, "pkill xfdesktop; strace -tt -f -o /tmp/xfdesktop.strace xfdesktop" to strace it and (hopefully) see what's involved when clicking the launch icon.
The only thing that looks even maybe remotely suspicious in your updates is gobject-introspection-runtime, but o/c nothhing there correlates w/ the updates in the OP.

Offline

Board footer

Powered by FluxBB