Dox*_*Dox 19 command-line launcher execute-command
我想改变启动器的行为,这样如果我点击 firefox 图标,它就会运行命令
$ optirun firefox
Run Code Online (Sandbox Code Playgroud)
有谁知道怎么改?
谢谢
ons*_*nse 17
如果您在破折号中更改它,您将在启动器中自动更改它。因此,alacarte
从破折号开始“主菜单”(即),导航到 Internet,然后导航到 Firefox。在那里你可以设置一个新的运行条目(替换firefox %u
为optirun firefox %u
- 无论 optirun 是什么)。您还可以手动编辑启动器sudo vim /usr/share/applications/firefox.desktop
并更改Exec
行。
ate*_*enz 12
--先复制firefox.desktop
到家,
cp /usr/share/applications/firefox.desktop ~/.local/share/applications
Run Code Online (Sandbox Code Playgroud)
如果不存在,则在上述最后一个位置创建一个新的。
--然后打开它进行编辑
gedit ~/.local/share/applications/firefox.desktop
Run Code Online (Sandbox Code Playgroud)
--第三,添加以下代码。
X-Ayatana-Desktop-Shortcuts=Optirun;NewWindow;
[Optirun Shortcut Group]
Name=Optirun Firefox
Exec=optirun firefox
TargetEnvironment=Unity
[NewWindow Shortcut Group]
Name=Open a New Window
Exec=firefox -new-window about:blank
TargetEnvironment=Unity
Run Code Online (Sandbox Code Playgroud)
现在保存文件,浏览~/.local/share/applications
. 从那里拖动firefox.desktop
到启动器。
来源:https : //askubuntu.com/a/42853/63025