I need to set 6 variables which are used by several services and applications in Linux. I have so far been using the environment variables, but find it very complicating to modify these variables throughout multiple users. At the same time I wish that all users are able to modify these variables that are used globally.
My solution so far has been to use SQLite instead, but seems to be a bit of a mess when I want to set the variables within a service daemon.
So the question is, is it possible or even realistic to use global environment variables that can be altered by any user or should I consider a database solution such as SQLite?
E.g. if i have a variable IP_RECIPIENT
, this variable has to be accessed and set by all users in the system. If it is altered, all users should be able to read the changes, in other words it has to be global even when altered and not just local.
Also whats the best-practice for using global environment variables within Arch Linux ARM.
/etc/profile
would be enough. They would then be available to all users and they would be free to modify them for their own sessions./etc/profile
to read the variables from another file and make that file world-writeable.