Niki Kovacs
2006-May-15 08:15 UTC
[CentOS] Setting a different LANG variable for a single GTK application?
Hi, 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=gtkcdlabel by 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
Daniel de Kok
2006-May-15 09:07 UTC
[CentOS] Setting a different LANG variable for a single GTK application?
On Mon, 15 May 2006, Niki Kovacs wrote:> Exec='LANG=fr_FR && gtkcdlabel'There probably is a more elegant manner to solve this, but what about: Exec=sh -c 'LANG=fr_FR ; gtkcdlabel' -- Daniel
Paul Heinlein
2006-May-15 14:18 UTC
[CentOS] Setting a different LANG variable for a single GTK application?
On Mon, 15 May 2006, Niki Kovacs wrote:> The problem is now including this workaround in the corresponding > .desktop menu entry in /usr/share/applications. When I try to > replace > > Exec=gtkcdlabel > > by > > Exec='LANG=fr_FR && gtkcdlabel' > > ... GNOME complains about an error.This is what env(1) is intended to address: Exec='/bin/env LANG=fr_FR gtkcdlabel' -- Paul Heinlein <> heinlein at madboa.com <> www.madboa.com