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hvEypZoReFW34eRWGbPYMws54iAy5BN3k
eDPUplY9ICRHGBezqSA0lxZfYG0QgseVoPnbnxhtOlqfHGghH5pTXdYO0iX6jTG+
Grzfeczno7hKgsHVNxtT3EdR86vtqrUByGjf44T+HXAUJvdr0iTrK4dIkvDoOk0M
pn5eHLcHvLK6MKKyY5gkfGRminQgLfakQSukgbP9d/Sp+bBo6G1B1bmcPXeufNi2
2XUzQDliWFJrdCP7FTvQxKZZI3mwi2vdu4gWMfz/mPwR/stue2RrCDfQZMXfCBVr
wPmdPY4tuF6Fw/cP96/y24kCtCB13UPSSm5E3CJ/wtu2iItHHKP6oBjIXec39Vtk
QWe2zluC+b6Tgt4YrlsHnSfAsVE5pW1WWzAq3DxDhuu7OOlU7WdLasAb5OglEVWQ
TzWM6b/sanBb9FPI/s0VZqF6/Zzy4UcO9+esxA6YgapfJ7pYTzYs8dDFvX2ABpQz
dHn6Vj3UDycL/WTxel9m
=TS2/
-----END PGP SIGNATURE-----
Merge tag 'jm_a5ee90b4'
Tag for commit a5ee90b420
* tag 'jm_a5ee90b4':
qubes-desktop-run: Activate via DBUS when desktop file contains DBusActivatable
Fixes qubesos/qubes-issues#1031
This commit is contained in:
commit
e2cb9b9d74
@ -1,11 +1,36 @@
|
||||
#!/usr/bin/python
|
||||
#! /usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: set ft=python ts=4 sw=4 sts=4 et :
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
from gi.repository import Gio
|
||||
import sys
|
||||
|
||||
def main(myname, desktop, *files):
|
||||
launcher = Gio.DesktopAppInfo.new_from_filename(desktop)
|
||||
launcher.launch(files, None)
|
||||
info = Gio.DesktopAppInfo()
|
||||
dbus_activate = False
|
||||
|
||||
try:
|
||||
launcher = info.new_from_filename(desktop)
|
||||
except TypeError:
|
||||
launcher = None
|
||||
|
||||
if launcher:
|
||||
try:
|
||||
dbus_activate = launcher.get_boolean('DBusActivatable')
|
||||
except AttributeError:
|
||||
dbus_activate = False
|
||||
|
||||
if not dbus_activate:
|
||||
launcher.launch(files, None)
|
||||
|
||||
else:
|
||||
if dbus_activate:
|
||||
cmd = ['gapplication', 'launch', launcher.get_id().replace('.desktop', '')]
|
||||
if files:
|
||||
cmd.extend(files)
|
||||
process = subprocess.Popen(cmd, close_fds=True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(*sys.argv)
|
||||
|
Loading…
Reference in New Issue
Block a user