How to add optirun mode to applications in unity launcher

Some users are terrified of the terminal and some simply do not want to type on the keyboard to launch an application. However, if your laptop has a hybrid graphics card and you want to make use of it by installing bumblebee, you would need to get your hands dirty!
Firefox launcher with optirun mode
However, there is a way to get past the terminal. If you are running the program from the unity launcher, just add the command to the unity launcher. It needs a little bit of work.
1. Choose the program you want to run using optirun. In this case we take the example of Google Chrome. 
2. Go to ~/.local/share/applications
cd ~/.local/share/applications
gedit google-chrome.desktop

Add Optirun to X-Ayatana-Desktop-Shortcuts so that  it looks like this:

now add the following lines right below X-Ayatana-Desktop-Shortcuts
[Optirun Shortcut Group]

Name=Optirun Mode
Exec=optirun google-chrome

3.Save the file. 
4. Open file manager and navigate to ~/.local/share/applications. “.local” is a hidden folder under your home folder. You can view the hidden folders by pressing Ctrl+H.
5. Once you locate the google-chrome.desktop file, drag it to the launcher. 
6. Now you will be able to launch optirun mode in Google Chrome by right clicking on the Google Chrome icon as shown in the screenshot .
Google Chrome launcher with optirun mode

The same method can be applied to other applications which has a launcher icon or a desktop icon. 

Leave a Reply

Scroll to Top