Skip to content

Commit

Permalink
fix: fcitx5 can not start
Browse files Browse the repository at this point in the history
we must exclude input method related environment variable
or it will cause im launch script launch error

Log:
  • Loading branch information
dengbo11 committed Dec 27, 2023
1 parent f044d13 commit 34190ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion misc/Xsession.d/00deepin-dde-env
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

# export systemd environment to avoid environment be replaced by dde-session
# fix https://github.com/linuxdeepin/developer-center/issues/6225
# the following environment variables need to be excluded, otherwise it will affect the startup of some applications
EXCLUDED_ENV="XDG_VTNR\|XDG_SESSION_ID\|XDG_SEAT\|XDG_SESSION_TYPE\|XMODIFIERS\|GTK_IM_MODULE\|QT_IM_MODULE\|CLUTTER_IM_MODULE\|SDL_IM_MODULE"

eval "$(
busctl --json=short --user get-property org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager Environment |
jq .data\[\] --raw-output |
grep -v "XDG_VTNR\|XDG_SESSION_ID\|XDG_SEAT\|XDG_SESSION_TYPE" | # handle special character in environment
grep -v "$EXCLUDED_ENV" | # handle special character in environment
sed -r 's/\\/\\\\/' |
sed -r 's/'\''/\\'\''/' |
sed -r 's/"/\\"/' |
Expand Down

0 comments on commit 34190ba

Please sign in to comment.