Jump to content

Environment variables


Recommended Posts

Thrall, Ill answer literally ... its not the answer your looking for but it should prove helpful with your next stage :D

 

Where do env var's store...

In memory of course .....

I know that sounds a stupid answer so bear with me.

 

envvars have 'scope'

You can set an envvar for a process and you can declare it private or global. If its global it will be inherited.

 

So if you set it manually in a console and start another console it will inherit the envvar. etc.

 

Setting the globally in /etc is a bit dangerous.

Root has very few envvars installed for good reason.

envvars are VERY powerful... you can alias ls to rm -rf / and delete your whole tree.

 

Therefore be careful where you set them and try and understand their scope and inheritance.

 

They can be set individually for a command interpreter like csh/sh/bash

All of these use files in ~ so it depends on the login shell for the user.

By default mandrake uses bash and these are ~/.bash_profile etc.

 

You should man .bashprofile and see exactly where you want to set them...

 

You can set them in any script

For instance you could had a

xhost + 192.168.10.42

to startx and then your X desktop would inherit this (I think....)

Link to comment
Share on other sites

yea i agree that in /etc variable setting is very dangerous.

i required it cuz i want to define QTDIR, PATH etc for all users on my machine. as i install 3.2.1 on Mandrake 9.1

 

btw can u help me ...

i install QT 3.2.1 & delete Old one, after that KDE failed to run. How to fix it, i search but can't find nething

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...