Receiving exit status of an application started with DCOP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



        [NOTE: I had already sent a similiar message to kde-devel and
kde-bindings but received no conclusive answer, I have read the recent
thread in this list about using dcop and followed the documentaion
provided in there]

        I've been trying to do some fancy stuff with .procmailrc and
dcop. I wanted to take an action depending on the exit status of a
dialog presented with Kdialog. I produced the following call:

dcop --user grodrigu klauncher klauncher kdeinit_exec_wait /usr/bin/kdialog [ --title "Mail Alert" --yesno "$MESSAGETEXT\nLaunch Mail Reader?" ] [  ]

        I read the source code, and I found out the dcop will return
0 if the application succeeds, disregarding the actual return code of
the launched application (NOTE I use "_wait").

        I think that I should "serviceresult", but how from a shell
script?

        The fact that I'm able to use dcop doesn't necessarily mean that
I can run kdialog directly. I understand that when the client's dcop
launches kdialog, that dcop knows the DISPLAY and has the authorization
to use it. The .procmailrc commands could be executed by a different
user (mail/root) and even if it weren't so, it could not have the
DISPLAY or AUTHORIZATION variables set in its environment.

        The good thing about dcop would be, that if the program failed,
that is, it didn't run at all (that's the current exit status of dcop),
then I know that it is not possible to use the graphical display, and
act consequently. But if the application did run (kdialog) I would like
to get its result code in some way, maybe an option in dcop such as:
--return_value and the name of a file or something that would store it
there (I'm sure there will be much better ideas)

        Thanks a lot,

                                Germán

___________________________________________________
.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux