- Musl based distro archive.
- Appimagetool.
- Text editor.
-
Download Musl based distro archive / rootfs ! I use alpine linux minirootfs.
-
Make a directory called
Firefox.Appdir
!$ mkdir Firefox.Appdir
-
Extract the rootfs into
Firefox.Appdir
!$ tar -xf /path/to/rootfs -C Firefox.Appdir
-
Enter chroot and install Firefox package and its dependencies !
$ sudo chroot Firefox.Appdir /bin/bash # apk update # apk upgrade # apk add firefox -i
-
Exit chroot and enter the
Firefox.Appdir
directory ! -
Copy firefox desktop file and icon to
Firefox.Appdir
!$ cp -r usr/share/applications/firefox.desktop . $ cp -r usr/share/icons/hicolor/scalable/apps/firefox.svg .
-
Create AppRun file which contains script to launch Firefox ! Don't forget to do
chmod +x
!$ touch AppRun $ vim AppRun $ chmod +x AppRun
The AppRun file contains these lines :
#!/bin/bash HERE="$(dirname "$(readlink -f ""${0})")" exec env MOZ_LEGACY_PROFILES=1 LD_LIBRARY_PATH=${HERE}/usr/lib:${HERE}/lib:${HERE}/usr/lib/firefox ${HERE}/usr/lib/firefox/firefox "$@"
-
Test the AppRun file by running it with
./AppRun
! -
Change directory to one upper level by running
cd ..
! -
Build the appimage using
appimagetool
!$ /path/to/appimagetool-x86_64.AppImage -v -n Firefox.Appdir/
-
Test the appimage !
$ chmod +x ./Firefox-x86_64.AppImage $ ./Firefox-x86_64.AppImage
After testing for several times, we found some issues :
- By default, the appimage will use default profile, it leads to
Welcome to Firefox
tab always appear everytime we launch the appimage. Also, the default profile seems to make bookmark(s), histories seem unsaved. In fact, all bookmark and history will be saved to random profile. It will be safe to usedefault release
profile, just launch the appimage using-P
option and choosedefault profile
. We also can specify the profile using--profile ~/.mozilla/firefox/the_id.default-release
. We also can useMOZ_LEGACY_PROFILES=1
to prevent per installation profiles. - Some sites will have ugly font appearance, unless you uncheck
Allow pages to choose their own fonts, instead of your selections above
on font setting. - Huge appimage size, the appimage is shipped not only with firefox, but also its dependencies. The uncompressed appimage size is about 680 MB and the appimage size is about 200 MB.