Skip to content

Instantly share code, notes, and snippets.

@squeuei
Last active August 14, 2023 02:46
Show Gist options
  • Save squeuei/e5d0460f1de225e894b8dc22bc5b40a5 to your computer and use it in GitHub Desktop.
Save squeuei/e5d0460f1de225e894b8dc22bc5b40a5 to your computer and use it in GitHub Desktop.
Setting Environment Variables on Debian / Xfce / Lightdm

Setting Environment Variables on Debian / Xfce / Lightdm / IM

  1. Set environment variables in .profile
  2. Make a file .bash_profile and include command below.
if [ -f ~/.profile ]; then
  . ~/.profile
fi
  1. Make a file .xsessionrc with the same commands.

  2. DO NOT SET GTK_IM_MODULE, QT_IM_MODULE, XMODIFIES=@im in .profile.

    Otherwise your IM won't start automatically no more. It will prevent the system script that sets these variables automatically from working.

Rererence

EnvironmentVariables - Debian Wiki

Debian / Xfce / Lightdm / IMで環境変数をセットする

  1. .profileに環境変数を設定する
  2. 以下の内容で.bash_profileを作る
if [ -f ~/.profile ]; then
  . ~/.profile
fi
  1. 同じ内容で.xsessionrcを作る

  2. .profile内でGTK_IM_MODULEQT_IM_MODULEXMODIFIERS=@imを設定しない

    これらを手動で設定してしまうとシステムが環境変数を自動設定するスクリプトが動作せず、IMが自動起動しなくなる。

参考リンク

EnvironmentVariables - Debian Wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment