As a follow-on to a bash
question on setting environment variables, I see:
/etc/profile.d/*.sh
Files with the .sh extension in the /etc/profile.d directory get executed whenever a bash login shell is entered (e.g. when logging in from the console or over ssh), as well as by the DisplayManager when the desktop session loads.
You can for instance create the file /etc/profile.d/myenvvars.sh and set variables like this:
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0
export PATH=$PATH:$JAVA_HOME/bin
such a script as:
#!/bin/sh
export AccessToken=678
export AccessTokenSecret=wxy
export ApiKey=abc
export ApiSecret=123
can be safely added to /etc/profile.d/
so that a powershell script will pick up the variables?