elementaryOS 给firefox添加launcher

    • 参考
    • 添加launcher
      • 添加firefoxdesktop
      • 添加执行权限

参考

http://elementaryos.stackexchange.com/questions/2546/how-to-create-a-custom-desktop-file
https://www.reddit.com/r/elementaryos/comments/2pa4cl/how_to_create_shortcut_for_rdesktop/

添加launcher

添加firefox.desktop

进入如下目录中

cd  ~/.local/share/applications/

创建firefox.desktop文件

vim firefox.desktop

拷入如下代码:

[Desktop Entry]
Version=1.0
Name=Firefox
Name[es]=Navegador web Firefox
Name[fr]=Navigateur Web Firefox
Name[it]=Firefox Browser Web
Name[nl]=Firefox webbrowser
Comment=Browse the World Wide Web
Comment[de]=Im Internet surfen
Comment[es]=Navegue por la web
Comment[fr]=Naviguer sur le Web
Comment[it]=Esplora il web
Comment[nl]=Verken het internet
GenericName=Web Browser
GenericName[es]=Navegador web
GenericName[fr]=Navigateur Web
GenericName[it]=Browser web
GenericName[nl]=Webbrowser
Keywords=Internet;WWW;Browser;Web;Explorer
Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen
Keywords[es]=Explorador;Internet;WWW
Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur
Keywords[it]=Internet;WWW;Browser;Web;Navigatore
Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online 
Exec=/usr/local/firefox/firefox
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/usr/local/firefox/browser/icons/mozicon128.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
#Actions=NewWindow;NewPrivateWindow;NewSafeMode;ProfileManager;

[Desktop Action NewWindow]
Name=Open a New Window
Name[de]=Ein neues Fenster öffnen
Name[es]=Abrir una ventana nueva
Name[fr]=Ouvrir une nouvelle fenêtre
Name[it]=Apri una nuova finestra
Name[nl]=Nieuw venster openen
Exec=firefox -new-window
OnlyShowIn=Unity;

[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Name[de]=Ein neues privates Fenster öffnen
Name[es]=Abrir una ventana privada nueva
Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée
Name[it]=Apri una nuova finestra anonima
Exec=firefox --private-window
OnlyShowIn=Unity;

[Desktop Action NewSafeMode]
Name=Open in Safe Mode
Exec=firefox --safe-mode
OnlyShowIn=Unity;

[Desktop Action ProfileManager]
Name=Open Profile Manager
Exec=firefox --ProfileManager
OnlyShowIn=Unity;

其中最关键是Exec,要设置firefox运行程序的路径,根据自己电脑的实际安装路径进行设置。

Exec=/usr/local/firefox/firefox

Icon=/usr/local/firefox/browser/icons/mozicon128.png

则是指定显示的图标,可以自己网上找个火狐的png图标放到该目录/usr/local/firefox/icons/中然后赋给Icon

chmod 666 firefox.png

添加执行权限

chmod a+x firefox.desktop

点击系统左上角的应用程序就可以看到火狐的图标了。

你可能感兴趣的:(ubuntu)