PDA

View Full Version : Environment Variables in login script



PatrickOS
10-Jun-2013, 20:18
Is it possible to use environment variables in a login script on SLED? I have tried several things and searched the web with no solutions.

ab
10-Jun-2013, 20:39
Yes.

Now I'm going to bet that 'Yes' is not what you were after, so having a
bit more information about what you are trying to do with the login
scripts may help get a better solution. You can do anything in a login
script that you can do in your shell, assuming you and I are calling the
same technologies login scripts (specifically the .profile and .bashrc
files in a user's home directory, or the system-wide equivalents, in my case).

Good luck.

malcolmlewis
10-Jun-2013, 20:42
On Mon 10 Jun 2013 07:24:01 PM CDT, PatrickOS wrote:


Is it possible to use environment variables in a login script on SLED? I
have tried several things and searched the web with no solutions.




Hi
Yes, you can use /etc/profile.d/ to add your own scripts and
then /etc/profile.local for sourcing.

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.3 (x86_64) Kernel 3.7.10-1.11-desktop
up 3 days 3:00, 3 users, load average: 0.30, 0.16, 0.17
CPU AMD Athlon(tm) II P360@2.30GHz | GPU Mobility Radeon HD 4200

PatrickOS
10-Jun-2013, 20:49
Yes.

Now I'm going to bet that 'Yes' is not what you were after, so having a
bit more information about what you are trying to do with the login
scripts may help get a better solution. You can do anything in a login
script that you can do in your shell, assuming you and I are calling the
same technologies login scripts (specifically the .profile and .bashrc
files in a user's home directory, or the system-wide equivalents, in my case).

Good luck.

I am attempting to pull in the users local home directory or $HOME variable to access a bash script that is located there, I should mention I am attempting to launch these from the Novell Client for linux.

ab
10-Jun-2013, 20:57
You'd likely be better-off asking this in the client for linux forum on
forums.novell.com I think.

Good luck.

PatrickOS
10-Jun-2013, 21:21
Took me a while, but I found the appropriate forum. Thanks