firefox-nativefy.sh想要一個網站作為桌面應用程序嗎?但是是否沒有可用的官方申請(用於Linux)?您想避免鍍鉻 /電子嗎?
這是firefox-nativefy.sh :一個簡單的bash腳本,可以通過啟動firefox的自定義實例來幫助您使用firefox的本地fy網站。
首先,確保系統上安裝了Firefox。這已經是大多數Linux發行版的默認值。
然後:
# WhatsApp, Telegram and Notion are automatically detected to have correct names
./firefox-nativefy.sh web.whatsapp.com或者:
# Supply a custom name for the to-be-nativefied application
./firefox-nativefy.sh web.whatsapp.com --name " Custom Name "或者:
# Supply a custom icon after the name
./firefox-nativefy.sh web.whatsapp.com --name " Custom Name " --icon " custom-icon "或者
# Display the full help text
./firefox-nativefy.sh --help現在,您可以像其他任何安裝的應用程序一樣啟動本地化應用程序。
注意:在默認瀏覽器中啟動外部鏈接的擴展程序尚不處於活動狀態時,您第一次啟動新的本機式應用程序(除非您以前已經對其進行了本地化)。這是一個小的煩惱,實際上可能對SSO登錄很有用。
如果自本機構使用應用程序以來, firefox-nativefy.sh已更新,則只需運行與您最初相同的本機構命令。第二次以相同的URL和應用程序名稱運行firefox-nativefy.sh ,只會覆蓋應用程序快捷方式並更新Firefox配置文件中必要的內容。
您的本地應用程序將自動自動更新,因為它基本上只是一個在瀏覽器中運行的網站。
firefox-nativefy.sh通過為您想要本地化的應用程序創建自定義的Firefox配置文件,並將某些自定義應用於個人資料中,以隱藏Firefox的常規UI。它還在自定義配置文件中安裝了擴展名,以便在默認的Web瀏覽器中打開所有外部鏈接。
然後,它在用戶的應用程序文件夾中創建應用程序快捷方式( .desktop文件),以啟動使用該自定義配置文件的Firefox的新實例。
就是這樣。這很簡單。
# 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是應用程序的名稱,所有間隔都刪除了。例如,假設我們是本地貼上web.whatsapp.com作為WhatsApp Desktop 。然後,未空格的名稱是WhatsAppDesktop 。
由於: