15

Can I create a shortcut to a virtualbox OS in the unity sidebar without it being on the desktop too. I tried to right click in virtualbox and create shortcut on desktop then move it. but if i do it then delete the desktop shortcut it renders the unity shortcut useless.

Any ideas?

2 Answers 2

16

To add a launcher item that runs a single specific virtual machine we can create a new launcher item as it is described here.

In short, to start a Virtual Box machine without the Virtual Box Manager we may add the following command to start the VM in the Exec= section of a .desktop file we can place in ~/.local/share/applications:

[Desktop Entry]
Name=the name you want it to have
Comment=
Exec=VirtualBox --startvm 'name of the machine'
Icon=icon name
Terminal=false
Type=Application
StartupNotify=true

After giving the .desktop file executable permission we can now start our virtual machine by double-click on it, or we can drag it on the Launcher or the Desktop for convenient access.

In more recent versions of VirtualBox the functionality to start a virtualmachine was moved to the VirtualBoxVM application. This needs a change of the EXEC line in the .desktop file tO

EXEC=/usr/lib/virtualbox/VirtualBoxVM --startvm "name of the machine"

or we may use the tool VBoxManage startvm instead.

2
  • 1
    +1 This doesn't work with the current version of VirtualBox anymore though. Replacing the exec call with VBoxManage startvm "name of the machine" will work.
    – tim
    Commented Jan 17, 2020 at 19:04
  • 1
    Thanks @tim - I edited this into my answer.
    – Takkat
    Commented Jan 17, 2020 at 20:47
2

Save the shortcut to another place and don't delete it.

If you move it to /usr/share/applications it will be accessible to all users and it will appear on the Dash, but any other place will do.

Then you can drag the new shortcut to the Unity Bar even from the dash.

1
  • I have also found i can add a custom icon by adding a .png to usr/share/pixmaps
    – eekfonky
    Commented Nov 29, 2011 at 17:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .