After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686059 - run-dialog: Avoid double forking; it breaks "pkexec"
run-dialog: Avoid double forking; it breaks "pkexec"
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-12 22:22 UTC by Colin Walters
Modified: 2012-10-18 23:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
run-dialog: Avoid double forking; it breaks "pkexec" (1.86 KB, patch)
2012-10-12 22:22 UTC, Colin Walters
none Details | Review
Avoid double forking when launching apps; it breaks "pkexec" (4.74 KB, patch)
2012-10-13 13:43 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2012-10-12 22:22:36 UTC
See: https://bugzilla.gnome.org/show_bug.cgi?id=675789
Comment 1 Colin Walters 2012-10-12 22:22:38 UTC
Created attachment 226356 [details] [review]
run-dialog: Avoid double forking; it breaks "pkexec"
Comment 2 Michael Biebl 2012-10-12 23:08:41 UTC
Hi Colin,

I quickly tested the patch and it does seem to work fine for the ALT-F2 launcher, thanks.

It still an incomplete fix for gnome-panel though, as you might have .desktop files using "Exec=pkexec foo" and starting such an application via the menu still fails.
Comment 3 Colin Walters 2012-10-13 13:26:26 UTC
(In reply to comment #2)
> Hi Colin,
> 
> I quickly tested the patch and it does seem to work fine for the ALT-F2
> launcher, thanks.

Ok since I know you speak C, mind marking the patch as "accepted-commit-now"?  The point is to have some peer review of changes, not to block all patches until one or two people look at it.  If it was an invasive change, we'd want someone from MAINTAINERS to sign off.

> It still an incomplete fix for gnome-panel though, as you might have .desktop
> files using "Exec=pkexec foo" and starting such an application via the menu
> still fails.

Oh...right.  Ugh, this eggdesktopfile stuff is going to take a bit to unwind.  But we can at least do the Alt-F2 fix first.
Comment 4 Colin Walters 2012-10-13 13:43:07 UTC
Created attachment 226376 [details] [review]
Avoid double forking when launching apps; it breaks "pkexec"

Now also fixes the main panel launcher
Comment 5 Colin Walters 2012-10-13 13:43:52 UTC
Actually eggdesktopfile wasn't used; this patch should work, but I didn't test it.
Comment 6 Michael Biebl 2012-10-13 20:42:20 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Hi Colin,
> > 
> > I quickly tested the patch and it does seem to work fine for the ALT-F2
> > launcher, thanks.
> 
> Ok since I know you speak C, mind marking the patch as "accepted-commit-now"? 

Stupid question: How can I do that?
Comment 7 Colin Walters 2012-10-14 16:24:31 UTC
(In reply to comment #6)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Hi Colin,
> > > 
> > > I quickly tested the patch and it does seem to work fine for the ALT-F2
> > > launcher, thanks.
> > 
> > Ok since I know you speak C, mind marking the patch as "accepted-commit-now"? 
> 
> Stupid question: How can I do that?

In the "Attachments" list, click "Review".  You can comment there, and there's a patch status option in the bottom right.
Comment 8 Michael Biebl 2012-10-14 19:37:13 UTC
Review of attachment 226376 [details] [review]:

Looks good to me aside from some minor nitpicks (dummy_child_watch and gather_pid_callback in gnome-panel/libpanel-util/panel-launch.c use spaces whereas everywhere else you use tabs).
It also refers to https://bugzilla.gnome.org/show_bug.cgi?id=675789 in the code comments while it probaby should refer to https://bugzilla.gnome.org/show_bug.cgi?id=686059 . The latter is filed against gnome-panel and linked to Bug#675789.
Comment 9 Michael Biebl 2012-10-14 19:39:59 UTC
Forgot to add: Tested patch in GNOME fallback mode and I could successfully start applications via pkexec through both the ALT+F2 launcher and the menu.
Comment 10 Matthias Clasen 2012-10-18 23:25:58 UTC
Colin, are you going to push this ?
Comment 11 Colin Walters 2012-10-18 23:44:59 UTC
Attachment 226376 [details] pushed as 76acc5b - Avoid double forking when launching apps; it breaks "pkexec"