How To Use Linux ~ 04 Instalilng Software

This is the fourth in a series of posts on using Ubuntu Linux specifically written for that select group of people who are smart but non-geek computer users who are using Linux because they are. Just are.

How to Install and Remove Software

There are a lot of ways to install software, and total geeks can make this really hard on themselves. You may not know this, but a software application usually needs to know how to exist on a wide range of systems and hardware configurations. Even within a given Operating System (OS), there are things the software has to do to compensate for a lot of potential variation. So, inside the software it may be like this:

Command: Do something.
Response:
OK, if I’m on hardware configuration A, do it this way.
OK, if I’m on hardware configuration B, do it this way.
OK, if I’m on hardware configuration C, do it this way.

OK, if I’m on hardware configuration Z, do it this way.

However, if you want, you can (in theory) “make” software from its original computer code (software is computer code transformed into a “executable” or “binary” file) in such a way that it does not have to do this. You cam “compile” the software to work specifically on your hardware and with exact other software you use. So instead of the above, you get this:

Command: Do something.
Response: Done.

Not that you will ever do that, but it is kind of cool to consider the idea of compiling every piece of software on your computer to use, and assume the existence of, your specific hardware configuration. Well, there are people who think that is cool. While you are at it you can eliminate all those menu options you need to keep resetting (like what font you use, or how zoomed in something is) to just the way you like it.

But that is a lot of work. What you really want to do is to click a box and have the software installed automatically. And that, of course, is how it will work in Linux for you.

Open the System | Administration | Synaptic Package Manger thingie. (On your configuration you might have the “Administration” menu on top.)

You will need to enter your password because the system assumes you are about to mess with it, and you better be you. Enter your password.

On the current version of the package manager, there are two ways to “search” .. one is visible as a search box on the top of the screen. Ignore this.

Hit the “search” button and a search window comes up.

Enter something. Try “spreadsheet.” And hit OK or Enter.

Now there will be a search in the Distro’s repository for software that is listed there with the word “spreadsheet” in the name or description.

Now you can use the search box if you want. Search for “gnumeric” (that’s the name of an excellent spreadsheet) … the package manager will now narrow down the choices to those with “gnumeric” in the name or description.

Notice the little reddish round thing next to some of the software. That is the Ubuntu logo and is Ubuntu’s way of telling you that it likes this choice, that it is a primo choice, one that Ubuntu likes or trusts for some reason. This is often a clue that you want this particular choice.

If Gnumeric is not already installed, go ahead and install it. You’ll notice that there are several different items called “gnumeric.” Which one do you chose? Well, use your head. “doc” is obviously documentation. “common” might be good, “common” is a nice, safe sounding word. The one that says “gnumeric” and nothing else is a very likly choice.

Usually, the name of the software you are looking for by itself is the best choice. “Common” is a package designed to include all the “common” (to different versions) parts and that can be a good choice. Often, by reading the description you can figure out which choice to install. Usually, though, the choice with only the name of the software by itself is the one you want.

In any event, if you pick any one of these choices, pick “mark for installation” and there will be a window telling you what is actually going to be installed. Quite often, when there are several possible choices, and you pick one, the “things to be installed” thingie will include many of the other choices you were trying to pick among.

Go ahead and set up Gnumeric for installation. If it is already installed, maybe pick a related package like the one for “plugins” … don’t worry if you need the plug ins or not, just install it.

Now go back and clear the quick search box and hit enter to get back to the spreadsheet list. Scroll up and down and look at the list. Look at all those files that start with “lib.” You will almost never pick “lib” files (which are “library” files) as your software to install, but often they will be installed for you.

You’ll see some entries for “python” this and “python” that. Python is a computer programming language named after Monty Python that is used for a lot of purposes. Python is also a good way to interface with a spreadsheet if you are a total geek.

I just noticed that under spreadsheets is an item called “symphony” as in Lotus Symphony, and old time package produced by IBM. Apparently it is gone open source. I’m not recommending that you install it, but I sure am. Why? To play with it. I’ll let you know how that goes.

If you have not marked anything yet, go ahead and do so. A safe benign thing to install might be a “calculator” (if you don’t want to mess with spreadsheets). Use the search button to find calculators. (The button, not the quick search.) Click on a couple, read the descriptions, scroll around, pick one, select it for installation.

I decided to install “Speedcrunch.”

Notice that if you chose a few items to install, and poke around with the search function, and so on, the package manager remembers your choices. Eventually you have enough looking around so you pick Apply” (and then Apply again) and the software will now install, usually with no required interaction by you, in the background. Later, you’ll notice that it is all installed and you never had to reboot or mess around with a lot of dialog boxes.

What I just showed you is the hard way, but the best way, to install software. There is an easier way that you can use as well, easier mainly because all those different choices are not given to you. Only the approved “liked” by Ubuntu version. To get to this, close the synaptic package manager and find the “Add/Remove Applications” choice in your menu system. The software choices are divided into categories similar to the Ubuntu Gnome menu choices. Feel free to browse around and pick some stuff and install it.

By the way, when you are looking around at the software, you’ll notice a lot of it starts with the letter “K” in a way that is obviously rather forced. Spelling “Contact” with a “K” (to get “Kontact”) makes sense for a program that handles contact lists, but an app that puts a ruler in your screen might be named “Kruler” … that’s a bit more contrived. These are mostly applications designed to work under KDE which is a different “desktop” than Gnome. These applications will, of course, run under Gnome so you can certainly install them.

How to remove software: Make like you are installing it, to find the checked box indicating that the software is already installed. Then un check the box and then pick “apply.”

For a list of all the posts in this series, CLICK HERE.

~~~

Comments

  1. #1 Bryan
    December 25, 2009

    Greg

    If you delete posts in the IQ thread I will file a formal complaint with whoever owns the science blog website.

    Be the bigger man here.

    I have everything saved.

  2. #2 b
    December 25, 2009

    This is intellectual dishonesty in the extreme.

    You really need to think about your next step here.

  3. #3 Greg Laden
    December 25, 2009

    Bryan, I have not deleted any of your posts. I have closed commentary on that thread, and I’ve explained why. This is my blog and I can do that. I would appreciate if if you would not hijack other threads for your purposes.

    Here is the email address to lodge any complaints:

    editorial@scienceblogs.com

  4. #4 AcademicLurker
    December 25, 2009

    The Synaptic package is one of my favorite things about Ubuntu.

    I’m not particularly interested in operating systems for their own sake, but for my work I often need to use software that only runs on Linux/Unix.

    Prior to switching to Ubuntu, installations followed a dreary pattern:

    After deciphering some cryptic shell script and changing the lines that needed changing for my machine, the installation would crash and tell me that it couldn’t locate the WhizBang library. Looking around, I would realize that the WhizBang library isn’t on my machine, so I would google search, find it and download it. When installing the WhizBang library, the install would crash and say that it couldn’t locate the NeatoKeen scripting language. Realizing I didn’t have that either, I would download it, but during installation it would complain that it couldn’t locate the…

    Every support application seemed to require 1 or 2 others, and the whole process of finding and installing them all would take hours or days.

    With Synaptic, I click the box that says “Find and install dependencies?” and that’s it. From hours/days to minutes.

    Awesome.

  5. #5 Mike Haubrich, FCD
    December 25, 2009

    Ubuntu release 9.10 Karmic uses the Ubuntu Software Center instead of the Add/Remove. It is more graphically intuitive than Add/Remove Applications.

  6. #6 Cdh
    December 25, 2009

    I think it would be better to go a bit more into detail.
    People who don’t know what you are talking about probably didn’t read the documentation here:
    https://help.ubuntu.com/9.10/index.html
    These people might be interested in what a repository actually is etc.

    What I would add is something like

    0) Libraries
    Software developers don’t want to write every software from scratch. They use libraries. Libraries contain some commonly used parts that different programs can use. There are two ways to handle libraries when compiling a program:
    static linking means that you pack the whole library in the program.
    dynamic linking means that you don’t pack the libraries in your program.
    The latter is most commonly used because libraries can be very big and you don’t want your program to be big. Because the developers use functions of the libraries, they have to be provided by the system. In linux they all are in /usr/lib or /lib.
    On windows they are in windows\system32 or something…

    1) How the package manager works.
    On windows you install software by downloading a .exe and installing it. The programs are either statically linked or dynamically linked and install the libraries they need or tell the user to install the libraries (e.g. .NET2). You may have heard about the “dll hell”. That’s when many programs install many libraries that may even have the same filename and are overwritten by newer or older ones.

    Most Linux distributions have another approach:
    The package manager and repositories.
    The package manager is a programm that downloads software, resolves dependencies, installs eveything and removes it. It also knows exactly what package owns which file. If you can you should always use the package manager.
    How does the package manager do this stuff?
    In linux libraries are often changed. Therefore software that is compiled for one system may not run on another. Luckily there are distributors who take care of compiling and packaging all the software and put them on a download server, the repository For example http://archive.ubuntu.com/
    When you browse it you find that all the software is packaged as .deb packages. Unlike in windows these are nearly only like .zip archives with maybe an post-install script. Installing software means “unzipping” it.
    The package maintainers also put a file on the repositories which holds a complete index of the repository. In this file there is also information about which package needs which other packages.
    Apt-get or Synaptic as a frontend for apt-get can automatically download this index, look at the dependencies, and fully take care of the software installation.

    2) Metapackages
    You may not know which package contains the actual program you want. Therefore most package managing systems use metapackages. These packages do not contain anything but tell the package manager what to install instead.
    For example you may just install “firefox” which does not contain firefox but says “depends: firefox-3.5.6″. The package maintainers will probably always set this depend to the latest version.

    3) GTK and QT
    Just some words on that. Ubuntu uses Gnome as default desktop environment, Kubuntu for example uses KDE. Gnome is built on the GTK libraries and KDE on the QT libraries. Of course you can install both but the problem is: They are pretty big. If you have Gnome and want to install a program that uses qt, for example speedcrunch, the package manager has to download and install qt (of course only when qt is not installed yet). That’s not too much (27 mb) for qt 4.5.3, but if you install a program that uses more KDE components like for example kolourpaint than you need to install the packages “kdelibs kdebase-runtime qimageblitz kdegraphics-libs” And of course everything that these packages need, has to be installed. kdelibs will probably need qt too for example.
    Unlike windows with it’s registry most linux systems don’t suffer from speed decrease when installing much software. The only thing is that when you have a slow internet connection downloading half of KDE can take a lot of time.

  7. #7 John Swindle
    December 25, 2009

    Greg… I see what you mean regarding comment moderation. You have my sympathy.

    To get back on topic, I’ve been using Ubuntu for a few years. But still, I usually learn something when I encounter stuff like this series of yours. Thanks.

    Happy Holiday!

  8. #8 gruebait
    December 26, 2009

    While this is plainly to illustrate the ease (gui-ness) of doing things in Ubuntu, I don’t think it would hurt to mention how easy it is to ‘apt-get install’ an application package.

    Any number of times I have typed a program name that I haven’t yet installed, and gotten the message “The program [something] is currently not installed. You can install it by typing:
    sudo apt-get install [something].”

    Much quicker than mousing around, and not scary at all.

  9. #9 MadScientist
    December 26, 2009

    “Instalilng”? Is that teh g33k?