2.2 KiB
Nativefier
Nativefier is an command-line tool to create desktop apps from websites. This way a single website can be used as an application in contrast to opening it in a browser. It uses Electron which in turn uses Chromium.
Setup
Nativefier is available on GitHub.
Additionally for some Linux distributions like
Arch Linux' AUR it is available via a
package often called nodejs-nativefier
.
Usage
This section addresses various usages of Nativefier.
Creating an Application from a Website
The following command example creates an Electron desktop application in a folder inside the home
directory.
The app will be named Mastodon
will be x64
compatible with a resolution
of 1024
x768
pixel.
It will create an icon in the systems tray
and disable the Chromium developer tools
(disable-dev-tools
).
The website to make into the application will be https://mastodon.technology
.
Change these values accordingly.
nativefier --name Mastodon \
--platform linux --arch x64 \
--width 1024 --height 768 \
--tray --disable-dev-tools \
--single-instance https://mastodon.technology
By default URLs that are not belonging to the one that is given by --single-instance
will be
blocked.
There is an unchangeable whitelist.
Single URLs that are not on the whitelist can be excluded and so not be blocked by using the
--internal-urls
flag.
A complete example using this flag can look like the following.
nativefier --name Mastodon \
--platform linux --arch x64 \
--width 1024 --height 768 \
--tray --disable-dev-tools \
--internal-urls 'outlook.office365.com/*' \
--single-instance https://mastodon.technology
Navigating Back and Forward
In a normal browser there are buttons to navigate back and forth through
the history of a tab.
On Nativefier this can be achieved by pressing the Alt
-key and selecting View
and Back
- or
Forward
.
This can also be achieved by pressing Alt
+Left Arrow
for going back and Alt
+Right Arrow
for
going forwards.