OpenSUSE Linux Rants

OpenSUSE Linux Tips, tricks, how-tos, opinions, and news

My Resume  -  My LinkedIn Profile

June 12, 2008

A Unicorn and Gnome

by @ 4:57 pm. Filed under humor

As everyone knows, I am a KDE proponent. This means that articles that make fun of gnome are funny. Check out this real unicorn.

Some of the truest quotes from this article are as follows:

“Enumerate all the features you want your app to have.”
“Cut 90% of them. Because they’re hard to do. But tell everyone that they don’t actually need that feature.”
“Implement 2% of them. Hide the other 8% in gconf. Hide them well.”
“Your interface must not have more than 4 buttons.”

Take a look at How to write a Gnome Application

How many ways can you install an RPM in OpenSUSE Linux?

by @ 7:02 am. Filed under command-line, How-To, SUSE Tips & Tricks

Package management in OpenSUSE in recent years has had its share of challenges. In OpenSUSE 10.1, the package management was an epic trainwreck. Package management in OpenSUSE 10.3 is as good as that was bad. There are various types of speed improvements. Some of them huge. There is some caching of the repository package info. Progress bars so the user knows what’s going on. All sorts of goodness.

But I wanted to see how many ways I could install a package on OpenSUSE 10.3 (and 11.0, for that matter) without any help from any third-party package management tools that don’t come stock on a fresh OpenSUSE install. Like no apt, yum, smart, etc. Just using the package management tools that come on the fresh install, how many ways can one install a package? There’s a method to this madness, too. You never know under what circumstances you’ll have what access to the machine you’re working on, especially if it is remote. One of the mantras of Linux pros is that there is four billion ways to skin a cat. OK, so I made that up. It’s good to know many ways of doing the same thing, though.

Especially if we want to automate something. If we do it one way, maybe it requires human interaction. If we do it a different way, no human interaction is required, and thus, we can automate that process.

OK, without any more excessive yammer, let’s take a look, shall we?

RPM Installation Methods

1. Use YAST – Let’s get the obvious one out of the way. Click on the YAST icon, put in your root password. In the window that appears, select SOFTWARE from the left, and SOFTWARE MANAGEMENT on the right. At some point, the YAST Package Management window appears. Search for the desired package, click ACCEPT. Approve any additional necessary packages. YAST installs everything, and asks if you want to install or remove more packages. Say no, and you’re done.

This is the classic way to install packages in OpenSUSE using YAST. One benefit is that it does a good job of resolving dependencies for you. One possible drawback is that it reauires all kinds of human interaction. So there’s our first way.

2. Use zypper – This is a powerful command-line tool used in OpenSUSE much in the same way we might use something like apt-get. To see all the ways you can use this tool, run zypper –help from a command line:

[2318][root@linux:/]$ zypper --help
        --help, -h              Help.
        --version, -V           Output the version number.
        --quiet, -q             Suppress normal output, print only error messages.
        --verbose, -v           Increase verbosity.
        --terse, -t             Terse output for machine consumption.
        --table-style, -s       Table style (integer).
        --rug-compatible, -r    Turn on rug compatibility.
        --non-interactive, -n   Don't ask anything, use default answers automatically.
        --no-gpg-checks         Ignore GPG check failures and continue.
        --root, -R <dir>        Operate on a different root directory.

        help, ?                 Help
        shell, sh               Accept multiple commands at once
        install, in             Install packages or resolvables
        remove, rm              Remove packages or resolvables
        search, se              Search for packages matching a pattern
        repos, lr               List all defined repositories.
        addrepo, ar             Add a new repository
        removerepo, rr          Remove specified repository
        renamerepo, nr          Rename specified repository
        modifyrepo, mr          Modify specified repository
        refresh, ref            Refresh all repositories
        patch-check, pchk       Check for patches
        patches, pch            List patches
        list-updates, lu        List updates
        xml-updates, xu         List updates and patches in xml format
        update, up              Update installed resolvables with newer versions.
        info, if                Show full information for packages
        patch-info              Show full information for patches
        source-install, si      Install a source package

To install a package from the command line using zypper, you’ll do that this way:

[2321][root@linux:/]$ zypper install bzflag
* Reading repository 'openSUSE-10.3-Updates' cache
* Reading repository 'openSUSE-10.3-OSS-KDE 10.3' cache
* Reading repository 'Jpackage' cache
* Reading repository 'Main Repository (NON-OSS)' cache
* Reading repository 'Eric Lavar - Germany' cache
* Reading repository 'Main Repository (OSS)' cache
* Reading installed packages [100%]

The following NEW package is going to be installed:

Overall download size: 10.8 M. After the operation, additional 15.0 M will be used.
Continue? [yes/no]: yes
Downloading package bzflag-2.0.8-78.x86_64, 10.8 M (15.0 M unpacked)
Downloading: media
* Downloading [100%]
Downloading: bzflag-2.0.8-78.x86_64.rpm
* Downloading [100%]
* Installing: bzflag-2.0.8-78 [100%]

It resolves all dependencies, and installs everything it needs. Great way to do things without so much human interaction. There are even flags that will allow us to omit human interaction entirely (–non-interactive and –no-gpg-checks). Very nice.

3. Use the rpm command – Every once in awhile, there is a package that YAST cannot find in the available repositories. When this happens, I head over to one of three places:, Rpmfind, or In almost every case, I can find an RPM that was built for whatever version of OpenSUSE that I am using on that particular box. I just download the RPM in question, and install it with the rpm command. Many people suggest doing this in the following manner:

[2215][scott@linux:~]$ rpm -Uvh [full path to RPM here]

This is one of the possibly more difficult ways to install an RPM. Not because it’s a difficult command, but because it doesn’t resolve dependencies. If there are dependencies, you get to resolve those babies yourself. It’s possible, but I would definitely prefer a poke in the eye with a sharp stick.

4. 1-Click Install – Tell you what, one of the coolest things that OpenSUSE has come up with thus far is the 1-Click Install. At first, I thought it was an April Fool’s Joke. But realizing it wasn’t April, I decided to give it a try. To see how cool this is, head over to the OpenSUSE Build Service. Search for a package like kopete. Scroll through the results. When you find the one you want to install, click on the “1-Click Install” button off to the right side. You’ll have to verify some things and provide your root password, but other than that, it is virtually hands-off installation of the package. Hands-down easiest way to install packages in OpenSUSE.

5. Install with YAST from custom installation repository – Sometimes, you will have an rpm that you want installed, but cannot find it in YAST. You can download it and try to install it with rpm. The problem is that it has 12 dependencies. What then? Switch distributions to something more sensible? No way, we’ll just take the easy way out. Create our own repository and point YAST to that. This process is very simple.

Install the createrepo package. Then, create a directory to be used as the repository. Dump the RPM in there. Then, run the createrepo command on that directory. For example, make a directory called /my_inst_src. Throw your RPM (as hard as you can) into that folder. Then, create the repository with this command:

[2246][root@linux:/home/scott]$ createrepo /my_inst_src
1/1 - pidgin-2.4.2-5.1.i586.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata

Then, just add that directory as an installation source in YAST=>SOFTWARE=>SOFTWARE REPOSITORIES.

Finally, go into YAST=>SOFTWARE=>SOFTWARE MANAGEMENT and search for the RPM you placed into your new repository. You should be able to find and install it easily. The great part here is that YAST should be able to resolve the package dependencies.

Yes, there are a few steps involved here. However, you can take this concept and apply it to an entire network of desktop or server machines. Pick a repository server on your network and create your own repository on it. Then, export that repo via NFS to the rest of the network. Next, just add that repository to the other machines on the network. The great part is that you only have to add the repository to each of the other machines once. But then, instant access to install that package on any of those boxes. This particular solution has been very helpful for me on several occasions.

6. Install with zypper from custom installation repository – Same thing as the previous method. We download a stand-alone RPM that has many dependencies. So the approach will be similar. Install createrepo, make a repository directory, and put your RPM in there. Use createrepo to build your repository as demonstrated above.

Then, instead of YAST, go ahead and add your new repository using the zypper command, like so:

[2308][root@linux:/home/scott]$ zypper addrepo /my_inst_src "My Installation Source"
* Adding repository 'My Installation Source'
Repository 'My Installation Source' successfully added:
Enabled: Yes
Autorefresh: Yes
URL: dir:///my_inst_src

Make sure it was installed properly, again using zypper:

[2258][root@linux:/home/scott]$ zypper repos
# | Enabled | Refresh | Type   | Alias                                                             | Name
1 | Yes     | Yes     | rpm-md | openSUSE-10.3-Updates                                             | openSUSE-10.3-Updates
2 | Yes     | No      | yast2  | openSUSE-10.3-OSS-KDE 10.3                                        | openSUSE-10.3-OSS-KDE 10.3
3 | No      | Yes     | NONE   |        |
4 | Yes     | Yes     | rpm-md | Jpackage                                                          | Jpackage
5 | Yes     | Yes     | yast2  |      | Main Repository (NON-OSS)
6 | Yes     | Yes     | rpm-md | Eric_Lavar_-_Germany                                              | Eric Lavar - Germany
7 | Yes     | Yes     | rpm-md  | My Installation Source                                            | My Installation Source
8 | Yes     | Yes     | yast2  | | Main Repository (OSS)

There it is, highlighted in red. Rock on, now we can make sure zypper finds our new package, thusly:

[2309][root@linux:/home/scott]$ zypper search pidgin
Refreshing 'My Installation Source'
repomd.xml is unsigned, continue? [yes/no]: yes
* Building repository 'My Installation Source' cache
* Reading installed packages [100%]

S | Repository                                                        | Type    | Name                   | Version    | Arch
  | | package | pidgin                 | 2.1.1-13   | i586
i | | package | pidgin                 | 2.1.1-13   | x86_64
v | My Installation Source                                            | package | pidgin                 | 2.4.2-10.1 | x86_64
  | | package | pidgin-bot-sentry      | 1.1.0-45   | i586
  | | package | pidgin-bot-sentry      | 1.1.0-45   | x86_64
  | | package | pidgin-bot-sentry-lang | 1.1.0-45   | i586
  | | package | pidgin-bot-sentry-lang | 1.1.0-45   | x86_64
  | | package | pidgin-devel           | 2.1.1-13   | i586
  | | package | pidgin-devel           | 2.1.1-13   | x86_64

The one we’re looking for is highlighted in red. Looks like we’re ready to go ahead and install the application:

[2313][root@linux:/home/scott]$ zypper in pidgin

If the package is so brand-new that it has dependencies that are unresolvable, obviously you’ll have problems. But for many common packages, this method works great.

As a side note, you can also set your machines up so that you don’t even need the discs to install packages. Put the DVD ISO on your machine and you can put that into YAST as an installation source. Disable the source that uses the local optical drive. Then, it will pull packages from the ISO.

Even better, you can put that DVD ISO on a server on your network. Mount it on that server, and export the mount point via NFS to the rest of the network. Go to each machine in the network. Disable the source that uses the local optical drive. Add the NFS share from the server as an installation source on each box. Then, the machines on the network will pull packages from the NFS share.


There are at least a handful of ways to get installed what you need installed on your box. Depending on whether you are a home user with one computer or a Linux system administrator with 100 servers, or anything in between, you’re bound to use one or more of these methods. And these methods work on both OpenSUSE 10.3 and 11.0. Have a lot of fun…

OpenSUSE Linux Rants
Official OpenSUSE Linux Site

internal links:


SUSE Resources

search blog:


June 2008
« May   Jul »

59 queries. 1.044 seconds