27

I am looking to run a couple web pages as desktop applications in Gnome shell. These are the requirements:

  1. It must run with Google Chrome.
  2. It must be available as a separate app icon when pressing Alt+Tab.

I have looked at a program called Webby, but it does not seem to use Google Chrome as the underlying browser. So far I created my .desktop file and have been able to get the application and icon to show in the launcher:

[Desktop Entry]
Name=Gmail
Exec=google-chrome-stable --app=https://mail.google.com/mail/u/0/#inbox
Icon=gmail-icon
Type=Application
Categories=GTK;GNOME;Office;

This works and allows me to launch the application in a separate window, however, when I press Alt+Tab everything is still combined under the google chrome icon. I have tried creating a symlink as well for the exec path, this didn't work either. Anyone have any ideas?

abu_bua
  • 11,313

3 Answers3

39

This might not be what you're looking for. But if you want to pin a Google Chrome website to the desktop as a web application you can do the following:

  • Click the 3 dots on the top-right corner
  • Click More tools
  • Click Create shortcut...
  • Select the Open as window checkbox

Hope I helped!


Chrome > Version 70

Update for new versions of Chrome, where no Open as window checkbox appears:

  • Click the 3 dots on the top-right corner
  • Click More tools
  • Click Create shortcut...
  • Click Create
  • Navigate to chrome://apps
  • Right-click on the new app
  • Click Open as window
abu_bua
  • 11,313
2

After clicking the 3 dots in the upper-right corner of Chromium or google-chrome, click More Tools > Create Shortcut... > Create

Which also creates a desktop shortcut but it won't work until this trick is done.

Here I show you how to make Instagram a desktop app.

We can see this code after creating a shortcut from chromium and opening it in a text editor

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Instagram1
Exec=/snap/chromium/2033/usr/lib/chromium-browser/chrome "--profile-directory=Profile 1" --app-id=maonlnecdeecdljpahhnnlmhbalehlm
Icon=chrome-maonlnecdeecdljpahhnnlmhbmalehlm-Profile_1
StartupWMClass=crx_maonlnecdeecdljpahhnnlmhbmalehlm

Just change

/snap/chromium/2033/usr/lib/chromium-browser/chrome or

/opt/google/chrome/google-chrome

to chromium, google-chrome, or google-chrome -incognito

If you create multiple profiles in Google Chrome, you can write like this

google-chrome --profile-directory='Default' or

google-chrome --profile-directory=Profile 1" -incognito

For example

Exec=/snap/chromium/2033/usr/lib/chromium-browser/chrome "--profile-directory=Profile 1" --app-id=maonlnecdeecdljpahhnnlmhbalehlm

will be

Exec=google-chrome --profile-directory=Profile 1" -incognito --password-store=basic --app-id=maonlnecdeecdljpahhnnlmhbalehlm

I used --password-store=basic to ignore keyring password.

For icon, I downloaded the Instagram app icon from online and showed the location like this and it worked immediately

Icon=/home/virus-attack/Icon/Google-Chrome-Google-Chrome.ico

Now you can pin this shortcut to your panel too

Harry
  • 103
  • 4
N.Ahmed
  • 150
  • 8
1

Quick start

The current way (I'm using Chrome 130.0.6723.91 under Ubuntu 24.04.1) is the more explicit "Cast, save, and share" -> "Install page as app". That works smoothly and as expected. It seems the default is now to open in a standalone window that Gnome handles as an independent app that can be started from the launcher with its own icon.

Customize the app

There is an ... -> App info menu on top of the Window, witch lets you change a few settings such as Open as window (this can be switched off to open a tab instead).

Interestingly, a gnome .desktop file is created is stored in .local/share/applications (there is also a copy in .gnome/app but at least for now it does not seem to do anything). The name is cryptic (automatically generated app ID) so you might need to find it via time stamp (e.g. ls -lrt .local/share/applications) or search by name in the file itself (e.g. grep Name= .local/share/applications/*.desktop). Here you can find things like the command line to start it under the Exec= field or edit the app name. There are not a lot of examples of how these .desktop files can be edited, but a look at the specifications is useful, e.g.:

Setting SingleMainWindow=false lets you have several windows open from the app. E.g. several google doc documents. Unfortunately at the time of writing, clicking on a link will open in Chrome, but you can immediately open back in the app and easily work with several related documents while keeping the tabs tidy.

I just see other resources in this post though the details of the specifications may be outdated.