How Do I Create a Keyboard Shortcut to Open a Chrome App?

How do i create a keyboard shortcut to open a chrome app or web page? How to do it from the command line?

4

2 Answers

Open URL from command line: google-chrome

Open URL as application from command line: google-chrome --app=

Create keyboard shortcut for opening URL:
System Settings > Keyboard > Shortcuts > Custom > +
- Name: Foo
- Command: google-chrome
- Press Apply
- Select the new row, then press and hold down the desired keys

Create keyboard shortcut for opening URL as application:
System Settings > Keyboard > Shortcuts > Custom > +
- Name: Bar
- Command: google-chrome --app=
- Press Apply
- Select the new row, then press and hold down the desired keys

0

Find your chrome app shortcuts files at: ~/.local/share/applications

You will find there a list of *.desktop files. In the inside they will look something like this:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Google Drive
Exec=/opt/google/chrome/google-chrome %U --profile-directory=Default --app-id=apdfllckaasghufndbhieahigkjlhiii
Icon=chrome-apdfllckaasghufndbhieahigkjlhiii-Default
NoDisplay=true
StartupWMClass=crx_apdfllckaasghufndbhieahigkjlhiii

Copy that exec command to your shortcut command.

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

credit to @Jacob Vlijm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest