トップページ -> コンピュータ -> Linux で開発環境やツールを整備 -> GNOME での言語の設定
[サイトマップへ], サイト内検索:

GNOME での言語の設定

サイト構成 連絡先,業績など 実践知識 データの扱い コンピュータ 教材 サポートページ

次の設定を行う方法を説明する


GNOME を英語に変えるスクリプト (Automated Script to change the language of GNOME to en_US.UTF.8)


sudo cp /etc/environment /etc/environment.BAK.$$ 
sudo rm -f /tmp/environment.$$ 
echo "PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games\"" > /tmp/environment.$$ 
echo "LANGUAGE=\"en\"" >> /tmp/environment.$$ 
echo "LANG=\"en_US.UTF-8\"" >> /tmp/environment.$$ 
echo "LC_MESSAGES=\"en_US.UTF-8\"" >> /tmp/environment.$$  
echo "LC_CTYPE=\"en_US.UTF-8\"" >> /tmp/environment.$$  
echo "LC_COLLATE=\"en_US.UTF-8\"" >> /tmp/environment.$$  
sudo cp /tmp/environment.$$  /etc/environment

sudo cp /etc/default/locale /etc/default/locale.BAK.$$ 
sudo rm -f /tmp/locale.$$ 
echo "LANG=\"en_US.UTF-8\"" > /tmp/locale.$$ 
echo "LANGUAGE=\"en\"" >> /tmp/locale.$$ 
echo "LC_MESSAGES=\"en_US.UTF-8\"" >> /tmp/locale.$$ 
echo "LC_CTYPE=\"en_US.UTF-8\"" >> /tmp/locale.$$ 
echo "LC_COLLATE=\"en_US.UTF-8\"" >> /tmp/locale.$$ 
sudo cp /tmp/locale.$$  /etc/default/locale 

if [ -f /etc/pam.d/gdm ]; then 
  sudo cp /etc/pam.d/gdm /etc/pam.d/gdm.BAK.$$
  sudo rm -f /tmp/gdm.$$
  fgrep -v pam_env.so /etc/pam.d/gdm > /tmp/gdm.$$
  echo "auth required pam_env.so readenv=1 envfile=/etc/default/locale" >> /tmp/gdm.$$
  sudo cp /tmp/gdm.$$ /etc/pam.d/gdm
fi

if [ -f /etc/pam.d/lightdm ]; then 
  sudo cp /etc/pam.d/lightdm /etc/pam.d/lightdm.BAK.$$
  sudo rm -f /tmp/lightdm.$$
  fgrep -v pam_env.so /etc/pam.d/lightdm > /tmp/lightdm.$$
  echo "auth required pam_env.so readenv=1 envfile=/etc/default/locale" >> /tmp/lightdm.$$
  sudo cp /tmp/lightdm.$$ /etc/pam.d/lightdm
fi

gnome-keyboard-properties

GNOME を日本語に変えるスクリプト (Automated Script to change the language of GNOME to ja_JP.UTF.8)


sudo cp /etc/environment /etc/environment.BAK.$$ 
sudo rm -f /tmp/environment.$$ 
echo "PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games\"" > /tmp/environment.$$ 
echo "LANGUAGE=\"ja_JP:en\"" >> /tmp/environment.$$ 
echo "LANG=\"ja_JP.UTF-8\"" >> /tmp/environment.$$ 
echo "LC_MESSAGES=\"ja_JP.UTF-8\"" >> /tmp/environment.$$  
echo "LC_CTYPE=\"ja_JP.UTF-8\"" >> /tmp/environment.$$  
echo "LC_COLLATE=\"ja_JP.UTF-8\"" >> /tmp/environment.$$  
sudo cp /tmp/environment.$$  /etc/environment

sudo cp /etc/default/locale /etc/default/locale.BAK.$$ 
sudo rm -f /tmp/locale.$$ 
echo "LANG=\"ja_JP.UTF-8\"" > /tmp/locale.$$ 
echo "LANGUAGE=\"ja_JP:en\"" >> /tmp/locale.$$ 
echo "LC_MESSAGES=\"ja_JP.UTF-8\"" >> /tmp/locale.$$ 
echo "LC_CTYPE=\"ja_JP.UTF-8\"" >> /tmp/locale.$$ 
echo "LC_COLLATE=\"ja_JP.UTF-8\"" >> /tmp/locale.$$ 
sudo cp /tmp/locale.$$  /etc/default/locale 

if [ -f /etc/pam.d/gdm ]; then 
  sudo cp /etc/pam.d/gdm /etc/pam.d/gdm.BAK.$$
  sudo rm -f /tmp/gdm.$$
  fgrep -v pam_env.so /etc/pam.d/gdm > /tmp/gdm.$$
  echo "auth required pam_env.so readenv=1 envfile=/etc/default/locale" >> /tmp/gdm.$$
  sudo cp /tmp/gdm.$$ /etc/pam.d/gdm
fi

if [ -f /etc/pam.d/lightdm ]; then 
  sudo cp /etc/pam.d/lightdm /etc/pam.d/lightdm.BAK.$$
  sudo rm -f /tmp/lightdm.$$
  fgrep -v pam_env.so /etc/pam.d/lightdm > /tmp/lightdm.$$
  echo "auth required pam_env.so readenv=1 envfile=/etc/default/locale" >> /tmp/lightdm.$$
  sudo cp /tmp/lightdm.$$ /etc/pam.d/lightdm
fi

gnome-keyboard-properties

GNOME を英語にしたい場合の設定手順


GNOME を日本語にしたい場合の設定手順