[Kde-bindings] Receiving exit status of an application started with DCOP

Germán Rodríguez Herrera germanrh at yahoo.com
Sun Jun 27 11:38:28 UTC 2004


        Is this mailing list dead or is the wrong place...?

                I would appreciate any information, thanks,

                                                Germán

* German Rodriguez Herrera <grodrigu at ac.upc.es> [2004-06-23 09:24+0200]:
>         [NOTE: I had already sent a similiar message to kde-devel]

>         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

-- 
Germán Rodríguez Herrera       | Tel:    +34 93 401 1655
DAC/UPC, Módulo C6 - E208 - 4  | E-mail: grodrigu at ac dot upc dot es
C/Jordi Girona, 1-3            | Fax:    +34 93 401 7055
08034 Barcelona                |



More information about the Kde-bindings mailing list