Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bvobart/firefox-nativefy
Turn websites into "native" applications with Firefox (Linux-only)
https://github.com/bvobart/firefox-nativefy
firefox linux-desktop nativefier
Last synced: about 1 month ago
JSON representation
Turn websites into "native" applications with Firefox (Linux-only)
- Host: GitHub
- URL: https://github.com/bvobart/firefox-nativefy
- Owner: bvobart
- License: mit
- Created: 2023-10-30T15:13:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-10T00:33:02.000Z (about 1 year ago)
- Last Synced: 2024-09-29T11:45:31.302Z (about 2 months ago)
- Topics: firefox, linux-desktop, nativefier
- Language: Shell
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE
Awesome Lists containing this project
README
# `firefox-nativefy.sh`
Want have a website as a desktop application? But is there no official application available (for Linux)? And do you want to avoid Chrome / Electron?
Here's `firefox-nativefy.sh`: a simple Bash script to help you nativefy websites with Firefox, i.e. turn a website into a "native" application by launching a customized instance of Firefox.
## Usage
First, ensure that Firefox is installed on your system. This is already the default for most Linux distributions.
Then:
```sh
# WhatsApp, Telegram and Notion are automatically detected to have correct names
./firefox-nativefy.sh web.whatsapp.com
```or:
```sh
# Supply a custom name for the to-be-nativefied application
./firefox-nativefy.sh web.whatsapp.com --name "Custom Name"
```or:
```sh
# Supply a custom icon after the name
./firefox-nativefy.sh web.whatsapp.com --name "Custom Name" --icon "custom-icon"
```or
```sh
# Display the full help text
./firefox-nativefy.sh --help
```Now you can launch your nativefied application as you would with any other installed application.
> NOTE: the extension to launch external links in the default browser won't be active yet the first time you launch your newly nativefied application (unless you have already nativefied it previously).
> This is a minor annoyance and might in fact be useful for SSO logins.### Updating
If `firefox-nativefy.sh` has updated since you've nativefied your application, simply run the same nativefication command as you originally did.
Running `firefox-nativefy.sh` a second time for the same URL and application name will only overwrite the application shortcut and update what is necessary in the Firefox profile.Your nativefied application will update itself automatically as it is still basically just a website running in a browser.
## How it works
`firefox-nativefy.sh` works by creating a custom Firefox profile for the application that you want to nativefy,
and applies some customisations to the profile to hide Firefox' usual UI.
It also installs an extension in the custom profile so that all external links are opened in your default web browser.Then it creates an application shortcut (`.desktop` file) in your user's applications folder to launch a new instance of Firefox with that custom profile.
That's it. It's that simple.
## How to remove a nativefied app?
```sh
# Remove the application shortcut.
rm ~/.local/share/applications/$NAME_UNSPACED.desktop# Remove the Firefox profile
firefox -P # opens Firefox' profile manager
# Select the profile with the unspaced name of the app, then click 'Delete Profile ...' and click 'Delete Files'
````$NAME_UNSPACED` is the name of the application, with all spaced removed. E.g. let's say we nativefied `web.whatsapp.com` as `WhatsApp Desktop`.
Then the unspaced name is `WhatsAppDesktop`.## Credits
Thanks to:
- Reddit user LasterCow and his [Firetron](https://pastebin.com/nKsqbysD) script for the inspiration for the basics of this script.
- Firefox Extension [Open With](https://github.com/darktrojan/openwith/) for some inspiration on how to write a Firefox extension that will open links in a different browser.## TODO:
- maybe allow multiple tabs? tab bar should become visible when >= 2 tabs open