Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I basically want to make a launcher for my Windows 7 vbox file.

I tried the normal way of giving the path to the Windows 7.vbox file in the .desktop file but that did not work! maybe as it is not executable.

But when i manually navigate to it from nautilus and click on it,the VM straight away starts windows 7.

How do I achieve this in the shortcut?

I also thought of first changing to the directory and then executing it but when i tried it in the command line it dint work.

just Windows\ 7.vbox gave me command not found and ./Windows\ 7.vbox gave me permission denied and with sudo it gave command not found again.

I am using ORACLE VIRTUAL BOX 4.1.12

share|improve this question
You do not run the Windows 7 vbox file directly, you need to run the Oravcle Virtual Box application, and send it the Windows 7 file as a parameter. This what Nautilus actually does for you. – Dan Aug 19 '12 at 8:26
up vote 2 down vote accepted

At the Exec field of your .desktop file, you have to place:

Exec=xdg-open "/home/Nirmik/VirtualBox VMs/Windows 7/Windows 7.vbox"

xdg-open will load the vbox file with the default program, VirtualBox!

Edit the above path so as to match your needs, of course.

share|improve this answer
so basically the command xdg-open opens the file in the default app? – Nirmik Aug 19 '12 at 9:48
yes yeah yes yeah – hakermania Aug 19 '12 at 10:29
It dint work! here is the .desktop file- – Nirmik Aug 19 '12 at 18:22
Please read carefully my answer. Notice that I have removed the \ before the spaces inside the path. The \ are required only if you haven't enclosed the path with ", but you've already done so. Also, you have 2 Name fields? – hakermania Aug 19 '12 at 18:28
umm yeah thats how i always make a .desktop file with 2 name fields...and i'll correct on that \ thing – Nirmik Aug 19 '12 at 18:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.