Fedora Linux Support Community & Resources Center
Old 17th April 2012, 12:06 PM
PFeso1 Offline
Registered User
Join Date: Apr 2012
Location: wertd
Posts: 4
Spawn notifications with your program similar to KTorrent or ABRT

Hey guys. I have been dreaming for too long that I would program something to let me know for incoming stuff on the network based on my filters and such. I know there are already tools for this but I want to make one myself some day and a question have been bothering me since.

For example the torrent client "KTorrent" notifies you when a download is complete or whatever, it displays in the top right corner a message. Or another example is ABRT (Automatic Bug Reporting Tool). This "top right corner message" it's called "trayicon" based on the description I found here.

ABRT: ABRT Notification

Do you have any idea how could I spawn a trayicon with details that I want like ABRT does when a crash occurs? Can you give me any example in C or Python?

Thank you.

Last edited by PFeso1; 17th April 2012 at 12:11 PM.
Reply With Quote
Old 17th April 2012, 12:34 PM
markkuk Offline
Registered User
Join Date: Apr 2005
Location: Finland
Posts: 5,072
Re: Spawn notifications with your program similar to KTorrent or ABRT

Each GUI toolkit (GTK, Qt, wxWidgets, ...) has its own way of creating tray icons. Search the documentation of your chosen toolkit.
Reply With Quote
Old 19th April 2012, 08:59 AM
bepaald Offline
Registered User
Join Date: Nov 2004
Posts: 126
Re: Spawn notifications with your program similar to KTorrent or ABRT

You will want to read up on dbus, it's the mechanism by which these messages are shown. Basically your system is (should be) running a dbus daemon, waiting to receive messages from applications, and your application should connect to this system message bus and send it a message.

And as markkuk said, different toolkits have different API's for connecting and sending messages to this system messagebus. I once wrote an application in Qt that did this, part of which I have quickly turned into a small example. Don't ask complicated questions though, it's really been to long for me to remember the details about this, but it works! Just extract, run 'make', and then run the app. (Of course, you'll need gcc-c++ and qt-devel (and possibly others) installed.)

Attached Files
File Type: bz2 dbustest.tar.bz2 (17.3 KB, 102 views)
Running F20 x86_64 with KDE
Intel Core i7-4771 @ 3.5GHz
Reply With Quote

abrt, ktorrent, notifications, program, similar, spawn

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
keep an open connection with scp or another similar program COKEDUDE Using Fedora 4 12th August 2011 09:20 AM
ktorrent version 4.0.3-1.fc13 Socket stay open after program termination bbehnam Security and Privacy 0 1st November 2010 07:34 PM
Can't able to create more than 28 spawn bash in fedora core linux 64 bit prabuc Using Fedora 1 1st June 2010 08:07 AM
Can't able to create more than 28 spawn bash in fedora core linux 64 bit prabuc Using Fedora 0 1st June 2010 07:57 AM
speedy[14064]: Cannot spawn backend process Shawnm_14 Using Fedora 0 28th February 2008 06:29 AM

Current GMT-time: 05:38 (Saturday, 19-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat