Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fdce9aaf99 | ||
|
e9d8a23e72 |
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
mintmenu (6.0.3.1) tricia; urgency=medium
|
||||||
|
|
||||||
|
* Fix launching pkexec applications (#248)
|
||||||
|
|
||||||
|
-- Clement Lefebvre <root@linuxmint.com> Tue, 31 Mar 2020 12:33:51 +0100
|
||||||
|
|
||||||
mintmenu (6.0.3) tricia; urgency=medium
|
mintmenu (6.0.3) tricia; urgency=medium
|
||||||
|
|
||||||
* Prefer mozo over menulibre
|
* Prefer mozo over menulibre
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/python2
|
#!/usr/bin/python2
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from gi.repository import Gio
|
from gi.repository import Gio, GLib
|
||||||
|
|
||||||
|
|
||||||
def RemoveArgs(Execline):
|
def RemoveArgs(Execline):
|
||||||
@ -16,12 +16,20 @@ def RemoveArgs(Execline):
|
|||||||
|
|
||||||
return Execline
|
return Execline
|
||||||
|
|
||||||
|
def dummy_child_watch (pid, status, data):
|
||||||
|
# Do nothing, this is just to ensure we don't double fork
|
||||||
|
# and break pkexec: https://bugzilla.gnome.org/show_bug.cgi?id=675789
|
||||||
|
pass
|
||||||
|
|
||||||
|
def gather_pid_callback(appinfo, pid, data):
|
||||||
|
GLib.child_watch_add(pid, dummy_child_watch, None)
|
||||||
|
|
||||||
# Actually execute the command
|
# Actually execute the command
|
||||||
def Execute(cmd , commandCwd=None, desktopFile=None):
|
def Execute(cmd , commandCwd=None, desktopFile=None):
|
||||||
if desktopFile:
|
if desktopFile:
|
||||||
launcher = Gio.DesktopAppInfo.new_from_filename(desktopFile)
|
launcher = Gio.DesktopAppInfo.new_from_filename(desktopFile)
|
||||||
retval = launcher.launch_uris()
|
retval = launcher.launch_uris_as_manager(uris=[], launch_context=None, spawn_flags=GLib.SpawnFlags.SEARCH_PATH|GLib.SpawnFlags.DO_NOT_REAP_CHILD, \
|
||||||
|
user_setup=None, user_setup_data=None, pid_callback=gather_pid_callback, pid_callback_data=None)
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
cwd = os.path.expanduser("~")
|
cwd = os.path.expanduser("~")
|
||||||
|
Loading…
Reference in New Issue
Block a user