Tag Info

Hot answers tagged

2

It's a bad idea if it doesn't work. I think your concern about profile.d not running unless someone logs in is legitimate. Put an init script in /etc/rc.d/init.d (I think this is the correct directory for Red Hat; in Ubuntu it's /etc/init.d) to start your daemon. In this script you can declare/define any variables you need and when you start the daemon ...


1

Environment variables are plenty secure. What the question you linked to is saying is that if the system is compromised, the only security benefit of using environment variables over a configuration file is obscurity. Meaning that if someone has gained root access, they can get to both. Whether using environment variables for secret data is considered ...


1

As Gilles explained in a very comprehensive answer to a similar question on security.stackexchange.com, process environments are only accessible to the user that owns the process (and root of course).


1

To directly answer your question, it's only a bad idea if it doesn't work. So my direct answer is "no", if it doesn't work, "yes" if it works. Did you try it? That is, have you confirmed that profile.d doesn't run on your system if no one logs in? As a suggestion of how to make it work: Edit the rc.local file in the same way, to ensure the settings are ...


1

You know how to set the variable in a shell, but for the record you can write: export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on' and all programs you start from this shell session after that will have the variable set. If you want it to be set for every shell you start afterwards, add that line to ~/.profile as well. In that case it will apply to ...


1

In general linux sets the PATH environment variable by reading the dot files. When you login, /etc/profile is read. After setting default environment variables it reads .shell_profile which is for example .bash_profile. If this dot file does not exist then it tries to read .bash_login and if that doesn't exist either, it will look for .profile. Let's get ...



Only top voted, non community-wiki answers of a minimum length are eligible