This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE4 Kopete - some nice OSD possible? [SOLVED]

Tags: None
(comma "," separated)
User avatar
KejPi
Registered Member
Posts
119
Karma
0
OS
Hi,

In KDE3 there is a possibility to used xosd with kopete by using "Execute program" field in notification and adding something like that:

echo %s | osd_cat -o 100 -p bottom -A center -f -*-helvetica-*-r-*-*-24-*-*-*-*-*-*-* -O 2 -c gold


This option is no longer working for KDE4. Is there any other possibility to have some OSD in Kopete in KDE4?

Thanks!

Last edited by KejPi on Sun Dec 07, 2008 11:51 am, edited 1 time in total.


KejPi, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You should be able to use KNotifications execute program ability to do this, as Kopete uses the KNotification framework to announce events. Note you may need to write a script to retrieve the details from Kopete to feed to xosd for this to work.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
KejPi
Registered Member
Posts
119
Karma
0
OS
Yes, it should work somehow but I am even not able to run simple script containing following :-(

#! /bin/bash
echo MESSAGE | osd_cat -o 100 -p bottom -A center -f -*-helvetica-*-r-*-*-24-*-*-*-*-*-*-* -O 2 -c gold


KejPi, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Stupid question, but does the command work in Konsole? Otherwise this sounds like something the developer(s) of KNotification would have the answer to, who can probably be found on kde-devel(at)kde.org.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
KejPi
Registered Member
Posts
119
Karma
0
OS
Yes, it works from konsole.


KejPi, proud to be a member of KDE forums since 2008-Oct.
User avatar
dtritscher
Registered Member
Posts
46
Karma
0
This looks like Bug #168968. There is a workaround discribed in the initial report that maybe helpfull.


dtritscher, proud to be a member of KDE forums since 2008-Oct.
User avatar
KejPi
Registered Member
Posts
119
Karma
0
OS
dtritscher wrote:This looks like Bug #168968. There is a workaround discribed in the initial report that maybe helpfull.


Thanks the workaround works :-) I don't understand how anyone can find anything on bugs.kde.org ;-)

Now I have to find how to pass some parameters to this script ;-)


KejPi, proud to be a member of KDE forums since 2008-Oct.
User avatar
dtritscher
Registered Member
Posts
46
Karma
0
KejPi wrote:I don't understand how anyone can find anything on bugs.kde.org ;-)

You have to use the advanced search. The simple search is quite pointless due to the huge mass of bugs. If you know, like in taht case, the exact component, it's quite easy, as you can limit the hits to this component.


dtritscher, proud to be a member of KDE forums since 2008-Oct.
User avatar
KejPi
Registered Member
Posts
119
Karma
0
OS
Knotify "execute script" seems to be buggy but I have found some workaround.
You have to modify the config file by hand and it shoud work.

The easiest way is probably following:

1) In knotify configuration GUI enable execute script and select your script for all events you need (e.g. kopete_osd.sh)
2) Open ~/.kde/share/config/kopete.notifyrc
3) Find line Execute=kopete_osd.sh in events
4) Change it to Execute=kopete_osd.sh %s
5) Edit manually all lines where you want to execute any script with some arguments. You can even use script with path by direct modification od config file.

This is what I am using for kopete OSD notifications:

Code: Select all
~/.kde/share/config/kopete.notifyrc

[Event/kopete_contact_incoming]
Action=Sound|Execute|Taskbar
Execute=/home/kde4tst/bin/kopete_osd.sh %s
KTTS=
Logfile=
Sound=Kopete_Received.ogg


Code: Select all
cat $HOME/bin/kopete_osd.sh

#! /bin/bash
echo $1 | sed -e 's///g' -e 's///g' -e 's///g' -e 's///g'  -e 's/<br.*$//' -e 1q | osd_cat -w -d 7 -p bottom -A right -s 1 -f "-*-trebuchet ms-bold-r-*-*-*-220-*-*-p-*-iso8859-2" -l 1 -o 50 -i 40 -S gray20 -c orange &



KejPi, proud to be a member of KDE forums since 2008-Oct.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell