[PC-BSD Dev] pcbsd, pcdm locale and language settings

Ken Moore ken at pcbsd.org
Mon Nov 18 06:18:05 PST 2013


On 11/17/13 15:32, Joe Maloney wrote:
> I've been working off and on with a user who is french who has been 
> testing my gnome3 packages for some time.  I was able in the past to 
> resolve his language settings not sticking with gdm3 by having the 
> freebsd gnome team patch accountsservice which you guys will probably 
> necessarily need to use i wouldn't think as it's more of a gdm3 
> specific requirement.  However I was trying to look into how I could 
> solve this for a couple of reasons.  I find this to be a very 
> interesting problem.  The second reason would be so that nothing holds 
> back PCDM from going into 10 for sure if I can be of any help.  :)
>
> I was chatting with the freebsd gnome team today about how gdm2 might 
> set locales etc or possible workarounds which I also read about in the 
> FreeBSD handbook.  One was modifying /etc/profile systemwide and 
> ~/profile for each user.  These solutions work for both gdm2, and 
> gdm3.  Here are some examples I was given that also worked for me.
>
> /etc/profile http://pastebin.com/VYVwymzm
> ~/.profile http://pastebin.com/TG2wZeNJ
>
> With these enabled gdm2 will also select that language shown in the 
> profile as the default.  After logging into xfce it respects the 
> change as well.  So that would be one way.  However if I start xfce 
> through PCDM it does not respect the change.  Runnning xfce standalone 
> does also not respect the change.  Which leads me to believe gdm is 
> also applying a change in some other file or just on the fly to 
> desktops such as xfce.  So I do think the answer might be finding out 
> how gdm 2 is doing it.  However I'm guessing it must be done on the 
> fly as switching from GDM back to PCDM everything goes back to english 
> regardless of what I set profile and .profile to contain.
>
> I can see after further research that the problem is obviously much 
> bigger than PCBSD.  Going to the FreeBSD website and selecting french 
> works ok.  But the minute I click download I get an english page, and 
> an iso that starts installing in english with no clear way that I can 
> see to set the language at the beginning of the install.  So I would 
> say that PCBSD is ahead in this regard as the install process can be 
> viewed in many languages.  Truthfully I never realized much of this 
> until now.
>
> However I've been looking further and I can see that there are ways to 
> set locale settings in even places such as rc.conf to control console 
> behavior.  So perhaps if there  were man pages for every language in 
> the base an installer could be written for freebsd as well to automate 
> all of that stuff and just have it available right from the console as 
> well.  So if a user were to type man ping it would display in that 
> language etc out of box.
>
> I will write in more if I can find a fix for PCDM.  I just wanted to 
> relay some of this conversation I had with freebsd gnome earlier in 
> case any of it would provide any insight into fixing the problem.
>
> Joe Maloney
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/dev

Thanks for the info!
I looked through the "profile" files that you linked to and it looks 
like the only difference is the "LC_ALL" environment variable. PCDM 
already formats/sets the LANG environment variable (default: 
en_US.UTF-8), but we did find/fix some localization bugs in the source 
within the last couple weeks, so perhaps that will fix the issues for 
you. I also just added the LC_ALL environment variable to PCDM a moment 
ago[1], so between these changes PCDM should be matching exactly what 
you reported that GDM was doing.

The only difference is that I do not have PCDM running the "~/.profile" 
file when starting up a user session at the moment. This is because of 
the concern that setting the locale in the login manager will not get 
propagated to the user session appropriately if there is a "default" 
profile setup for users on the system. I think the ".profile" file is 
important if you are doing a remote/CLI login on the system, so perhaps 
I should setup PCDM to auto-modify the LANG/LC_ALL variables in that 
user's file when you login. My only concern with this is that I will be 
modifying a user-preference file (which I am very hesitant to do - since 
I would hate to ruin someone's specially configured files).

[1] 
https://github.com/pcbsd/pcbsd/commit/269e8eea83bda065804e5f86353be1d62726e638

-- 
~~ Ken Moore ~~
PC-BSD/iXsystems

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pcbsd.org/pipermail/dev/attachments/20131118/0e1af2a6/attachment.html>


More information about the Dev mailing list