Tumbleweed Plasma6 installed in Dutch.
I am using this platform to make translations for bugzilla, and that is all done as root.
I made the installation and configuration of Bugzilla som two months ago on a brandnew Tumbleweed. Bugzilla has a checkconfig utility for its own purposes and that ran perfectly at that time. Note that the bugzilla configuration picks up the language setting from the system. This results in the following: the installation has per default the complete english version, but if you have another laguage version beside, bugzilla decides which one to show based on the language it detects.
That works perfectly as I complete the translation files, I see bugzilla changing to the Dutch interface.
But I need to run (a.o. this makes compilation) the checkconfig again, and it now complains it cannot find the language.
I checked and while my normal user and the system settings are still on nl_NL.utf8, root has LANG=POSIX. So bugzilla chokes on that.
I rummaged in older threads here and found a recommendation to change the variable ROOT_USES_LANG in /etc/sysconfig/language. I set this to nl_NL.utf8, save the file, close root and restart it but no joy, the LANG is now C.UTF8 and that is not a language bugzilla can recognize.
So what is the correct way to change this environment variable for root??
Amazing! Why is that?
Because the files are installed with user root, group www. Installed from tumbleweed repos.
Why do you do that locally? How would your translations end up in the project?
Yes, for usage. But when you want to tinkle with them you of course do that on a copy with a “normal” user. Maybe even one that is specifically created for this task.
I may be a bit old fashioned, but I learned already more then 40 years ago: when no need to do something as root
then don’t.
And of course, using a separate user will make it easy to set any environment variables to your need without chance to muddle with root
s environment.
But, every body to her/his own concept on what security is.
What is “it”? What language? Copy and paste the complete command and its full output as well as the output of
env | grep -E 'LANG|LC_'
Which variable? There were so many words but I still cannot understand what you did, what error you see and at which point.
- Because I can run bugzilla locally and immediately see the results of my work. There aren’t any Dutch remote sites (yet).
- Because the people at bugzilla suggest this in their documentation.
I know, I know. But Tumbleweed is still a “strange” environment for me, as I use Mageia for my daily activities. Tumbleweed was the only distro that carries the latest Bugzilla version.
And past trials of installing something from outside the repos, has brought me problems when the platform updates or upgrades, so I run away from such affairs as far as I can. You can call it what you like, but I like my comfort.
What variable? Good question if I knew. All i see is that the root user has now in its environment variables
LANG=C.UTF8 and I guess that this “C” is not a language bugzilla understands.
I would like to see
LANG=nl_NL.UTF8 for the root user, and BTW that’s what Yast shows me correctly and I find it as Installed languages in /etc/sysconfig/language.
So, you are translating it for private use only? Or am I misunderstanding?
No, once I finish, I will send the nl-folder to the bugzilla people and they will check and decide whether it goes into their tree. Or I get som remarks …
Ah, I get it. I’m just used to doing stuff like this in something like github. And to use a VM to test.
@arvidjaar Sorry, I overlooked your question for the env command,
the result (as indicated below) is:
LANG=C.UTF-8
Sorry, after answering questions on what I do anf how, I still am out in the cold on my original question: how do I set the LANG environment variable for the root user to nl_NL.UTF8
There is no such thing as “environment variable for the root user”. Environment variables are process property, not user property. For interactive sessions you simply set them in startup file supported by the root shell. Assuming it is still default /bin/bash
it would be profile for the login shell and bashrc for the non-login interactive shell. For SUSE you can also set it in ~/.i18n
of the corresponding user.
If you are talking about something else, it depends entirely on how exactly you are starting the process with UID 0.
Where have you found recommendation to do it? If you read /etc/sysconfig/language
(how could you change this file without reading it) you would see
# Value "ctype" means that root uses just LC_CTYPE.
# Value "yes" means that root uses the full settings..
You overwrote ROOT_USES_LANG
with invalid value and in this case /usr/etc/profile.d/lang.sh
indeed falls back to LANG=C.UTF-8
.
That implies /etc/sysconfig/language
has
ROOT_USES_LANG=ctype
which IIRC was default in the past. At least, that is what see here on Tumbleweed where I never changed these settings.
Got around by defining it in a new .profile file (did not exist before).
Tx for your goodwill and explanations.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.