Re: Any way to run apps detached from e2?

  • From: "Jonathan A. Irwin" <jnthn_gmane@xxxxxxxxx>
  • To: emelfm2@xxxxxxxxxxxxx
  • Date: Thu, 13 Jul 2006 01:36:46 -0400

On Thu, 13 Jul 2006 12:34:33 -0400
tpgww@xxxxxxxxxxx wrote:


> An emelfm2 session is normally detached from the controlling terminal
> (but not if debug support is enabled). What happens if you run
> 'emelfm2 -n' to prevent terminal detachment ?

I get the same behavior with "-n" as without. I didn't get any errors
to console or anything. I never tried it with a debug build... dunno
why. Just lazy I guess. :) Anyhow... I just compiled e2 with DEBUG=1 
and thought I'd post the results.


The filetype entry for xcf files is:

gimp xcf files||
        |extensions|#BC24BC
                |xcf|
        |commands|
                |Gimp|e2_exec gimp %f&


When I double-click on an xcf file, I see this in the debug output:

-----------------------------------------------
[DEBUG ] callback: double-click
[DEBUG ] e2_command_run (command:e2_exec gimp %f&,range:1)
[DEBUG ] e2_alias_sync (rt:)
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] asynchronously run command e2_exec gimp "buttons.xcf"
[DEBUG ] register_child (pid:22768,mode:1,command:e2_exec gimp 
"buttons.xcf",exit:0)
[DEBUG ] sigchld_handler (num:17)
[DEBUG ] child (22768) exit status = 0
[DEBUG ] update child data (pid:22768,mode:0,command:N/A,exit:0)
------------------------------------------------

And in the output pane of e2 I see:

------------------------------------------------
>e2_exec gimp "buttons.xcf"  (22730)
>e2_exec gimp "buttons.xcf" (22730) returned '0'
------------------------------------------------


My "Test" entry in the context menu is:


Test||false|false|e2_exec gimp|%f&


When I right click an xcf file and select "Test" I see this in the
debug output:

------------------------------------------------
[DEBUG ] callback: cursor changed
[DEBUG ] _e2_action_run_from (rt:<custom command>,from:)
[DEBUG ] e2_command_run (command:e2_exec gimp %f&,range:0)
[DEBUG ] e2_alias_sync (rt:)
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] match alias for e2_exec gimp %f
[DEBUG ] asynchronously run command e2_exec gimp "buttons.xcf"
[DEBUG ] register_child (pid:22811,mode:1,command:e2_exec gimp 
"buttons.xcf",exit:0)
[DEBUG ] destroy_menu_cb
[DEBUG ] e2_action_free_runtime

( Previous line is repeated 48 times )

[DEBUG ] sigchld_handler (num:17)
[DEBUG ] child (22811) exit status = 0
[DEBUG ] update child data (pid:22811,mode:0,command:N/A,exit:0)
[DEBUG ] _e2_action_run_from (rt:command.quit,from:)
------------------------------------------------


Certainly looks the same, until it gets to all the lines regarding
"e2_action_free_runtime," but I also get those if I right click and
select the default "gimp" entry, rather than double-clicking, so I
presume it's irrelevant.

The notable differences are that with my "Test" entry from the context
menu, I see *no* messages in the output pane, and command.list_children
reports "no children" while the gimp is running.

Anyhow, it's no big deal, since I am not actually prevented from
quitting e2, if I really want to. It's still on my wish-list that
commands could be executed in "detached" fashion at my preference,
but I won't hold my breath. :)

ciao,
Jonathan

-- 
Jonathan A. Irwin
jnthn_gmane@xxxxxxxxx


-- 
Users can unsubscribe from the list by sending email to 
emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by 
logging into the web interface.

Other related posts: