Mimick Mozilla Prism with profiles and KDE
Once upon a time, web browsers were primarily meant for navigating websites and reading content.
Obviously, you could also interact with other users. You could, for example, write messages in forums, bug trackers, leave comments on websites… In most cases, you send a piece of text to a server, which would update the webpage and tell your browser to reload it. No need for Javascript or interactive content.
Today most web pages are much more interactive, bloated, and flexible.
For example, ads rely now on Javascript and other trackers to observe what the user is doing.
Some pages seem to like infinite scroll, where the content is loaded dynamically without reloading the whole page.
Some content is hidden or shown dynamically, depending on how the user behaves, what he clicks, and how his software is configured.
While those are annoyances if you still want to read a document or link to it, the shift in technologies also made it possible to create "web applications".
Those can vary from a simple text box where you paste some text, click apply, and obtain a textual response (without the need to send any content to a server), to more complex solutions like an entire office or mail suite, chat programs, or videoconference programs.
Mozilla Prism
Unfortunately the web browser, which was originally designed for reading documents, is not an ideal environment for running applications. It is frustrating and time-consuming to wade through a mass of browser windows and tabs just to find your email client. Unstable applications can slow down or crash your entire browser.
About Prism
One of the main motivations of Mozilla Prism is still true today.
Searching for an application in the browser, where there are already a dozen open tabs, is time-consuming, compared to switching native application.
In part, because I do not have as many native applications open at the same time as webpages (it is easy to find a program on your PC again, less so finding a webpage you want to read later).
Another reason is that I have more flexibility for managing local applications; I can put them, for example, side-by-side, on different monitors, on different virtual monitors…
On the other hand, in the browser, every page is a separate web app (or a collection of web apps if the author of the webpage chooses so).
Granted, it is possible to detach a tab as a separate window (unless on a phone AFAIK), but it needs to be done manually, and all those applications will all have the same icon, making it more difficult to distinguish them (especially in the taskbar).
Mozilla Prism not only gave the possibility to handle and wrap webpages in separate site-specific browsers but also tried to address the point that web apps could not easily access a set of features available to native applications
And many of the conveniences offered by modern operating systems are unavailable to web apps running in the browser
About Prism
Maybe, if Mozilla Prism had not shut down more than ten years ago, this approach would have permitted leaving the browser as an optimized tool for navigating and reading and having web apps as separate applications.
Current status
As of today, any website can
-
use your CPU for mining cryptocurrencies
-
access your microphone and webcam
-
show you unwanted videos (the autoplay feature is probably one of the most misused, even in payd products)
-
Interact with system notifications (like videos with autoplay, or websites misusing the notification system)
even if the end-user just wants to read a piece of text.
In my browser, most tabs are about pages where I want to read something. Maybe a couple of sites are those where I have to interact with it.
And last, there might be some random websites I wish would not even show up in the history of my browser, as they looked interesting, but are so difficult to use that I do not want to spend any more time on them.
One approach I am using more and more often is to take advantage of browser profiles. In my example, I am using Firefox, but I suppose that all Chromium-based browsers also support profiles.
What are profiles
In Firefox, a profile is a collection of settings, bookmarks, passwords, add-ons, and other data generated by the user while using the browser (cookies too).
With the profile manager (accessible from about:profiles
, or by executing firefox -P
), it is possible to create and delete profiles.
Profiles can be used, for example, for having two or more independent browser sessions.
A common use case would be having a "personal" profile, and one for work.
A generic web-app
Suppose you want to use a program like Whatsapp or Microsoft Office. Both do have native applications for other operating systems, but not for a generic GNU/Linux system, thus one has to fall back to a browser-based solution.
Another use case would be a "browser-only" application, for example, cryptad.fr.
My workflow is more or less to create a new profile with firefox -p
, open it, configure it (accept cookies, install add-ons, …), and pin the website I’m interested in.
This is 99% of the work and can be done on all desktop operating systems.
The main issue is that the web app is hard to distinguish from others because it uses the same name and icon (the one of Firefox).
On GNU/Linux (unfortunately not on all Desktop Environments and not with all Programs), it is possible to change the name of a window.
Firefox supports the --class
parameter, thus no need to use external tools like xdotool
.
Note 📝 | --class does not seem to have any effect on Windows. |
firefox -p ms-office --class ms-office
Changing the application name, on KDE, has the effect that the different browser instances are not grouped in the panel (unless grouping is completely disabled). The icon, on the other hand, cannot be changed directly from Firefox.
At least on KDE changing the icon is extremely easy. It is sufficient to add Icon
and StartupWMClass
to the desktop file used by the menu
[Desktop Entry] Categories=Network;WebBrowser; Comment=Whatsapp Web Exec=firefox -p whatsapp --class whatsapp Icon=/home/fekir/.local/share/applications/whatsApp.png Name=whatsapp StartupWMClass=whatsapp Terminal=false Type=Application
Conclusion
While on KDE, with Firefox, it is possible to take a web app and make it appear a little more native, this approach does not work on most operating systems and with most Desktop environments.
There are probably other workarounds for other systems, and while this approach works relatively well I’m not too happy about it.
Probably the idea of having a full browser for a single application does not compel me that much.
Do you want to share your opinion? Or is there an error, some parts that are not clear enough?
You can contact me anytime.