[Novalug] Process intercommunication

Gary Knott garyknott@gmail.com
Fri Dec 30 16:01:56 EST 2016


Dear Peter,  I looked at the DBUS "tutorial" you cited.  Thanks.
(I object to the term object - and also method.  Linux, and
Linux Documentation,  should be kept at the C programmer
level in my opinion.)

Anyway, I see that DBUS is kinda like the Windows "message queue"
system with callbacks being used for receiving "messages".

What I did not find was any list of pre-defined "events" that I, as a
programmer,
could request a call-back for.   It seems likely that some process
that implements the "file-selection" window  is getting a callback
notifying
it that a file owned by user "X" has been closed, but that's just a guess.
(Surely, it does not just get a "file-closed" notification and then have to
check the
dates and times of all files it is displaying?   - Or maybe it just redoes
its
entire display, accessing the entire directory and formatting its contents
without worrying about what file got closed?

By the way, is the "file-selection" window  that pops-up i a specific
utility
program provide3d as part of a Linux distro that is run when I do a thing
like click
on the "paperclip" in a gmail window being displayed by Firefox?

[One of the issues that makes understanding "modern"
computing daunting , is that understanding the list of programs that
run and what they do when you take some action - click or hit a key -
is extremely hard  (in fact, often practically impossible!)
- it is not just "take an action" => a specific
program receives the "action" and acts simply and on its own.]

- Jerry, I couldn't follow your remark:
{Guessing recent files in the likely modal open dialog requires an update,
as well as the switch focus back to open dialog.}
Do you want to elaborate?


----------- prior email

>From: jerry w <jerrywone@gmail.com>>To: Peter Larsen <peter@peterlarsen.org>,
novalug@firemountain.net
>Subject: Re: [Novalug] process intercommunication

>
> > Guessing recent files in the likely modal open dialog requires an update,
> >as well as the switch focus back to open dialog.
>
> On Thu, Dec 29, 2016, 20:12 Peter Larsen via Novalug <
> novalug@firemountain.net> wrote:
>
> > On 12/29/2016 02:48 PM, Gary Knott via Novalug wrote:
> > > I'm running the Firefox browser, and I'm viewing my gmail
> > > page, and I'm "composing" an email to send to someone,
> > > and I click on the paperclip to "attach" a file (a pdf file
> > > generated from a .tex file actually), and the "file chooser"
> > > window pops-up, listing my top-level files, including
> > > the file I want to attach.
> > >
> > > Now I see it is out-of date, so I switch to a terminal
> > > window, and rebuild the pdf file I want to attach.
> > >
> > > The "file-chooser" window is automatically updated
> > > to show the date and size of the new file!
> > >
> > > Can anyone explain in some just-right detail how that
> > > trick is coded?   (How it might be coded is good, but
> > > how it really is coded is even better.)
> >
> > Gary,
> > This does vary from program to program, and has been one of the many
> > challenges we had to overcome with Linux - it's been hard to "agree" on
> > a proper tool to do inter process communication (IPC). DBUS has, at
> > least with Gnome, turned into the defacto inter communication protocol
> > between processes. Pretty much every event you can think of, goes over
> > DBUS - ie. finding a wireless network, getting a connection, opening a
> > file, launching a program and much much more. It usually does not have
> > mouse movement and keyboard messages - that's handled by the WM system
> > (usually).   A quick tutorial can be found here:
> > https://dbus.freedesktop.org/doc/dbus-tutorial.html
> >
> > I ran "dbus-monitor" and got the following back on an action - I wonder
> > if you can tell what I did?
> >
> > method call time=1483054956.640031 sender=:1.71 -> destination=:1.120
> > serial=201 path=/org/gtk/vfs/metadata; interface=org.gtk.vfs.Metadata;
> > member=Move
> >    array of bytes "/home/plarsen/.local/share/gvfs-metadata/home" + \0
> >    array of bytes "/data/peterfolder" + \0
> >    array of bytes "/.local/share/Trash/files/peterfolder" + \0
> > ....
>


More information about the Novalug mailing list