[CentOS] Setting a different LANG variable for a single GTK application?

Niki Kovacs contact at kikinovak.net
Mon May 15 08:15:27 UTC 2006


I just installed GtkCDLabel, a nifty little app to create CD covers in a matter
of minutes, if not seconds, and which I've been using on a daily basis on
Slackware (previous system).

I've encountered some encoding issues. Whenever my CD text contains french
special characters like é, è, à and ç, the resulting .ps file displays martian
characters instead.

'printenv' shows me that the default LANG variable on my system is fr_FR.UTF-8.
So I tried to start the app from the terminal with:

$ LANG=fr_FR && gtkcdlabel

... and everything worked fine.

The problem is now including this workaround in the corresponding .desktop menu
entry in /usr/share/applications. When I try to replace



Exec='LANG=fr_FR && gtkcdlabel'

... GNOME complains about an error.

My second attempt included an alias in /etc/bashrc, which resulted in a partial
success. Typing 'gtkcdlabel' in gnome-terminal, I get the correct result. But
when the app is launched from the desktop menu, it is unimpressed by the alias.
Which leaves me clueless. Is there any other place where I could define a more
global alias?

Niki Kovacs

More information about the CentOS mailing list