Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
1  
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
add comment

1 Answer 1

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- paste.ubuntu.com/1155785 –  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
show 1 more comment

Your Answer

 
discard

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.