# Environment Variables in login script

**URL:** <https://forums.suse.com/t/environment-variables-in-login-script/24052>\
**Category:** SLED Configure-Administer\
**Created:** [June 10, 2013, 10:18pm UTC](https://forums.suse.com/t/environment-variables-in-login-script/24052 "2013-06-10T22:18:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PatrickOS](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@PatrickOS](https://forums.suse.com/u/PatrickOS)\
**Post date:** [June 10, 2013, 10:18pm UTC](https://forums.suse.com/t/environment-variables-in-login-script/24052/1 "2013-06-10T22:18:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [June 10, 2013, 10:39pm UTC](https://forums.suse.com/t/environment-variables-in-login-script/24052/2 "2013-06-10T22:39:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [June 10, 2013, 10:42pm UTC](https://forums.suse.com/t/environment-variables-in-login-script/24052/3 "2013-06-10T22:42:03Z")

</div>

> [@](#):
>
> 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™ II P360@2.30GHz | GPU Mobility Radeon HD 4200

---

<div class="post-metadata">

**Author:** ![PatrickOS](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@PatrickOS](https://forums.suse.com/u/PatrickOS)\
**Post date:** [June 10, 2013, 10:49pm UTC](https://forums.suse.com/t/environment-variables-in-login-script/24052/4 "2013-06-10T22:49:22Z")

</div>

[QUOTE=ab;13955]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.[/QUOTE]

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.

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [June 10, 2013, 10:57pm UTC](https://forums.suse.com/t/environment-variables-in-login-script/24052/5 "2013-06-10T22:57:13Z")

</div>

You’d likely be better-off asking this in the client for linux forum on  
[forums.novell.com](http://forums.novell.com) I think.

Good luck.

---

<div class="post-metadata">

**Author:** ![PatrickOS](https://avatars.discourse-cdn.com/v4/letter/p/a3d4f5/32.png) [@PatrickOS](https://forums.suse.com/u/PatrickOS)\
**Post date:** [June 10, 2013, 11:21pm UTC](https://forums.suse.com/t/environment-variables-in-login-script/24052/6 "2013-06-10T23:21:14Z")

</div>

Took me a while, but I found the appropriate forum. Thanks
