Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
1  
Why are you not using your distribution's package manager to install them? You need KDE dependencies. –  edvinas.me Apr 5 at 12:47
1  
Because I need a version higher than the one default in my package manager. –  Tim Apr 5 at 13:10
add comment

1 Answer 1

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.

share|improve this answer
    
Cmake is looking for a FindKDE4Internal module in that directory (that it will use to find the libs and includes). It probably is in some kde*-dev package. –  Leiaz Apr 5 at 14:11
    
@Leiaz Thx for catching this. I should have mentioned the dev packages, also. I've edited the last few paragraphs to reflect this. –  goldilocks Apr 5 at 14:22
    
Thanks! How shall specify -DCMAKE_INSTALL_PREFIX in cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/kde4/install/dir ..? –  Tim Apr 5 at 15:46
    
Use an appropriate value for /path/to/your/kde4/install/dir. –  goldilocks Apr 5 at 15:47
1  
@Tim cmake doesn't compile anything. cmake generate the Makefiles, you then have to run make (and make install to copy in the install dir). It seems cmake completed and the missing libraries are optional (you may still want to install some of them). –  Leiaz Apr 5 at 17:22
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.