【发布时间】:2019-03-12 11:44:03
【问题描述】:
如何从 .desktop 文件中提取 Exec 字段。 Gio 可以帮助我吗?
#!/usr/bin/python2
import os
from gi.repository import Gio
launcher = Gio.DesktopAppInfo.new_from_filename('/usr/share/applications/chromium.desktop')
# how get Exec field from desktop file
# cat /usr/share/applications/chromium.desktop | grep ^Exec
#retval = launcher.launch_uris()
我完全是新手..
【问题讨论】:
标签: python linux python-2.7 gtk gio