Package web applications using nativefier
The struggle is real: for day-to-day work, leveraing several web applications such as messenger or customized booking systems is necessary. After a short time you will mostly have a flood of browser tabs and lose track.
Using nativefier it is possible to package websites into desktop applications.
Some websites and messengers offer appropriate clients (like Signal Desktop). These clients usually contain the website and an Electron environment. That's not very efficient and fast but that would be another issue. 🙂
Using nativefier
you can create such a desktop application on your own if there are no prepares packages available. The tool combines the website with Electron and generates an executable. Beside Linux, also macOS and Microsoft Windows are supported.
The tool can be installed using npm
- but luckily there is also a Docker container available. The following command generates a desktop application for Threema Web:
1$ mkdir nativefier-apps
2$ docker run -v ~/nativefier-apps:/target/ jiahaog/nativefier https://web.threema.ch/ /target/
Afterwards you will find a new directory in the nativefier-apps
folder. This folder contains the executable and some additional libraries. This could be moved to /opt
for example:
1# mv ThreemaWeb-linux-x64 /opt/threema
To ensure having the program in the start menu, a configuration (threema.desktop
) needs to be created in the folder ~/.local/share/applications
. If you plan to make the application available to multiple users, move the configuration to /usr/share/applications
.
1[Desktop Entry]
2Name=Threema Desktop
3Exec=/opt/threema/ThreemaWeb
4Type=Application
5StartupNotify=true
6Icon=/opt/threema/resources/app/icon.png
Depending on the website, an high-resolution icon is stored to resources/app/icon.png
. These icons are taken from another repository.
Afterwards, the desktop application can be started from the start menu: