Re: Three newbie questions!

From: Philip Dodd (iam_at_fedupwithspam.co.uk)
Date: 08/17/04


Date: 16 Aug 2004 22:19:26 GMT

On 16 Aug 2004 09:55:07 -0700, Steve North wrote:

Hi Steve !

>1.How do I find out what programs (apps?) are installed and what
>version they are?
>
There are rather a lot of them. On a minimalist system, there can be
1000 applications and 500 libraries. Someone who installs everything
from a distribution will probably end up with triple those numbers.

If you're using RPM under the X Window system, that gives a very good
visual indication. You can see the main groups, then the applications
within the groups, then the files & dependancies used by the applications.
Until you get to know the names of applications, it is best to use RPM
or another of the package managers to find out this sort of information.

You can do it manually. The commands: whereis whatis apropos might
be of help. If you have the info sheets or man pages installed, read up
about them. Unfortunately there is no standardisation on parameters to
find the version numbers of applications, which is where RPM beats doing
it manually until you get to know what you're looking for.

>2.I want to update an app to the latest build and I want to do it
>using source files. I don't want to use RPM's or apt get etc. What's
>the procedure?
>
Choose something that's not mission-critical to you to experiment with.
You must appreciate that if you upgrade something manually that RPM
knows about, then RPM will still think that you're on the old version.
It won't automatically realise that you've upgraded. So select
something that you haven't already installed with RPM. Places to look
for ideas are http://www.gnu.org in the software directory, or Sourceforge
http://www.sourceforge.net .

Once you've selected something, you go to the project homepage and
download the sources. You normally find that the source package is
bundled into a file ending with a suffix tar.gz , tgz , or tar.bz2 .

When you've downloaded it, it should be sitting in your home directory.
If you open a console window and type ls -rt you should see it as the
last line of the display. You next need to expand the file. You do
that according to the suffix. If it's .gz or .tgz , you type :
gzip -d <filename> . If it's .bz2 then : bunzip2 <filename> .
After that, another ls -rt should reveal a file of suffix .tar .
You untar the file into a directory using : tar -xvf <filename> .
You can then cd into the package's directory.

Packages are increasingly standardising on what they include, especially
the GNU ones. You normally find a README , an INSTALL , and a doc
subdirectory. Those will tell you how to build it. As you say, it
normally is ./configure , make , make install .

Assuming that it gets through the ./configure and make , you have to do
the make install by logging in as root, and cd'ing to the directory to
do it. Part of the make install will be to install the man and info
pages which tell you how to run it.

If you have installed any libraries, then you must run the following
command as root : ldconfig Then the Linux loader will find them.

>Do I need to uninstall the original app first? - I know about
>./configure, make, make install and so on, I just need to know how to
>install the latest package without causing conflicts and so that it is
>recognised by the operating system and other apps.
>
I recommended to experiment with something that you haven't installed
with RPM, so that there is no conflict. If you did upgrade something
that was originally installed with RPM, then so that RPM knows where it's
at, uninstall the old package with RPM before doing the make install of
the new one. One reason that this is important is if RPM has put the
files into different places than you're going to put the new ones.

Generally, newer versions of applications overwrite older ones. This is
true of files going into the various /bin directories. If you're
installing new library files into a /lib directory, the new one will have
a different version number than the old one. You'll have to run ldconfig
as mentioned above to get the new library picked up, and at a later stage
tidy away the old version. You also need to learn about "soft links" -
ln -s , to be able to work out what's going on in library directories.

Don't pick anything major to experiment with. Updating your compiler
or C library will destroy your system. The simpler and the more trivial
the package you test-compile/install is, the better.

>3.How do I put an icon on the desktop and associate it with an app? I
>use iceWM at the moment.
You need to consult the documentation for that. You can certainly
add new items to the menu of window managers by editing the
parameter files that they read when starting up. Again, consult the
documentation to see where those are.

RPM is an excellent tool and a useful convenience for people who simply
want to enjoy using the applications. For those of us who want to do
more, then we download the sources from the project homepages. You
can only mix the two methods to a certain extent though. If you take
to doing it manually, then the day comes when you go on to building
a complete system, for which the first time you do it you are strongly
advised to follow http://www.linuxfromscratch.org . It takes about
two weeks, or several weekends. It's quicker the more often you do
it though, and eventually you get the time down to 3 hours for bringing
the parts home, assembling the machine and copying on a system ( with
correctly tailored kernel ) from your host machine without ever using
a distribution or RPM ( good products though they certainly are ).

I hope the above answers your questions, and will encourage you to
experiment !

Philip Dodd