trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: June 2016

Re: [trinity-users] qdbus vs kmail ??

From: Gene Heskett <gheskett@...>
Date: Thu, 9 Jun 2016 18:30:21 -0400
On Thursday 09 June 2016 13:23:42 Slávek Banko wrote:

> On Thursday 09 of June 2016 19:01:17 Gene Heskett wrote:
> > Greetings to the tde-r14.0.4 kmail experts;
> >
> > One of the things that is rather glaringly not addressed in the docs
> > on kmail that are easily read from a click on the help pulldown, is
> > any info on how to control kmails functioning via dbus commands.
> >
> > I've been using dbus to send it a get new mail cmd for years, using
> > a command line someone gave me:
> >
> > /usr/bin/qdbus org.kde.kmail /KMail org.kde.kmail.kmail.checkMail
> >
> > but since my sa-learn scripts also reach into kmail's database and
> > move files once sa-learn (-ham or -spam) has done its thing, it
> > would be easier on kmails sanity if I could send it a rebuild index
> > command on the two directory's mucked with.
> >
> > man qdbus looks helpfull, but says that org.kde.kmail does not exist
> > when I attempt to query it using the above command or variations of
> > it.  I would assume that
> >
> > $>/usr/bin/qdbus org.kde.kmail /KMail
> >
> > would return a whats available list, but doesn't. All I can get is:
> > gene@coyote:~$ qdbus  -service org.kde.kmail /KMail
> > Service 'org.kde.kmail' does not exist.
> > gene@coyote:~$ qdbus  org.kde.kmail /KMail
> > Service 'org.kde.kmail' does not exist.
> > gene@coyote:~$ qdbus  org.kde.kmail
> > Service 'org.kde.kmail' does not exist.
> >
> > And yet the first sample command above works and has been working
> > since dcop was deprecated somewhere back up the timeline quite a few
> > years ago.
> >
> > Is there such a doc someplace?  Or am I  miss-reading the qdbus man
> > page. A simple qdbus[enter] returns only this:
> > gene@coyote:~$ qdbus
> >
> > :1.0
> >
> >  org.kde.kcalc-6112
> >
> > :1.1
> >
> >  org.xfce.Terminal4
> >
> > :1.2
> > :1.3
> >
> >  org.gtk.vfs.Daemon
> >
> > :1.4
> > :1.6
> >
> > org.freedesktop.DBus
> >
> > And yet a command sent to org.kde.kmail works a treat.  So how is
> > that command getting there, because it works, and has been working
> > for years.
> >
> > Me goes off to Wallies to get some scripts that keep me tuned up as
> > well as can be expected considering the accumulated mileage.
> >
> > Cheers, Gene Heskett
> > --
>
> DCOP is indeed deprecated, but KDE4 and later.
> For TDE is DCOP still right way! For example:
>
>   dcop kmail KMailIface checkMail
>
> You can use kdcop to explore the possibilities.

I went back and checked my script as it can do either, and it was using 
dcop, with a very similar command to the sample you supplied above, and 
after a reboot, it Just Worked(TM).  And the job I had sent to the 
printer, not realizing cups couldn't find it, started up and has been 
done before I even get the rest of the screens placed on the proper  
workspaces & running the stuff they usually do.  So now I'm a happy 
camper again, and about to trade this coffee cup in on a near beer. But 
first go see what my woof wants for din-din, its about that time.

Now, I think I figured out what happened. If kmail is not on the other 
end of the circuit, the pipeline fill up and becomes non-functional.  
And I didn't start kmail right away after the tde-trinity restart.  
Plugged up the pipe IOW.

So the trick is to smarten up my script so it only sends the command of 
kmail is available.  That shouldn't be too hard.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>