Setting the LANG environment variable for xfce
I am on a multi user Debian Stretch system which has en_US.UTF-8
as default locale, but I want de_DE.UTF-8
for my user. I was able to set it for terminals, by adding export LANG=de_DE.UTF-8
to ~/.bashrc
.
The problem is that my X environment (with XFCE as window manager and lightdm as login manager) still uses the default locale, which isn't a surprise as .bashrc
is just for bash. So I tried setting the variable in various other files:
~/.xinitrc
This file doesn't seem to get executed at all.
~/.config/xfce4/xinitrc
Setting the variable here didn't work either (no observed change in behaviour). Also, if I switch the window manager, I need to set it for the new one again, which isn't very appealing.
~/.xsession
Setting the variable here presumably works, but I would also need to start the window manager here, so I'm hoping to find a better place.
~/.pam_environment
Seems to be ignored on Debian
~/.xsessionrc
Setting environment variables here actually seems to work, but it looks like LANG
is set to en_US.UTF-8
later in the startup process.
~/.i18n
Setting a language here doesn't seem to work.
It seems like all these aren't the right place to set the LANG
variable. Where should I set it, to get the desired result?
debian environment-variables xfce desktop-environment locale
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am on a multi user Debian Stretch system which has en_US.UTF-8
as default locale, but I want de_DE.UTF-8
for my user. I was able to set it for terminals, by adding export LANG=de_DE.UTF-8
to ~/.bashrc
.
The problem is that my X environment (with XFCE as window manager and lightdm as login manager) still uses the default locale, which isn't a surprise as .bashrc
is just for bash. So I tried setting the variable in various other files:
~/.xinitrc
This file doesn't seem to get executed at all.
~/.config/xfce4/xinitrc
Setting the variable here didn't work either (no observed change in behaviour). Also, if I switch the window manager, I need to set it for the new one again, which isn't very appealing.
~/.xsession
Setting the variable here presumably works, but I would also need to start the window manager here, so I'm hoping to find a better place.
~/.pam_environment
Seems to be ignored on Debian
~/.xsessionrc
Setting environment variables here actually seems to work, but it looks like LANG
is set to en_US.UTF-8
later in the startup process.
~/.i18n
Setting a language here doesn't seem to work.
It seems like all these aren't the right place to set the LANG
variable. Where should I set it, to get the desired result?
debian environment-variables xfce desktop-environment locale
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
~/.pam_environment
is read by default on Debian. Did you writeLANG=de_DE.UTF-8
orexport LANG=de_DE.UTF-8
?export
is wrong there, this isn't a shell script, just a list ofVARIABLE=value
lines.
– Gilles
Feb 6 '16 at 21:41
I wroteLANG=de_DE.UTF-8
. I also triedTEST=something
to be sure thatLANG
isn't overwritten somewhere else. However, ITEST
wasn't set on either physical or X terminals.
– Kritzefitz
Feb 7 '16 at 16:36
add a comment |
I am on a multi user Debian Stretch system which has en_US.UTF-8
as default locale, but I want de_DE.UTF-8
for my user. I was able to set it for terminals, by adding export LANG=de_DE.UTF-8
to ~/.bashrc
.
The problem is that my X environment (with XFCE as window manager and lightdm as login manager) still uses the default locale, which isn't a surprise as .bashrc
is just for bash. So I tried setting the variable in various other files:
~/.xinitrc
This file doesn't seem to get executed at all.
~/.config/xfce4/xinitrc
Setting the variable here didn't work either (no observed change in behaviour). Also, if I switch the window manager, I need to set it for the new one again, which isn't very appealing.
~/.xsession
Setting the variable here presumably works, but I would also need to start the window manager here, so I'm hoping to find a better place.
~/.pam_environment
Seems to be ignored on Debian
~/.xsessionrc
Setting environment variables here actually seems to work, but it looks like LANG
is set to en_US.UTF-8
later in the startup process.
~/.i18n
Setting a language here doesn't seem to work.
It seems like all these aren't the right place to set the LANG
variable. Where should I set it, to get the desired result?
debian environment-variables xfce desktop-environment locale
I am on a multi user Debian Stretch system which has en_US.UTF-8
as default locale, but I want de_DE.UTF-8
for my user. I was able to set it for terminals, by adding export LANG=de_DE.UTF-8
to ~/.bashrc
.
The problem is that my X environment (with XFCE as window manager and lightdm as login manager) still uses the default locale, which isn't a surprise as .bashrc
is just for bash. So I tried setting the variable in various other files:
~/.xinitrc
This file doesn't seem to get executed at all.
~/.config/xfce4/xinitrc
Setting the variable here didn't work either (no observed change in behaviour). Also, if I switch the window manager, I need to set it for the new one again, which isn't very appealing.
~/.xsession
Setting the variable here presumably works, but I would also need to start the window manager here, so I'm hoping to find a better place.
~/.pam_environment
Seems to be ignored on Debian
~/.xsessionrc
Setting environment variables here actually seems to work, but it looks like LANG
is set to en_US.UTF-8
later in the startup process.
~/.i18n
Setting a language here doesn't seem to work.
It seems like all these aren't the right place to set the LANG
variable. Where should I set it, to get the desired result?
debian environment-variables xfce desktop-environment locale
debian environment-variables xfce desktop-environment locale
asked Feb 5 '16 at 18:02
KritzefitzKritzefitz
3542719
3542719
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
~/.pam_environment
is read by default on Debian. Did you writeLANG=de_DE.UTF-8
orexport LANG=de_DE.UTF-8
?export
is wrong there, this isn't a shell script, just a list ofVARIABLE=value
lines.
– Gilles
Feb 6 '16 at 21:41
I wroteLANG=de_DE.UTF-8
. I also triedTEST=something
to be sure thatLANG
isn't overwritten somewhere else. However, ITEST
wasn't set on either physical or X terminals.
– Kritzefitz
Feb 7 '16 at 16:36
add a comment |
~/.pam_environment
is read by default on Debian. Did you writeLANG=de_DE.UTF-8
orexport LANG=de_DE.UTF-8
?export
is wrong there, this isn't a shell script, just a list ofVARIABLE=value
lines.
– Gilles
Feb 6 '16 at 21:41
I wroteLANG=de_DE.UTF-8
. I also triedTEST=something
to be sure thatLANG
isn't overwritten somewhere else. However, ITEST
wasn't set on either physical or X terminals.
– Kritzefitz
Feb 7 '16 at 16:36
~/.pam_environment
is read by default on Debian. Did you write LANG=de_DE.UTF-8
or export LANG=de_DE.UTF-8
? export
is wrong there, this isn't a shell script, just a list of VARIABLE=value
lines.– Gilles
Feb 6 '16 at 21:41
~/.pam_environment
is read by default on Debian. Did you write LANG=de_DE.UTF-8
or export LANG=de_DE.UTF-8
? export
is wrong there, this isn't a shell script, just a list of VARIABLE=value
lines.– Gilles
Feb 6 '16 at 21:41
I wrote
LANG=de_DE.UTF-8
. I also tried TEST=something
to be sure that LANG
isn't overwritten somewhere else. However, I TEST
wasn't set on either physical or X terminals.– Kritzefitz
Feb 7 '16 at 16:36
I wrote
LANG=de_DE.UTF-8
. I also tried TEST=something
to be sure that LANG
isn't overwritten somewhere else. However, I TEST
wasn't set on either physical or X terminals.– Kritzefitz
Feb 7 '16 at 16:36
add a comment |
1 Answer
1
active
oldest
votes
I had the same problem that the language is not correctly set by lightdm (see this bug).
Adding the LANG exports to both .bashrc and .xsessionrc did the trick for me. I export to LANG, LANGUAGE and LC_ALL to be sure.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f260189%2fsetting-the-lang-environment-variable-for-xfce%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I had the same problem that the language is not correctly set by lightdm (see this bug).
Adding the LANG exports to both .bashrc and .xsessionrc did the trick for me. I export to LANG, LANGUAGE and LC_ALL to be sure.
add a comment |
I had the same problem that the language is not correctly set by lightdm (see this bug).
Adding the LANG exports to both .bashrc and .xsessionrc did the trick for me. I export to LANG, LANGUAGE and LC_ALL to be sure.
add a comment |
I had the same problem that the language is not correctly set by lightdm (see this bug).
Adding the LANG exports to both .bashrc and .xsessionrc did the trick for me. I export to LANG, LANGUAGE and LC_ALL to be sure.
I had the same problem that the language is not correctly set by lightdm (see this bug).
Adding the LANG exports to both .bashrc and .xsessionrc did the trick for me. I export to LANG, LANGUAGE and LC_ALL to be sure.
edited Jan 19 '18 at 13:00
Pierre.Vriens
99251015
99251015
answered Jan 19 '18 at 10:30
pianoslumpianoslum
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f260189%2fsetting-the-lang-environment-variable-for-xfce%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
~/.pam_environment
is read by default on Debian. Did you writeLANG=de_DE.UTF-8
orexport LANG=de_DE.UTF-8
?export
is wrong there, this isn't a shell script, just a list ofVARIABLE=value
lines.– Gilles
Feb 6 '16 at 21:41
I wrote
LANG=de_DE.UTF-8
. I also triedTEST=something
to be sure thatLANG
isn't overwritten somewhere else. However, ITEST
wasn't set on either physical or X terminals.– Kritzefitz
Feb 7 '16 at 16:36