I'm using Ubuntu 13.04 with GNOME 3. My goal is to create a custom launcher that will launch a VirtualBox virtual machine, and I'd like it to have it's own icon.
From a purely functional standpoint, I've been successful. This article (webupd8.org) gave me a command that directly launches a virtual machine. So I created a new .desktop file in ~/.local/share/applications that uses that command for the 'Exec' portion. When I click the launcher, the machine successfully launches.
My problem is with the icon behavior. I specified a custom icon in the .desktop file, and it shows up beautifully in my favorites bar. However, when I click the icon and the virtual machine starts up, the newly-opened window isn't associate with my custom launcher (i.e., my custom icon isn't "highlighted"). Instead, the window becomes associated with a newly-created VirtualBox icon.
Does anyone know if there's a way to indicate to GNOME 3 that I want to associate the new window with my custom icon? I remember having a similar issue with Matlab and specifying something called "StartupWMClass" in the .desktop file, but I don't know what I should set the value to in this case (or if that even applies for a non-Matlab launcher).
Here's my .desktop file in case anyone thinks it might prove useful:
GenericName=Windows 8 Virtual Machine
Comment=Windows 8 in VirtualBox
Exec=VBoxManage startvm 'Windows 8'