Make VirtualBox VMs to Have Separate Icons in Ubuntu

I’m using Virtualbox to try out different Linux Distributions in virtual machines. It always has 2 logo icons on Ubuntu dock: one for the manager, and another for VMs.

The VM and VM manager icons on the dock are totally same, causing me to make mis-clicks frequently. And, all the opened VMs are grouped into single icon on the dock.

If you don’t like this default behavior, then it’s easy to make Virtual Virtual Machines to have separate icon per instance.

As the screenshot below shows you, after following this tutorial, every VM will have its own system logo on Ubuntu Dock:

Single command to have separate Virtualbox VM icons

The VM icons for Linux are handled by virtualboxvm.desktop file under “/usr/share/applications” directory. Simply disable that file will make Virtualbox VM (7.0.12 in my test) fall back to separate icon with system/distro logo.

To do so, just create an empty file with same filename under “.local/share/applications”. It will be taken in use instead of the one in ‘/usr/share/applications’ for current user only.

Ubuntu user can press Ctrl+Alt+T on keyboard to open terminal, then run the single command below to create the empty file:

touch ~/.local/share/applications/virtualboxvm.desktop

This command should work in most Linux, though running command mkdir -p ~/.local/share/applications may be required first to create the directory.

Use a graphical text editor

For those who hate Linux commands, simply search for and launch a text editor window.

Then, it should by default open an empty file (if not create one). There open menu and select “Save as”.

In next dialog, name the empty file to virtualboxvm.desktop and save it into “Home > .local > share > applications”.

The change will be applied next time you launch a VirtualBox VirtualBox.

How to Restore

To restore the change, simply delete the empty file either in your file manager or by running command in terminal:

rm ~/.local/share/applications/virtualboxvm.desktop

That’s it. Enjoy!