Gnome per user language encoding configuration using .dmrc file

Sometime you may see different language encoding in X than on your console (tty) prompt. Sometime two different user need two have different language encodings.

~/.dmrc file – Per-user language support

In theory this file should be shared between GDM (Gnome) and KDM (KDE), so users only have to configure things once. This is a standard .ini kind / style configuration file. It has only one section called [Desktop] which has two keys: Session and Language. There are some per user configuration settings that control how GDM behaves. GDM is picky about the file ownership and permissions of the user files it will access, and will ignore files if they are not owned by the user or files that have group/world write permission. Normally GDM will write this file when the user logs in for the first time, and rewrite it if the user chooses to change their default values on a subsequent login.

Setup language encoding in X

Defining LANG variable is not sufficient, you need to setup language encoding using ~/.dmrc file.
cat ~/.dmrc
Output:

[Desktop]
Session=gnome
Language=cs_CZ.UTF-8

Refer to Gnome Display Manager Reference Manual for more information.


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 2 comments so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
2 comments… add one
  • Fabio B Aug 1, 2008 @ 21:18

    You may know that on logon panel there is a “Options” selecion that enable the user to select the language.

    On logon, Ubuntu may show the user default language and ask is the user wants to make the new selection parmanente or use use it solely for the current session.

  • UndiFineD Sep 8, 2010 @ 6:39

    thanks, this was helpful

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum