Monday, September 12, 2016

Installing applications with no repositories in OpenSuse



I just switched form Kubuntu to OpenSuse Leap 42.1 and not being very familiar with the yast/rpm/zeppy Eco-system It took me a bit to set my computer properly. Luckily OpenSuse is very polished and Yast is a great GUI management tool so it didn't take me long to get the hang of the OS.

However I found that a number of applications that I regularly use are not in any OpenSuse repositories. Furthermore, few applications offer OpenSuse repositories or even supply a suitable RPM package. This initially worried me since I don't have a lot of time to fiddle with software installations. I contemplated switching back to Kubuntu as almost everybody provides repositories and packages for Deb/K/Ubuntu. However I persisted a bit and managed to get almost all the applications I need running in OpenSuse, albeit with some compromises.

Following are some solutions:

Using RPM repositories made for another RPM based Linux distribution:

That's supposed to be a big no no. You are not even supposed to use a repository made for a different version of the same distribution you are using. However, I found out that some software developers use a single RPM repository for all RPM based distributions regardless of version.

Google does just that. When you download the Chrome RPM and install it for the first time, it sets it's own RPM repository in your system for updates and it works with all RPM based distributions.

Another example is Insync the developers of a Linux Google Drive client, they don't provide an OpenSuse repository. However in the forums they advised OpenSuse users to use the Fedora repository and it seems to work.

The point here is check with the application developer or the forums before ruling out that option. If you manage to use a repository this would be the best option since the application will be automatically updated.

Applications installed using this method:

Using RPM packages made for other distributions:

Again this is not supposed to be good practice, however in OpenSuse's own Wiki they advise you to search for RPM in one of several RPM indexing sites.

Back to the Insync example, I downloaded the RPM package for Fedora 20 and it installed correctly and works perfectly.

Again, the point is to check with the developer or the forum before ruling out this option.

The downside of the method is that you have to check for updates yourself.

Applications installed using this method:

Using Portable version of the application (if available):

A safe option that works very well is to use a portable or generic version of the application and manually setting the KDE menu entry.

What is a portable application and how does it differ form an RPM or DEB package?

A Linux distribution application files in different places in the file system. When the system's package manager installs an RPM or DEB package, it installs the application's executable files in specific path, configuration files in an other, libraries in third path and so on. All these different locations makes the system easier to maintain and makes the application accessible to all users if it's a multi-user system. The user data and his preferences are stored in the user's home directory.
A portable application has all it's files contained in a single directory and not distributed in different location in the system. It's designed this way so that you can just copy the portable application on a USB flash memory and run it on any compatible system without installing anything.

How can we use portable application in OpenSuse?

Since the application and all it's dependencies are in a single directory, you just download the portable application (sometimes called generic), which will be a compressed archive, and unpack it in a folder on your computer. You can now navigate to that directory with your file manager, find the executable file and double click on it to run the application. All the needed libraries and resources are in that directory so the application will have little problems launching and running smoothly.

Now instead of having to open your file manager and navigating to the application folder every time to launch the application you can setup a launcher in the K menu for fast access and to make it look as a normally installed application

  • First for organizational purposes, dedicate a directory where you will be installing these portable applications. I use ~/opt.
  • Move the  portable app directory to ~/opt directory
  • Right click on the K menu and choose Edit Applications to launch the KDE Menu Editor
  • Choose a sub-menu where you want to add the application launcher and click on New Item
  • In the Command field browse to the application folder and select the executable file that will run the application.
  • Change the icon of the launcher to that of the app. Some portable apps include suitable icons in the archive, if not I download the application logo from the website, place it in the application directory and use that.
Applications installed using this method:

Alien

This last option is a bit convoluted for beginners but once setup probably will work with a large number of packages.
Alien is a Perl script that converts DEB packages to RPM packages that can be installed in OpenSuse.
Alien however is not available in any repository. So you have to download the generic version, make sure to install it's Perl dependencies and then use it to convert DEB packages to RPM packages and then install those on your system :)
If you have some experience with Linux, It's not that difficult to do, promise :)

Hope this helps.

No comments:

Post a Comment