! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Don't double-fork when spawning from menu.
Status:
RESOLVED: MOVED
Product:
Xfce4-panel
Component:
Applications Menu

Comments

Description secipolla 2012-12-12 15:36:26 CET
Note: feel free to change the bug title as I just copied it from a GNOME bug and don't really understand much about that.

Many applications that use polkit (pkexec) fail to open from the Xfce menu (and from xfce4-appfinder too) due to this.

https://bugzilla.redhat.com/show_bug.cgi?id=879591
Comment 2 Raphael Groner 2013-01-02 17:25:14 CET
I did not try to reproduce the issue. Maybe it helps when I try to explain from source what happens.


If you set 'StartupNotify=true' in the desktop file, the process will be called via help from exo-open. Then we will have the exo-open PID as the top parent. This could be a good work around.

  if (garcon_menu_item_requires_terminal (item))
    g_string_append (string, "exo-open --launch TerminalEmulator ");

see
http://git.xfce.org/xfce/xfce4-panel/tree/plugins/applicationsmenu/applicationsmenu.c#n780


If you don't use that flag, the command will directly go to xfce_spawn_on_screen and loose the parent PID when the process calls disown.

see
http://git.xfce.org/xfce/xfce4-panel/tree/plugins/applicationsmenu/applicationsmenu.c#n831


I bet hardly that is more a GTK bug than a bug for Xfce. Almost cause it's also reported to upstream GNOME as well. GNOME uses a work around in a javascript file.

see
http://bugzilla-attachments.gnome.org/attachment.cgi?id=213776


Oh, the release of Xfce 4.8 pre1 introduced xfce_spawn_on_screen_with_child_watch(). Maybe there's a fix needed then to call that function instead of the pure old xfce_spawn_on_screen().

My suggestion to reassign this bug to libxfce4ui.
Comment 3 Kevin Fenzi 2013-06-01 19:10:53 CEST
Any news here? This is a kind of anoying little bug. 

There's more discussion and pointers to what gnome/mate/others have done in https://bugzilla.redhat.com/show_bug.cgi?id=879922
Comment 4 Kevin Fenzi 2013-10-21 23:25:25 CEST
No news? ;( 

I would expect more folks to be hitting this and getting upset. :(
Comment 5 Jani Välimaa 2013-10-22 15:44:58 CEST
In Mageia we have a patch [1] which fixes the issue. (I've asked if the author could create git formatted patch so I could attach it here).

[1] http://svnweb.mageia.org/packages/cauldron/libxfce4ui/current/SOURCES/libxfce4ui-4.11.0-avoid-double-fork.patch?revision=497385&view=markup
Comment 6 Git Bot editbugs 2020-05-28 01:45:00 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/52.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #9626

Reported by:
secipolla
Reported on: 2012-12-12
Last modified on: 2020-05-28

People

Assignee:
Nick Schermer
CC List:
4 users

Version

Version:
4.10.0

Attachments

Additional information