Skip to content

sysding: Enhance locale setup with additional variables - #9

Open
Hexalantes wants to merge 3 commits into
OpenIndiana:oifrom
Hexalantes:patch-1
Open

sysding: Enhance locale setup with additional variables#9
Hexalantes wants to merge 3 commits into
OpenIndiana:oifrom
Hexalantes:patch-1

Conversation

@Hexalantes

Copy link
Copy Markdown

Added locale variables for GNU gettext apps

Add locale variables for GUI applications and improve error handling.
@olbohlen

olbohlen commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Hi,

thank you for your contribution.Unfortunately we cannot integrate it that way. Modifying the /etc/profile by blindly appending a line to it, could lead into problems. I do ASSUME that these variables should also go to /etc/default/init - if they are needed at all. It could be that the locale settings for the desktop should go somewhere in the desktop configurations.

Could you please provide information if you have checked for other config options for the desktop? and also if you have tested adding this to /etc/default/init ?

Thanks,

Olaf

@Hexalantes

Hexalantes commented Sep 2, 2026

Copy link
Copy Markdown
Author

Hello,
While LightDM and GNU Gettext apps do read /etc/profile instead of /etc/default/init, at least setting the "LANGUAGE" variable is necessary for desktop localization. When you try to install the os with a different language, it does not set this variable and the desktop stays English aswell. Also /etc/default/init does not support a localization variable named "LANGUAGE", it does not set the locale so. Maybe the other (LC_DATE etc) variables can be not necessary but the "LANGUAGE" is necessary for desktop. Regards,

@Toasterson

Copy link
Copy Markdown
Contributor

Hi

I did an investigation on this. /etc/default/init gets parsed and set correctly by SMF at boot time and set locale up for the whole system. As far as I can tell the parser of /etc/default/init accepts any variable so you can set that in /etc/default/init and lightDM gets the env Variable set. However lightDM does only forward specific variables to the session. So a separate patch to lightDM is required. And then some more quirks to handle details.

Can you change this so we update only LANGUAGE in /etc/default/init ? I can see to produce a patch for our packaged lightDM so the variable lands in the desktop session.

Setting LANGUAGE also influences our native dgettext function. And since LANGUAGE also support fallback PATH style that sounds like the cleanest Variable to set.

@Hexalantes

Copy link
Copy Markdown
Author

I'm gonna check it just now, hopefully in several minutes I will return

@Hexalantes

Copy link
Copy Markdown
Author

I've seen that adding string LANGUAGE=locale_LOCALE:locale (e.g.) to /etc/default/init does not affect desktop locale but exporting the same string to /etc/profile works perfectly.

So if you say just ok, I'm gonna edit for only export LANGUAGE=locale_LOCALE:locale:en to /etc/profile

@olbohlen

olbohlen commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Hi,

as mentioned above, appending to /etc/profile is not safe, would you consider please creating an /etc/profile.d/desktop-locale.sh or similar?

Best Regards,

Olaf

@Toasterson

Copy link
Copy Markdown
Contributor

As mentioned a lightDM patch is needed for LANGUAGE to populate properly. Here the first tries of this. Testing is ongoing.

Draft PRs: OpenIndiana/oi-userland#27527, OpenIndiana/oi-userland#27528, OpenIndiana/oi-userland#27529.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants