LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Where shall i put an export for all the users? (https://www.linuxquestions.org/questions/linux-server-73/where-shall-i-put-an-export-for-all-the-users-726726/)

permalac 05-18-2009 04:49 AM

Where shall i put an export for all the users?
 
Hello,

i would like to do the following for each user each time it logs in.

export DISPLAY=*:10.0

Some users don't user bash, so I need a different place than bash_profile where to put it.

Shall I put it on /etc/profile or there is another place to put that kind of stuff?

May be /etc/rc.local?


many thanks.

barunparichha 05-18-2009 05:54 AM

You can put in any place, but it should be called after the machine boots up.
I would recommend /etc/bash_profile,
If you are planning to put in some other file named file1. Run this command from some where else (source file1).

permalac 05-18-2009 06:14 AM

correct me if I'm wrong, but bash_profile is executed only if the user goes with bash shell.

if the user has on its /etc/passwd zsh as the default shell it will not execute bash_profile.

Am I correct?

barunparichha 05-18-2009 06:19 AM

Yes .. it will be used only for bash.

barunparichha 05-18-2009 06:21 AM

Please check this:
http://www.linuxfromscratch.org/blfs...s/profile.html

Can we put this under /etc/profile ?

permalac 05-18-2009 06:59 AM

Yes, by now is where i've put my line, but I think(not sure) that etc/profile it is only for bash purposes.

barunparichha 05-19-2009 08:50 AM

/etc/profile is common for all.
Check the booting scripts.

permalac 05-20-2009 02:43 AM

Quote:

Originally Posted by barunparichha (Post 3545789)
/etc/profile is common for all.
Check the booting scripts.

Thanks.


All times are GMT -5. The time now is 05:21 PM.