【问题标题】:how to run file associated application from console linux如何从控制台 linux 运行文件关联的应用程序
【发布时间】:2012-03-22 05:09:47
【问题描述】:

在windows上存在命令:

start myfile.mp3
start myfile.txt

在 Mac 上:

open myfile.mp3
open myfile.txt

Ubuntu下有模拟命令吗?

【问题讨论】:

    标签: linux ubuntu console


    【解决方案1】:

    xdg-open 如果你有一个与 freedesktop.org 兼容的环境。

    【讨论】:

      【解决方案2】:

      Linux 中有几个命令可以帮助您打开与应用程序相关的文件。如果您知道打开文件的应用程序,那么这可能会起作用。我不确定你是否正在寻找这个

      env DISPLAY=:0.0 火狐“google.com” 打开 Firefox 并在其中打开 google.com。您可以替换应用程序名称和文件名并使用此命令。

      【讨论】:

        【解决方案3】:

        为 Gnome 驱动的发行版尝试“gnome-open”。

        gnome-open random-file.torrent 将打开我的 torrent 应用程序。

        【讨论】:

          猜你喜欢
          • 2013-02-11
          • 1970-01-01
          • 2011-01-22
          • 1970-01-01
          • 2019-01-30
          • 1970-01-01
          • 1970-01-01
          • 2017-03-16
          • 2010-11-25
          相关资源
          最近更新 更多