7

I've created a custom script to launch VirtualBox that replaced the original script in ¸/usr/bin/¸. So running VirtualBox in a terminal launches my script. However, pressing super key and type "virtualbox" in Gnome Shell launcher brings the old original script.

How can I change that behavior so that when I type virtualbox in Gnome Shell launcher my custom script runs?

erch
  • 4,890
  • 17
  • 49
  • 81
Rombus
  • 235
  • 3
  • 10

1 Answers1

9

Look for the file /usr/share/applications/virtualbox.desktop. On my system, it has the following contents:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Oracle VM VirtualBox
GenericName=Virtual Machine
Type=Application
Exec=VirtualBox %U
...

Simply change the Exec part to point to your custom executable/script.

See also

Thomas Nyman's answer to a similar question.

Joseph R.
  • 38,849
  • 7
  • 107
  • 143
  • Perfect! thanks. The thing that's weird is that when I run the command "locate virtualbox.desktop" the output was empty. – Rombus Nov 30 '13 at 21:37
  • 1
    @Rombus No that's not weird. It just means your `locatedb` isn't up-to-date. You need to run `updatedb` first. See `man locate`. – Joseph R. Nov 30 '13 at 21:43