I attended our organization’s LUG (Linux User Group) meeting last night. These meetings are always educational to me, and last night was no exception.
A couple of our guru’s (who probably have forgotten more about Linux than I will ever learn) noted it can be very useful at times to do a slight deviation from the nominal compiling technique every one reads about. Of course everyone is familiar with:
./configure make su make install
Note here that one switches to root permissions BEFORE ‘make install’ and then the ‘make install’ is allowed to run, putting the application/libraries in places that typically only root has access. A certain amount of TRUST is needed here for one to do this. Now I normally have the trust when I custom compile, but still, it is a good point.
What they noted was instead, if one is not certain of the source of the tarball to which one is installing, or if one just wants to be cautious and TEST an application first before giving the application root permissions, is one can often instead do as a regular user:
./configure --prefix=/home/username/somedirectory make make install
The above is all done as a regular user. NO root permissions are needed.
Now this means the user called ‘username’ can then run that application (which is probably now located in ‘/home/username/somedirectory/bin’ and test it, without worrying about that application having complete access to one’s PC. That prefix can be better tuned to put the application to the exact location one wants.
A neat thing one can do is then run multiple instances (of different versions) of an application at the same time, to compare features/functionality.
For example in the lug we did a custom compilation of the editor leafpad version 0.8.18 (instead of the stock rpm 0.8.17) and then we ran both versions of leafpad at the same time.
I think this is a good ‘technique’ that every average Linux user should have in their ‘back pocket’ for any suitable occasion.