core-agent-linux/misc/qubes-desktop-run
Marek Marczykowski-Górecki 0613a58961 Improve handling of .desktop files
Instead of directly using Exec= line, parse the file (at the launch
time) with Gio library. The main reason for this change is to handle
Terminal= option, but generally this approach should be more
bulletproof, especially when some fancy options are present in desktop
files.
2014-10-27 12:25:45 +01:00

12 lines
238 B
Python
Executable File

#!/usr/bin/python
from gi.repository import Gio
import sys
def main(myname, desktop, *files):
launcher = Gio.DesktopAppInfo.new_from_filename(desktop)
launcher.launch(files, None)
if __name__ == "__main__":
main(*sys.argv)