How To Launch Google Apps With Keyboard Shortcuts

Chrome AppsOne of the things I really like about using Chrome on Linux is the ability to turn any website into a Desktop-ish App. It’s technically still a web app, but it opens in its own window without a location bar or any of the other decorations you normally see in a web browser. So it looks like a desktop app. I’ve done this with a bunch of different sites including Gmail, Simplenote, Toggl, YNAB, and LastPass. Then, anytime I want to sling out an email, take a note, start tracking my time on a job, etc. It’s all just a keyboard shortcut away. The apps get their own icon too so you can find them easily when you Alt + Tab through your open apps. Here’s how it works.

First, find a website you’d like to turn into an app. Then click the three little, stacked dots in the top right corner of your chrome browser. That will reveal a menu where you click More Tools Add To Desktop.

creating desktop app from website with chrome

After clicking that, you’ll see this little window where you can name your application. Call it whatever you’d like, but be sure to check the Open as window checkbox.  If you do not check that checkbox, then the site will open as a tab and basically acts like a bookmark. So, be sure to check that checkbox so everything works like a desktop app.

Add to desktop

Setting Your Own App Icon

You may want to set your own custom icon for your new app. To do that, just open up the chrome-xxx.desktop file in your ~/.local/share/applications directory. Here’s an example of my chome-xxx.desktop file for my Toggl app.

I commented out the default Icon and added my own stored in /home/lee/Pictures/icons/toggl.png

Creating The Keyboard Shortcut

All you have to do is copy what you see on the Exec line.

/opt/google/chrome/google-chrome --profile-directory=Default --app-id=emhlbipdbnglohkhcmimglnngjlfoehc

A couple points about that command:

  • /opt/google/chrome/google-chrome is the command to launch the Google Chrome browser
  • --profile-directory=Default tells Chrome which browser profile to use. If you have set up multiple users or profiles for your browser you might see a username rather that Default for the profile.
  • --app-id=xxx This is the app ID for the chrome app you just created.

Open up the System Settings panel and locate the Keyboard item.

System Settings

Click the keyboard icon and go to set up your Custom Shortcut to launch your Chrome App.

Custom Shortcut

A window will pop open where you paste the line from the line we got from the .desktop file.

/opt/google/chrome/google-chrome --profile-directory=Default --app-id=emhlbipdbnglohkhcmimglnngjlfoehc

Then, just click on the right column to set your accelerator (aka keyboard shortcut).

One thought on “How To Launch Google Apps With Keyboard Shortcuts

  1. Hi, Lee. Thanks for this tip. I use Chrome on Linux Mint, and this works great. I just wanted to mention that there’s an easier way to copy the command line. There’s no need to locate and open the hidden file. The first part of the process creates a desktop icon. Simply right-click the icon and select Properties. The command is right there in the Basic Properties.

    Thanks again!

Leave a Reply

Your email address will not be published. Required fields are marked *