Ian Reinhart Geiser on Sat, 19 Jul 2003 18:25:24 -0400 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 19 July 2003 11:54 am, W. Chris Shank wrote: > Hello, > > I'd like to write a small script that launched a KDE pop-up notification > for received faxes. I figure I can monitor the incoming directory or > maybe get efax to launch it as part of the fax receiving process. > However, what I don't know is how to do this in KDE. How would I do this > from the CLI? Anyone have a clue? I didn't have much luck googling - but > maybe I searched on the wrong text. Well you have two attacks you can take. First is KDialog. This is a dialog replacement for KDE. This is a cool approach because with some simple magic you can make the same shell script work in Gnome (using gdialog) terminla using dialog and KDE using KDialog. The other approach while faster is limited only to KDE. This uses dcop (kdcop is a nice browser to explore these interfaces). A good example script would be as follows: id=1 type=1 # these are the enumed types documented in KMessageBox and QMessageBox test="A new fax has arrived" caption="New Fax" buttonYes="Ok" buttonNo="Cancel" dcop kio_uiserver UIServer messageBox id type text caption buttonYes buttonNo This will pop up a dialog and return the ID of the button pressed. This is imperfect but has been refined in KDE 3.2 with dcopwidgets. The above options will give you what you need for now, but for more information on dcopwidgets you can check out http://geiseri.myip.org/~geiseri/dcopwidgets for whats to come. Cheers -ian reinhart geiser - -- - --:Ian Reinhart Geiser <geiseri@yahoo.com> - --:Public Key: http://geiseri.myip.org/~geiseri/publickey.asc - --:Public Calender: http://geiseri.myip.org/~geiseri/publicevents.ics - --:Jabber: geiseri@geiseri.myip.org - --:Be an optimist -- at least until they start moving animals in - --: pairs to Cape Canaveral. ~ Source Unknown -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/GcT2Py62TRm8dvgRAkp0AKCDiHa1XGN4d5fTNe60xg8FB+4ZUQCeLQXF M+pLAL/QOjPUDHP0SBi3ZHU= =CsGJ -----END PGP SIGNATURE----- _________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce General Discussion -- http://lists.netisland.net/mailman/listinfo/plug
|
|