1

I'm trying to create my first launcher for Unity that works like this:

when I use the left-click, it opens the browser set as default on the system
when I use the right-click it opens 3 shortcuts related with the other browsers of the system.

But I'm having this problem: for each shortcut, unity is duplicating the icon on the launcher. I wanna all the browsers set on the same icon.
Is that possible?

Here is the code:

[Desktop Entry]
Version=1.0
Name=Brox
Comment=Navegue pela Internet
GenericName=Brox
Exec=sensible-browser %u
Terminal=false
Type=Application
Icon=/usr/share/icons/Faenza/apps/scalable/brox.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+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;

X-Ayatana-Desktop-Shortcuts=Google Chrome;Firefox;Opera;

[Google Chrome Shortcut Group]
Name=Google Chrome
Exec=/opt/google/chrome/google-chrome %U
OnlyShowIn=Unity

[Firefox Shortcut Group]
Name=Firefox
Exec=firefox %u
OnlyShowIn=Unity

[Opera Shortcut Group]
Name=Opera
Exec=/usr/bin/opera %U
OnlyShowIn=Unity

Thanks in advance

2 Answers2

5

Ok, I gotta it!
What I had to do is to edit (as a root) the file bamf.index set in the path /usr/share/applications.
Just added few lines with the name of the launcher followed by the command you want it to manage.
The example on my case was:

brox.desktop  sensible-browser %u
brox.desktop  /opt/google/chrome/google-chrome %u
brox.desktop  firefox %u
brox.desktop  /usr/bin/opera %u

And its done!

  • 2
    Please add this to the quicklist topic here (ofcourse with a picture of how it looks) http://askubuntu.com/questions/35488/list-of-custom-launchers-quicklists-for-unity – Rinzwind May 30 '11 at 14:32
0

I do not think what you are asking is at all possible.

You have to remember that each Launcher item represents a single application and if you were to group them as you are suggesting there is no way to control quitting or un-minimizing each separate application from the launcher.

I guess you could write code that would treat each individual application like multiple windows of a Laucher item but to me sounds very hacky and of limited use.

Cas
  • 8,557
  • Thanks Cas. But I really apreciate if I could save some space on my Launcher regrouping applications. I was thinking about the "StartupWMClass" property, but I dont know how to manage it right. – René Moraes May 28 '11 at 17:22