1

Google Chrome has an option to launch a web page as a windowed 'Chrome app', which, when used with Gnome Desktop, will create a special .desktop file which can be used to run Chrome in a stand-alone mode with its own icon displayed in the dash/dock and window switcher.

The problem with this mode is that Chrome tries to impersonate the GTK theme resulting in a pretty ugly window title. It also takes up unnecessary space displaying the address bar and other controls at the top of the window. This is especially true when using an insecure connection, which is typical for accessing locally-hosted applications.

An alternative is to launch Chrome with a --app=http://example.com option, which results in a much nicer experience. A comparison of the appearance of the two modes is at the end of this question.

I can create a .desktop file to launch Chrome with the --app option and an icon I specify, but this results in the new window being grouped with other Chrome instances, which all share the same generic Chrome icon entry in the dash/dock and window switcher.

Is there an option, either in Chrome or Gnome, to force the window that results from the .desktop file to behave as a completely separate application?

Google Chrome app: Chrome app

Google Chrome with --app option: Chrome with --app option

1

Using applicationize to create chrome apps. Create extension

Drop your extension in chrome://extensions Chrome extensions

An example of a .desktop file:

[Desktop Entry]  
Version=1.0  
Type=Application  
Name=Netflix Chrome (Application).  
GenericName=Netflix Browser  
Categories=Network;WebBrowser;  
Exec=/opt/google/chrome-unstable/chrome --user-data-dir=/home/USER/.config/google-chrome-netflix --profile-directory=Netflix --class=google-chrome-netflix --app-id=mhmidglabaofnaganlmeicdfedljohpf --flag-switches-begin --flag-switches-end %U  
Icon=chrome-mhmidglabaofnaganlmeicdfedljohpf-Netflix  
MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;  
StartupNotify=true  
Terminal=false  
StartupWMClass=crx_mhmidglabaofnaganlmeicdfedljohpf

Don't forget to adjust --user-data-dir= and extension id.

| improve this answer | |
  • Nice clean solution. – Jonathan Holvey Mar 16 at 21:05
  • yepp, start using it myself. – bac0n Mar 16 at 21:08
1

I found the solution here:

https://blog.aldomann.com/jupyterlab-desktop-on-linux/

Create the jupyter-lab.desktop:

touch ~/.local/share/applications/jupyter-lab.desktop

Then write the code below (Replace <user> by your username) and save it:

[Desktop Entry]
Version=1.0
Type=Application
Name=JupyterLab
GenericName=JupyterLab
Comment=JupyterLab is the next-generation web-based user interface for Project Jupyter
Keywords=python;tensorflow;keras
Exec= bash -c "/usr/bin/env PATH=/home/<user>/.anaconda3/bin/:$PATH /home/<user>/.anaconda3/bin/jupyter lab"
StartupWMClass=Google-chrome
Categories=Development;Science;IDE;Qt;
Icon=jupyter-lab
Terminal=true
StartupNotify=true
MimeType=text/x-python3;text/x-python;application/x-ipynb+json;e

Restart Gnome section (Press Alt+F2 and inside of the dialog write 'r')

Create a new .desktop file to Google Chrome:

cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications/google-chrome.desktop

Then if not exist a line with StartupWMClass=google-chrome add this line otherwise replace it by the code below:

StartupWMClass=google-chrome

Get an icon to Jupyter. For example:

https://blog.aldomann.com/assets/img/jupyter-lab.svg

and save it at ~/.local/share/icons.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.