Wednesday, December 17, 2008

How to add Screensavers in KDE4.1

Installing KDE screensaver

KDE 4 in KUbuntu 8.10 is slightly different from KDE3. This example of installing a screen saver called KCometen will help to expose the various method of how KDE 4 works.

Step 1. Download KCometen41.0.3 from http://www.kde-apps.org/content/show.php/KCometen4?content=87586

Step 2. Compile and build the screen saver binaries.

$ apt-get install build-essential kdebase-workspace-dev libqt4-opengl-dev

$ cd /home/nicholas/sources/kcometen4-1.0.3/CMakeFiles

$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local

-- Found Qt-Version 4.4.3 (using /usr/bin/qmake)

-- Found X11: /usr/lib/libX11.so

-- Found Threads: TRUE

-- Found Automoc4: /usr/bin/automoc4

-- Found Perl: /usr/bin/perl

-- Found KDE 4.1 include dir: /usr/include

-- Found KDE 4.1 library dir: /usr/lib

-- Found KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler

-- Found automoc4: /usr/bin/automoc4

-- Found QtOpenGL: /usr/lib/libQtOpenGL.so

-- Found QtOpenGL includes: /usr/include/qt4/QtOpenGL

-- Found KScreenSaver include: /usr/include/kscreensaver.h

-- Configuring done

-- Generating done

-- Build files have been written to: /home/oscc/sources/kcometen4-1.0.3


$ cd ..

$ make

[100%] Built target kcometen4.kss

make[1]: Leaving directory `/home/oscc/sources/kcometen4-1.0.3'

/usr/bin/cmake -E cmake_progress_start /home/oscc/sources/kcometen4-1.0.3/CMakeFiles 0

$ sudo make install

Step 3. Install the screen saver

/usr/bin/cmake -P cmake_install.cmake

-- Install configuration: "Debugfull"

-- Installing: /usr/local/bin/kcometen4.kss

-- Installing: /usr/local/share/apps/kcometen4/pixmaps/lightmap.png

-- Installing: /usr/local/share/apps/kcometen4/pixmaps/particle.png

-- Installing: /usr/local/share/kde4/services/ScreenSavers/kcometen4.desktop

-- Installing: /usr/local/share/man/man1/kcometen4.kss.1

Step 4. Edit the KDE4 configuration to use recently added screen saver. Follow changes to this by rebuilding the KDE4 system configuration cache.

Create the path for all users by adding your local installation prefix to /etc/kde4rc configuration.

$ sudo vi /etc/kde4rc

[Directories]

prefixes=/usr/local


$ sudo kbuildsycoca4

Step 5. Test and use the newly installed screen saver.

Ensure that the System Settings window is closed until your managed to reach this step.

You can test the screen saver by typing the screensaver name.

$ kcometen4.kss --setup

To apply the screensaver, open KDE System Settings, choose Desktop ->Screen Saver, look for Kcometen4.


No comments:

Blog Archive