How to Turn a Website Into a Linux Desktop App Using Nativefier
You probably visit a particular website several times a day while working. Doing so requires you to open a browser, type in the URL, and then the website finally loads. What if you could turn the website into an app that you can launch from your Linux desktop by just double-clicking?
As it turns out, you can create a standalone Linux app for a website using a command-line utility called Nativefier. Here’s how to do that.
How to Install Nativefier on Linux
First, you need to install NPM and Nativefier on your system. To install NPM, check out our detailed guide on installing NPM on Linux.
With NPM configured, now it’s time to install Nativefier. To do so, launch the terminal and issue the following command:
npm install -g nativefier
The -g flag stands for global and commands NPM to install the package globally.
If your Linux distro supports snap, you can get the Nativefier snap package from the Snap Store using:
sudo snap install nativefier
Make sure you’ve snap installed on your system before running the above command. If not, you can refer to our guide on installing snap on Linux.
Arch users can download Nativefier from the Arch User Repository using Yay:
yay -S nodejs-nativefier
The snap and AUR repositories aren’t regularly maintained, so it’s recommended you install Nativefier using NPM.
Turning Websites Into Desktop Linux Apps
Using Nativefier is easy. To create a desktop app for a website, use the following command syntax:
By default, Nativefier will automatically assign an app name to the website. If you want your app to have a custom name, you can specify the same using the –name flag.
nativefier --name "Example Linux App" "www.example.com"
Nativefier will create a folder containing all the files necessary for the app. To get to the app file, use the cd command to navigate to the newly-created directory:
If you’re unsure about the app directory name, you can list the contents of the parent directory using the ls command.
Nativefier automatically assigns execute permissions to the generated app file, so you don’t have to. You can simply launch the executable using the following command syntax:
To get command-line help related to the utility, type:
Why Turn Websites Into Desktop Apps?
Not everyone might need to create a desktop app for websites that they visit. But for those who have to frequently browse certain websites, even a few extra clicks can be a hindrance in the work. Therefore, to keep your productivity level high and ensure that you don’t repeat the same action again and again, turning websites into desktop apps can be helpful.
It’s the same as setting up hotkeys for specific operations or creating new shell aliases for lengthier commands on Linux. All in all, having an app you can launch straight from the desktop is convenient and can occasionally save you a few clicks. And in the long run, that’s a lot of saved time.
Linux Is a Lot Better Than Other OSes
On Linux, you can be sure that if you don’t like one aspect of your system, you can switch to another one. If opening your web browser and searching for a website frequently sounds tedious, you can go for the easier route and create a keyboard shortcut, or even better, a full-blown desktop app for the website using Nativefier.
There’s a lot more you can do on Linux though. For example, you can schedule apps to run at certain times using crontab, create scripts that automatically change your wallpaper based on time, and install multiple desktop environments on a system. Some tasks are easily achieved on other operating systems like Windows, while the rest are exclusive to the Linux ecosystem.
10 Things You Can Do on Linux but Not on Windows
About The Author
(113 Articles Published)
Deepesh is the Junior Editor for Linux at MUO. He writes informational guides on Linux, aiming to provide a blissful experience to all newcomers. Not sure about movies, but if you want to talk about technology, he’s your guy.
via MUO – Feed https://ift.tt/iDOS8f6
March 20, 2022 at 03:07PM