Install KDE applications under Gnome

gnomekde

I try my best not to install KDE applications on Gnome of my Ubuntu, but sometimes I have to install some KDE applications such as Okular. Moreover, sometimes I have to install from their source of their latest release, which I often fail to do.

I wonder how Gnome support KDE applications?

How shall I install an KDE application properly in Gnome?

For example, to install latest Okular from source in Ubuntu Gnome, I follow here:

git clone git://anongit.kde.org/okular
cd okular
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/kde4/install/dir ..
make
make install

Updated: When I reach the command cmake, I find that CMakeLists.txt is in /tmp/okular/, so I specify ../ to cmake:

/tmp/okular/build$ sudo cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/bin

The output is here https://dl.dropboxusercontent.com/u/13029929/new. There is no executable okular in /usr/bin.

I wonder how to solve this problem?

Best Answer

how Gnome support KDE applications?

I don't know if it "supports" them in an active way, but there's probably no reason you can't use them inside GNOME anyway. Many of them should not require KDE to be the running desktop environment, and GNOME won't care.

How shall I install an KDE application properly in Gnome?

With apt, or whatever package management system you usually use: apt-cache search okular. If that doesn't work, try dpkg -S "*okular*".

Moreover, sometimes I have to install from their source of their latest release, which I often fail to do.

Unless you have a particular reason to do this, just use the available ububtu packages. If you are doing it to avoid pulling in a lot of other KDE stuff, that is a bad reason because:

  • It is just disk space, probably not more than a few dozen MB. Or so.

  • You probably won't get around this in the end anyway, as we shall see.

to install latest Okular from source in Ubuntu Gnome, I follow:

Part of those instructions are to first build KDE itself. If you haven't done this, you may have some problems can not be covered by just installing KDE from apt. For example, it may require the source be available, and if there is some particular reason you want this git repo version of okular, it may depend on the git repo version of KDE.

However, you could first at least try by installing the ubuntu packages. If that doesn't work, just remove them and build from source.

I don't know how to specify -DCMAKE_INSTALL_PREFIX

As per the example on the page you linked, that should be the path where you installed the KDE you built. It looks like it has some defaults that include /usr/share/kde4/apps, which would probably exist if you try with the ubuntu packages. The exact file you'd need would be:

   /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake

Which is could be part of a KDE -dev package. dpkg -S FindKDE4Internal.cmake may help, although it failed on the ubuntu install I had access to. Since the explicit recommendation for building okular this way is to have a parallel build of KDE on the system, it may not be in any ubuntu package, in which case you have to build KDE from source first.

Related Question