user2413723
user2413723

Reputation: 11

Issues with custom Google Chrome *.desktop file

I've got some issues with a custom *.desktop file for Google's Crome Browser for the Unity Quicklist. I've added some additional shortcuts for example for YouTube. The problem is that if no Chrome Window is opened it adds as I click the YouTube shortcut a new Chrome icon in the quicklist (so I have at least Chrome two times in thee list). If I click on "Open new window" or "open new incongito window" it works as it should and set the custom quicklist shortcut "as active".

The Shortcut Entry:

> [YouTube Shortcut Group] 
> Name=YouTube 
> Exec=/opt/google/chrome/google-chrome www.youtube.com
> TargetEnvironment=Unity

The shortcut Group is listed in the google-chrome.desktop file right after the two standard shortcut groups.

So, what is wrong? Is there any special argument I have to add (besides the '--app=' arg that not really results in a perfect solution)?

Upvotes: 1

Views: 5350

Answers (1)

rubyrailzdevel
rubyrailzdevel

Reputation: 183


[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
Exec=/opt/google/chrome/google-chrome %U --blacklist-accelerated-compositing
Terminal=false
Icon=google-chrome
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
X-Ayatana-Desktop-Shortcuts=phpMyAdmin;NewWindow;NewIncognito


[phpMyAdmin Shortcut Group]
Name=phpMyAdmin
Exec=/opt/google/chrome/google-chrome localhost/phpmyadmin
TargetEnvironment=Unity


[NewWindow Shortcut Group]
Name=New Window
Exec=/opt/google/chrome/google-chrome
TargetEnvironment=Unity


[NewIncognito Shortcut Group]
Name=New Incognito Window
Exec=/opt/google/chrome/google-chrome --incognito
TargetEnvironment=Unity


This works for me, I had to add the name of the shortcut to X-Ayatana-Desktop-Shortcuts=

Upvotes: 2

Related Questions