我可以从启动器中启动具有特定值的应用程序吗?

Nat*_*anH 4 command-line unity launcher nice .desktop

有没有办法让程序(即 Firefox)使用启动器(“nice firefox”)中的nice命令执行?在别处看到一 (1) 个帖子说您可以右键单击“启动”图标并选择“编辑命令”,但我的似乎没有该选项。(Ubuntu 14.04 LTS)

Jac*_*ijm 7

Imo 最好的方法是向 firefox 启动器添加一个右键单击(快速列表)条目。有几个选项:

1.手动

  1. 将 firefox 启动器从 复制/usr/share/applications~/.local/share/applications

    cp /usr/share/applications/firefox.desktop ~/.local/share/applications
    
    Run Code Online (Sandbox Code Playgroud)
  2. 使用(例如)gedit 打开文件,查找以以下开头的行:

    Actions=
    
    Run Code Online (Sandbox Code Playgroud)

    在行中添加“Nice firefox”:

    Actions=NewWindow;Nice firefox;
    
    Run Code Online (Sandbox Code Playgroud)

    在文件的最底部添加一个部分:

    [Desktop Action Nice firefox]
    Name=Nice firefox
    Exec=nice -10 firefox
    
    Run Code Online (Sandbox Code Playgroud)
  3. 现在保存文件,注销并重新登录。出现一个新条目:

    在此处输入图片说明

2. 使用 GUI 快速列表编辑器

……像这个

在此处输入图片说明

安装后打开编辑器,从列表中选择firefox启动器(不用说需要锁定启动器),点击大+号添加你的条目。

安装:

sudo add-apt-repository ppa:vlijm/qle
sudo apt-get update
sudo apt-get install qle
Run Code Online (Sandbox Code Playgroud)