Web lists-archives.com

Re: The same environment variables everywhere

> On Mon, Feb 27, 2017 at 09:07:19AM +0100, deloptes wrote:
>> Stefan Monnier wrote:
>>>>> I would like to hear some ideas on how to set various environment
>>>>> variables (PATH, MANPATH, EDITOR etc.) in one place that would make them
>>>>> effective everywhere. My "everywhere" means:
>>>>> - X session started through lightdm and ~/.xsession script
>>>>> - Linux console login (bash)
>>>>> - user's systemd services
>>>> Put them into /etc/environment.

For a while I've been trying to set the locale but everytime I install a
package it returns locale not set returning to default C
I used /etc/environment, and no change.
I suspect this may be due to some skipped step on the original
installation as a similar installation on a similar machine does not
have this problem.  I have yet to locate the difference between the two.
I hope this is not perceived as hijacking.

Another possibly related problem I have is that although the language
env settings are for UTF8, non latin UTF8 valide characters if used as a
file name it is stored as ??????????.odt (example) This is a pain in the
posterior to have to rename them with a latin alphabet name and creates
all kinds of mix-up with doubling files.  Not that I want to create
filenames in other languages but downloading an archive of files with
such names makes the set unreadable (like an html set of files), the
local links break.

>>> I haven't re-tried recently, but last time:
>>> - It never worked for me.
>>> - It can't hold user-specific settings.
>>> - It can't *compute* a setting.
>>>         Stefan
>> IMO there is a good reason for so many places where you can put variables.
>> In fact it is not good to put X related variables in a non X session -
>> right?!
> There will be some that want to be different. There will be some that
> want to be the same. The OP's question was about the latter, right?
>> So I do distinguish between  settings for X session and for not X session -
>> at least two places for the variables.
>> Further more there are global and user specific ... etc
> Yes, all of those! But I don't see how that's an answer to the OP's
> legitimate question: how to keep things that belong together in one
> place, instead of repeating it in every bit of config?
> regards
> -- tomás

 "The most violent element in society is ignorance" rEG