Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

16
Become a Fan
7.9

Available as/for:
Description:
KOSD is a simple framework for the KDE Desktop providing an OSD in response to media key presses.

How to install:

Step 1:
If you have an older version of KOSD already installed, remove it completely before proceeding.

Step 2:
To build and install KOSD change to the extracted source directory and type:

mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
make
make install (as root)

Step 3:
Log out and back in to make sure the modules are loaded correctly by KDED (or run kquitapp kded && kded4).

Step 4:
In System Settings go to Shortcuts and Gestures->Global Keyboard Shortcuts. Select KOSD from the components list and reassign your keys as needed.

Step 5:
Go to Workspace Appearance->On-Screen Display to adjust KOSD to your liking.

That's it. Enjoy!

P.S.: Don't like monochrome icons? Then create the file .kde4/share/config/kosd_keysrc. Put the lines

[General]
UseSvg=0

in it and restart the KOSD Keys service.

You can also set the mixer control by adding the line

MixerControl=name

where name is the name of your desired control (e.g. Master, PCM, ...).
Last changelog:

Changelog from 0.8.0 to 0.8.1
* Fixed some power management issues

Changelog from 0.7.1 to 0.8.0
* Added standard methods for battery, brightness and volume, allowing the pixmaps to be kept in memory, which avoids hard disk reads and makes the OSD more responsive

Changelog from 0.7.0 to 0.7.1
* Fixed a possible crash, if no mixer control named "Master" exists

Changelog from 0.6.2 to 0.7.0
* Changed KOSD Keys Service to use ALSA directly instead of relying on KMix

Changelog from 0.6.1 to 0.6.2
* Fixed CMakeLists.txt not to link against libsolidcontrol which is no longer used

Changelog from 0.6.0 to 0.6.1
* Made KOSD Keys Service compatible with KDE SC 4.6

Changelog from 0.5.1 to 0.6.0
* Added support for (Plasma-themed) SVG icons
* Many improvements throughout the code

Changelog from 0.5.0 to 0.5.1
* Fixed the mixer to always use the correct master channel

Changelog from 0.4.2 to 0.5.0
* Split up the monolithic application into a KDED module for the OSD, a KDED module for the key listener, a system settings module and a simple access library allowing any application to use the OSD
* Replaced the old OSD by new, fully Plasma based OSDs. There's now a "standard" OSD similar to the old one and a "compact" OSD similar to the OSDs provided by KMix and Powerdevil


Ratings & Comments

130 Comments

mirkogennari

10 10 the best

masand

Hi, your KOSD is very beauty and I love it, but I do not know how to use it. I use Kubuntu 12.10 and as per default it use Knotify, so in other words, I don't know how to use KOSD instead of Knotify. Thanks and thanks for share your work, masand

mva

Hi there! After upgrading to KDE 4.9.1 I get bug somewhere between ACPI and KOSD: I've enabled "show brightness level" on both "decrease" and "increase" brightness keys, but every time KOSD show brightness it decreases brightness level to 25%. And if I disable "show brightness level" (by removing keys) — ACPI change brigntness level fine. I have no idea, where this 25% came from.

mva

UPDATE: It change Brightness level to value, that it remembers after changing with KOSD's "Increase"/"Decrease". And, it means when I press BrUp or BrDn — I see how ACPI change it, then KOSD's indicator, and after few milliseconds like KOSD restore level, that it remember.

marcel83

Hi This sounds like a bug within KDE's power management. I don't see how KOSD could produce such an error. Try running qdbusviewer (should be installed as part of Qt), select org.kde.Solid.PowerManagement on the left and navigate to org/kde/Solid/PowerManagement/org.kde.Solid.PowerManagement on the right. Click on 'Method: brightness' after changing the brightness with your keys. Does this produce the same error? If so, you should file a bug report for KDE. Best regards.

Murz

I have created the PPA repsitory with kosd deb package for ubuntu maverick 10.10 (kubuntu) users: https://launchpad.net/~murznn/+archive/kde-osd And additionally I do the PPA repo for users with KDE 4.6 version from backports: https://launchpad.net/~murznn/+archive/kde-osd-4.6 Please test it and post bugs if find.

Murz

Can I show KOSD window with some info via dbus command? Or with any cli command? I need to display OSD info on screen about volume, brightness and other values from scripts and can't find any way do do this in KDE.

marcel83

The methods for showing the OSD are exposed via D-Bus. See org.kde.kded -> /modules/kosd.

Murz

Thank's for the hint, I find it! Before I search in org.kde.* but didn't see it. Can you give me some examples how to use it? I find how I can show the text, but svg image don't want to show. For example, I do: $ qdbus org.kde.kded /modules/kosd showSvgOsd /usr/share/icons/hicolor/scalable/apps/wine.svg "" "hello world" 50 And kosd shows only "hello world" and 50% of progress bar, but no icon. How I can show the icon? And can I show only text or image without progress bar? Can I show multiline text?

marcel83

You need to specify the SVG elements you want to show. If you want multiple lines, you can use <br> for a line break. The progress bar is always visible. Here's an example: qdbus org.kde.kded /modules/kosd showSvgOsd icons/battery "(" "Battery" "Fill60" ")" "Hello<br>World" 50

krisko210

hi, i'm getting following error when running make: [ 0%] Built target kosd_automoc [ 11%] Built target kosd [ 11%] Built target kded_kosd_automoc [ 50%] Built target kded_kosd [ 50%] Built target kded_kosd_keys_automoc Linking CXX shared module ../../lib/kded_kosd_keys.so /usr/lib/gcc/i586-suse-linux/4.5/../../../../i586-suse-linux/bin/ld: cannot find -lsolidcontrol collect2: ld returned 1 exit status make[2]: *** [lib/kded_kosd_keys.so] Error 1 make[1]: *** [src/kded_kosd_keys/CMakeFiles/kded_kosd_keys.dir/all] Error 2 make: *** [all] Error 2 Can you please help me? Thanks

marcel83

Thanks for the hint. This should be fixed in 0.6.2.

krisko210

Thank you, it's now working in 0.6.2 Great job

rudi

Any idea whats wrong? rudi@seifer:/usr/src/kosd/build$ cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found. -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found. -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found. -- Found Qt-Version 4.6.3 (using /usr/bin/qmake) -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so;/usr/lib/libXau.so;/usr/lib/libXdmcp.so -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so;/usr/lib/libXau.so;/usr/lib/libXdmcp.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/libX11.so -- Looking for include files CMAKE_HAVE_PTHREAD_H -- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Looking for _POSIX_TIMERS -- Looking for _POSIX_TIMERS - found -- Found Automoc4: /usr/bin/automoc4 -- Found Perl: /usr/bin/perl -- Phonon Version: 4.4.2 -- Found Phonon: /usr/lib/libphonon.so -- Found Phonon Includes: /usr/include/KDE;/usr/include -- Performing Test _OFFT_IS_64BIT -- Performing Test _OFFT_IS_64BIT - Failed -- Performing Test HAVE_FPIE_SUPPORT -- Performing Test HAVE_FPIE_SUPPORT - Success -- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL -- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success -- Performing Test __KDE_HAVE_GCC_VISIBILITY -- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success -- Found KDE 4.4 include dir: /usr/include -- Found KDE 4.4 library dir: /usr/lib -- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler -- Found automoc4: /usr/bin/automoc4 -- Configuring done -- Generating done -- Build files have been written to: /usr/src/kosd/build rudi@seifer:/usr/src/kosd/build$ make Scanning dependencies of target kosd_automoc [ 0%] Built target kosd_automoc Scanning dependencies of target kosd [ 5%] Building CXX object src/kosd/CMakeFiles/kosd.dir/kosd_automoc.o [ 11%] Building CXX object src/kosd/CMakeFiles/kosd.dir/kosd.o Linking CXX shared library ../../lib/libkosd.so [ 11%] Built target kosd Scanning dependencies of target kded_kosd_automoc Generating kosdd.moc [ 11%] Built target kded_kosd_automoc [ 16%] Generating configuration.h, configuration.cpp Scanning dependencies of target kded_kosd [ 22%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/kded_kosd_automoc.o [ 27%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/configuration.o [ 33%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/kosdd.o [ 38%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/osd.o [ 44%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/compactosd.o [ 50%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/standardosd.o /usr/src/kosd/src/kded_kosd/standardosd.cpp: In constructor ‘StandardOsd::StandardOsd()’: /usr/src/kosd/src/kded_kosd/standardosd.cpp:50: error: ‘class Plasma::Label’ has no member named ‘setWordWrap’ make[2]: *** [src/kded_kosd/CMakeFiles/kded_kosd.dir/standardosd.o] Error 1 make[1]: *** [src/kded_kosd/CMakeFiles/kded_kosd.dir/all] Error 2 make: *** [all] Error 2

marcel83

You'll need KDE SC 4.5 for KOSD 0.6.0 and 4.6 for KOSD 0.6.1. You should really upgrade your KDE installation.

Murz

cmake done successfully, but on make I got the error: $ make Scanning dependencies of target kosd_automoc [ 0%] Built target kosd_automoc Scanning dependencies of target kosd [ 5%] Building CXX object src/kosd/CMakeFiles/kosd.dir/kosd_automoc.o [ 11%] Building CXX object src/kosd/CMakeFiles/kosd.dir/kosd.o Linking CXX shared library ../../lib/libkosd.so [ 11%] Built target kosd Scanning dependencies of target kded_kosd_automoc Generating kosdd.moc [ 11%] Built target kded_kosd_automoc [ 16%] Generating configuration.h, configuration.cpp Scanning dependencies of target kded_kosd [ 22%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/kded_kosd_automoc.o [ 27%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/configuration.o [ 33%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/kosdd.o [ 38%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/osd.o [ 44%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/compactosd.o [ 50%] Building CXX object src/kded_kosd/CMakeFiles/kded_kosd.dir/standardosd.o Linking CXX shared module ../../lib/kded_kosd.so [ 50%] Built target kded_kosd Scanning dependencies of target kded_kosd_keys_automoc Generating kosdkeysd.moc [ 50%] Built target kded_kosd_keys_automoc Scanning dependencies of target kded_kosd_keys [ 55%] Building CXX object src/kded_kosd_keys/CMakeFiles/kded_kosd_keys.dir/kded_kosd_keys_automoc.o [ 61%] Building CXX object src/kded_kosd_keys/CMakeFiles/kded_kosd_keys.dir/kosdkeysd.o [ 66%] Building CXX object src/kded_kosd_keys/CMakeFiles/kded_kosd_keys.dir/mixer.o [ 72%] Building CXX object src/kded_kosd_keys/CMakeFiles/kded_kosd_keys.dir/powermanager.o /home/murz/temp/2010-12/kde/kosd/src/kded_kosd_keys/powermanager.cpp:26: fatal error: solid/control/powermanager.h: No such file or directory compilation terminated. make[2]: *** [src/kded_kosd_keys/CMakeFiles/kded_kosd_keys.dir/powermanager.o] Error 1 make[1]: *** [src/kded_kosd_keys/CMakeFiles/kded_kosd_keys.dir/all] Error 2 make: *** [all] Error 2 How I can solve this problem?

marcel83

Try again with KOSD 0.6.1.

joth666

Works here at least :) Thanks, I was hoping it would be updated soon!

Murz

Can I show this OSD notifications via command line? I searching the replacement for knotify that show auto-hide notifications (that don't group in notification history). Can I activate your notifications via some command like notify-send? Which params can I use to customize it?

Murz

Maybe I can communicate with KOSD via dbus?

gcala

Very cool osd!! But have a hard task for you (dunno if already asked): avoid resizing flash videos when in full screen and contemporary pressing volume controls on keyboard (an annoyance in kmix' osd too).

hash87

As far as i can remember there used to be a slider for adjusting size of KOSD in previous versions. In 0.5.1 there is no way to make the OSD bigger or smaller.

aubreybourke

Hi, tried following your install instructions. Got the following: aubrey@L7:~/Downloads/kosd/build> cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at /usr/share/cmake/Modules/FindKDE4.cmake:98 (MESSAGE): ERROR: cmake/modules/FindKDE4Internal.cmake not found in /home/aubrey/.kde4/share/apps;/usr/share/kde4/apps;/etc/kde4/share/apps Call Stack (most recent call first): CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred! Any idea whats wrong?

bohoomil

You don't have kdelibs5-dev and kdebase-workspace-dev installed on your system. Install'em first, and than run cmake and make again.

joth666

Just upgraded to KDE 4.5.0 and KOSD 0.5, and works great as always. Even better really since it's now more integrated than it was before. This is really something that you should consider to move into kdereview for a possible inclusion into kdebase for 4.6 IMO. Not every program would need to be able to react to multimedia keys but two programs I use regularly could benefit from being able to take Kosd for granted (in a full KDE environment at least): namely Amarok and K3B. Possibly more, but those at least have their own OSD code. It would be great if they could just use your lib so the look and position of the OSD would just be inhertited.

Pling
0 Affiliates
Details
license
version 0.8.1
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

Other Utilities:

Gis Weather
RingOV
last update date: 8 years ago

Score 8.0

Splash Screen Manager
zorinos
last update date: 14 years ago

Score 7.4

BashStyle-NG
Chrispy
last update date: 9 years ago

Score 6.1

anymeal
wedesoft
last update date: 6 months ago

Score 5.0

MonA3XN 01
A3XN
last update date: 2 years ago

Score 5.0

SuperCalc (By Keshav bhatt)
keshavnrj
last update date: 10 years ago

Score 5.0



System Tags