【问题标题】:How get Exec field from desktop file如何从桌面文件中获取 Exec 字段
【发布时间】: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


    【解决方案1】:

    打印launcher.get_commandline()

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-09
      • 2017-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-09
      • 1970-01-01
      相关资源
      最近更新 更多