LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-18-2009, 04:49 AM   #1
permalac
Member
 
Registered: Jul 2007
Location: Barcelona
Posts: 115

Rep: Reputation: 16
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.
 
Old 05-18-2009, 05:54 AM   #2
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 303

Rep: Reputation: 32
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).
 
Old 05-18-2009, 06:14 AM   #3
permalac
Member
 
Registered: Jul 2007
Location: Barcelona
Posts: 115

Original Poster
Rep: Reputation: 16
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?
 
Old 05-18-2009, 06:19 AM   #4
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 303

Rep: Reputation: 32
Yes .. it will be used only for bash.
 
Old 05-18-2009, 06:21 AM   #5
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 303

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

Can we put this under /etc/profile ?
 
Old 05-18-2009, 06:59 AM   #6
permalac
Member
 
Registered: Jul 2007
Location: Barcelona
Posts: 115

Original Poster
Rep: Reputation: 16
Yes, by now is where i've put my line, but I think(not sure) that etc/profile it is only for bash purposes.
 
Old 05-19-2009, 08:50 AM   #7
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 303

Rep: Reputation: 32
/etc/profile is common for all.
Check the booting scripts.
 
Old 05-20-2009, 02:43 AM   #8
permalac
Member
 
Registered: Jul 2007
Location: Barcelona
Posts: 115

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by barunparichha View Post
/etc/profile is common for all.
Check the booting scripts.
Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to export/import users/passwords ? dlugasx Linux - Server 3 02-02-2009 06:33 AM
Export all users to file pearsont74 Linux - General 3 09-13-2006 01:09 PM
How to export $PATH so it stays put? Infernal211283 Linux - Newbie 3 01-22-2006 01:49 AM
Export Users & Groups BuRnInICE Linux - Newbie 3 05-25-2004 12:03 PM
where to put wallpapers so its common to all users.. Astroboy Linux - Newbie 2 03-07-2004 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration