Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[FIXED] LightDM causes mixture of languages (en/fr)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Sep 08, 2017 7:46 am    Post subject: [FIXED] LightDM causes mixture of languages (en/fr) Reply with quote

Hi again.

I've just noticed some of the interface elements in my Xfce4 desktop are shown in Engligh while others are shown in French. My desktop should be all French. As a matter of fact, my desktop icons say: "Répertoire personnel" (i.e. "Home"), "System de fichiers" (i.e. "Filesystem"). But the trash icon says "Trash" instead of "Corbeille". Also when I click any folder icon or when I select it from the application menu,Thunar shows in English only!

The Whisker menu is all in French, as expected. But Thunar preferences are shown in English. Even weirder, the Action buttons panel plug-in shows French tooltips but when I click it the dialog box is shown in English... Losing my religion here!

What could possibly cause all of this? I'm 100% positive my desktop was all French when I started to configure it. Something must have changed in the middle but I don't really see where I should look first.

Any hint/help is appreciated here.

EDIT: I think I have identified the cause of this issue, hence renamed this topic.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!


Last edited by VinzC on Fri Sep 08, 2017 7:26 pm; edited 2 times in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3676

PostPosted: Fri Sep 08, 2017 8:00 am    Post subject: Reply with quote

Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Sep 08, 2017 9:15 am    Post subject: Reply with quote

charles17 wrote:

I'm not sure this applies to my system because the only spot where I set my (regular) user locale from is LightDM and it's set to fr_BE.utf8. LC_MESSAGES is set nowhere, for instance. Besides, the translations do exist. I'll try setting language globally, i.e. system language to fr_BE.utf8 and see.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3676

PostPosted: Fri Sep 08, 2017 9:36 am    Post subject: Reply with quote

As of Thunar, did you check the latest changes (https://gitweb.gentoo.org/repo/gentoo.git/log/xfce-base/thunar?showmsg=1) and open bugs (https://bugs.gentoo.org/buglist.cgi?quicksearch=xfce-base%2Fthunar)?
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Sep 08, 2017 9:39 am    Post subject: Reply with quote

I've found the guilty one! It's LightDM that doesn't do its job properly!

If I log in from a tty in text mode, set the environment manually to fr_BE.utf8 and then run startxfce4, everything is fine and shown in the correct language. From LightDM I can set the locale to whatever I want, doesn't matter, only partial translations... although *all* of the environment variables are set correctly, checked from xfce4-terminal *after* I logged in, for instance. My guess is that LightDM doesn't set the environment variables in a timely fashion before running the interface elements.

The thing is I have no idea how to fix that!

EDIT: I've also checked all processes running under X, none of them have a LC_\w+ variable set, only LC_COLLATE, as set in my /etc/02locale file:
Code:
#for PS in $(pgrep -u mylogin); do grep -Eao 'LC_\w+=' /proc/$PS/environ; done
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=
LC_COLLATE=

This to me is proof that the locale menu in LightDM is absolutely useless (or at least doesn't do what it suggests)!
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!


Last edited by VinzC on Fri Sep 08, 2017 10:00 am; edited 1 time in total
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8714
Location: ~Brussels - Belgique

PostPosted: Fri Sep 08, 2017 9:56 am    Post subject: Reply with quote

Hi VinzC,

I use slim, no problem with locales (fr_BE and fr_NL) ;)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Sep 08, 2017 10:01 am    Post subject: Reply with quote

xaviermiller wrote:
Hi VinzC,

I use slim, no problem with locales (fr_BE and fr_NL) ;)

You know what? I was about to install it 8) . Thanks, Xavier!
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3676

PostPosted: Fri Sep 08, 2017 10:18 am    Post subject: Reply with quote

VinzC wrote:
This to me is proof that the locale menu in LightDM is absolutely useless (or at least doesn't do what it suggests)!

Please consider sharing your experience and filing a bug on bugs.gentoo.org
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Sep 08, 2017 10:58 am    Post subject: Reply with quote

charles17 wrote:
Please consider sharing your experience and filing a bug on bugs.gentoo.org

Done.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Sep 08, 2017 12:41 pm    Post subject: Reply with quote

xaviermiller wrote:
Hi VinzC,

I use slim, no problem with locales (fr_BE and fr_NL) ;)

VinzC wrote:
You know what? I was about to install it 8) . Thanks, Xavier!

Well, much harder than I thought. Slim prevents XDM from stopping and even locks up my machine and I can do nothing else but restart my laptop. The keyboard is still responsive but the screen no longer reacts, no VT switching, no picture... Total mess. Have to stick with LightDM. *sighs*

I've also tried to force uninitialized language variables in any way that I could think of like this:
Code:
[ -n "LC_CTYPE" ] || export LC_CTYPE=$GDM_LANG
[ -n "$LC_NUMERIC" ] || export LC_NUMERIC=$GDM_LANG
[ -n "$LC_TIME" ] || export LC_TIME=$GDM_LANG
[ -n "$LC_COLLATE" ] || export LC_COLLATE=$GDM_LANG
[ -n "$LC_MONETARY" ] || export LC_MONETARY=$GDM_LANG
[ -n "$LC_MESSAGES" ] || export LC_MESSAGES=$GDM_LANG
[ -n "$LC_PAPER" ] || export LC_PAPER=$GDM_LANG
[ -n "$LC_NAME" ] || export LC_NAME=$GDM_LANG
[ -n "$LC_ADDRESS" ] || export LC_ADDRESS=$GDM_LANG
[ -n "$LC_TELEPHONE" ] || export LC_TELEPHONE=$GDM_LANG
[ -n "$LC_MEASUREMENT" ] || export LC_MEASUREMENT=$GDM_LANG
[ -n "$LC_IDENTIFICATION" ] || export LC_IDENTIFICATION=$GDM_LANG

I've tried:
  • .bashrc — no way
  • .xinitrc — no way
  • editing /etc/xdg/xfce4/xinitrc — no friggin' way!

Nothing worked :evil: .

The *only* thing that works is set the language for the system, i.e. globally... *sighs*

EDIT: St00pidity sometimes prevents you from seeing you are! I forgot the dollar sign before the variables in my tests, so unsurprisingly setting all of my locale variables was doomed and failed miserably. I've now saved this script as /etc/xprofile, as LightDM expects to find it and now I've got the translations I expected!

Case closed.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!


Last edited by VinzC on Fri Sep 08, 2017 7:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Fri Sep 08, 2017 1:49 pm    Post subject: Reply with quote

Your problem may be more with Xfce4 than LightDM. What I do to force Xfce4 to export in it's environment the variables I want, like the locale ones, is to create an exécutable Bash script ~/.xsessionrc with the contain I want. Than I create symbolic links to it
Code:
ln -s ~/.xsessionrc ~/.xprofile
ln -s ~/.xsessionrc ~/.xsession

It appear that one of this script is read during the desktop environment start no matter which distribution it is. An other way for Xfce4 only is to copy the file /etc/xdg/xfce4/xinitrc to ~/.config/xfce4/ and add the stuff you want to it or modify it at your taste. If you put your localisation variables and export them in this file, Xfce4 must recognise them.
_________________
Paul


Last edited by Logicien on Fri Sep 08, 2017 7:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Sep 08, 2017 7:18 pm    Post subject: Reply with quote

Thanks a lot, Paul. After reading your post I also found LightDM uses a few init-like scripts, which I can use to force my environment variables. Amongst these is /etc/xprofile. I tested that aaaaand it worked -- if you correct my stupid mistake in my previous post: I forgot the dollar sign in all the variable tests *facepalm* -> not a surprise it didn't work so far!

Now onto the next problem...
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3676

PostPosted: Sat Sep 09, 2017 6:47 am    Post subject: Reply with quote

VinzC wrote:
... tested that aaaaand it worked -- ...

Good enough to propose it as a solution in bug 630330?
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Sep 09, 2017 9:45 am    Post subject: Reply with quote

charles17 wrote:
Good enough to propose it as a solution in bug 630330?

Done, too ;-) .
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2049
Location: United Kingdom

PostPosted: Sat Sep 09, 2017 9:53 am    Post subject: Reply with quote

Is this by any chance the same as LighDM Bug No. 797249?
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Sep 09, 2017 12:21 pm    Post subject: Reply with quote

Fitzcarraldo wrote:
Is this by any chance the same as LighDM Bug No. 797249?

Might be. Wasn't aware of that one. FTR I noticed the GDM_LANG environment variable by inspecting the environment block from /proc/xxx/environ. And every process launched from lightdm has that variable set.

Meh... this is a pretty old bug!
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum