Results 1 to 6 of 6
if a program must be used by all users of a linux system then where i setup this? Must i connect as root and after do the installation? The .bashrc ...
- 10-24-2011 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 24
setup of a program for all users
if a program must be used by all users of a linux system then where i setup this? Must i connect as root and after do the installation? The .bashrc file af each user will be changed automatically?
- 10-24-2011 #2
A program intended to be used by all users needs to be in one of the $PATH locations.
Do an echo $PATH as one of your users to see them.
Only root can copy to non-home bin directories.
If you intend to become root and deploy programs, then I strongly suggest to package (RPM/deb) them first.
This helps a lot maintaining them in the long run.You must always face the curtain with a bow.
- 10-24-2011 #3Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
I agree, package your installation. At the very least, start with writing a script that does your installation for you (including things like creating/modifying user profiles, etc.). You can then use that as a model for when you get into "official" packaging techniques.
- 10-24-2011 #4Just Joined!
- Join Date
- Jun 2010
- Posts
- 24
Therefore, if i copy the path of executable file to path of all user , it would be opened by all?
- 10-24-2011 #5
Any user should have /bin:/usr/bin:/usr/local/bin
A program in any of those locations is available to all users (correct permissions on it are assumed)
Without package control, /usr/local/bin is the least intrusive choice.Last edited by Irithori; 10-24-2011 at 08:03 PM.
You must always face the curtain with a bow.
- 10-24-2011 #6Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
And if you prefer to install your app to some non-standard location (i.e., /opt/myapp), you could use the global profile scripts in /etc/profile.d/ so that all users would get the path. You can put one there for bash-type shells and one for csh-type shells. for example, a bash profile script called /etc/profile.d/myapp.sh might look like:
Code:if [ -d /opt/myapp/bin ]; then echo $PATH|grep -q /opt/myapp/bin && : || export PATH=/opt/myapp/bin:${PATH} fi


Reply With Quote