inotifywait -m -e close --format %f
Kevin Krammer
kevin.krammer at gmx.at
Tue Jan 18 13:03:10 GMT 2011
Hi Gene,
On Tuesday, 2011-01-18, gene heskett wrote:
> On Tuesday, January 18, 2011 06:24:28 am Kevin Krammer did opine:
> > On Monday, 2011-01-17, gene heskett wrote:
> > > Greetings;
> > >
> > > Is there a way I can mate an output from the above command line,
> > > watching /var/spool/mail, to trigger a 'check mail' function in the
> > > recent kmail?
> > >
> > > This is a case of not needing the text output, but just the occurrence
> > > of the output, used as an interrupt to kmail. This would synchronize
> > > kmail with the activities of fetchmail and procmail/SA so I see
> > > incoming mail several minutes quicker.
> >
> > You could execute the checkMail action (check all accounts for new mail)
> > via D-Bus:
> >
> > qdbus org.kde.kmail /KMail org.kde.kmail.kmail.checkMail
>
> Thank you very much, Kevin.
>
> I grepped the dbus tree in /etc w/o finding such a qdbus example, but found
> that it has the desired effect when issued from a terminal shell.
D-Bus interfaces or rather their descriptions don't have to be installed, they
can be queried at runtime.
A GUI tool to do that is qdbusviewer, but qdbus can also do this:
- when invoked wihout any parameter, it will list all D-Bus "names" (one
process can have several names).
- when invoked with such a name it will list all objects in this process.
- when invoked with name and object path, it will list the available methods
on said object.
> I have a special mail spool for a niece whose emails, while personal family
> stuff, look a lot like spam to SA, so I have a procmail rule that bypasses
> SA.
>
> I put this in ~/gene/bin/watchmail
>
> Is there a way I can put this in the kmail startup so it runs as soon as I
> run kmail?
One way would be to have a "kmail" script in your path before the kmail binary
and let it start the watchmail and then the actual kmail by full path.
Another option would be to take the KMail.desktop file (which is used by the
laucher menu, etc), copy it to the respective user local path (see kde4-config
--path xdgdata-apps) and modify it so its "Exec" line runs this wrapper
script.
Renaming the kmail binary and putting a wrapper script in its place would work
for as well for a short time, but it would be overwritten the next time you
update the kmail package.
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20110118/76ce16d3/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list