src: wrap firefox binary, not .desktop entry

Instead of trying to override the .desktop entry of Firefox by
installing the custom one and adjusting XDG_DATA_DIRS, just wrap the
firefox binary directly and adjust PATH. The former did not work with
Phosh, and on second thought, wrapping the binary is what's really
necessary. The launcher would have been just another useless layer.
This commit is contained in:
Oliver Smith 2020-08-07 23:10:52 +02:00
parent 8ec23ac39b
commit 49698e65c5
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 8 additions and 16 deletions

View file

@ -31,8 +31,8 @@ install: all
install -Dm644 "out/userChrome.css" \ install -Dm644 "out/userChrome.css" \
"$(DESTDIR)/etc/mobile-config-firefox/userChrome.css" "$(DESTDIR)/etc/mobile-config-firefox/userChrome.css"
install -Dm755 "src/mobile-config-firefox.sh" \ install -Dm755 "src/mobile-config-firefox.sh" \
"$(DESTDIR)/usr/bin/mobile-config-firefox" "$(DESTDIR)/usr/mobile-config/bin/firefox"
install -Dm644 "src/mobile-config-firefox.desktop" \ install -Dm755 "src/mobile-config-path.sh" \
"$(DESTDIR)/usr/mobile-config/share/applications/org.mozilla.firefox.desktop" "$(DESTDIR)/etc/profile.d/mobile-config-path.sh"
.PHONY: all clean install .PHONY: all clean install

View file

@ -1,11 +0,0 @@
[Desktop Entry]
Exec=mobile-config-firefox %u
Icon=firefox
Type=Application
Terminal=false
Name=Firefox
GenericName=Web Browser
MimeType=text/html;
StartupNotify=true
Categories=Network;WebBrowser;
StartupWMClass=firefox

View file

@ -23,9 +23,9 @@ for profiledir in ~/.mozilla/firefox/*/; do
done done
if [ "$profile_found" = "true" ]; then if [ "$profile_found" = "true" ]; then
exec firefox "$@" exec /usr/bin/firefox "$@"
else else
profiledir=~/.mozilla/firefox/firefox.default profiledir=~/.mozilla/firefox/firefox.default
prepare_profile "$profiledir" prepare_profile "$profiledir"
exec firefox --profile "$profiledir" "$@" exec /usr/bin/firefox --profile "$profiledir" "$@"
fi fi

View file

@ -0,0 +1,3 @@
#!/bin/sh
export PATH="/usr/local/bin:/usr/mobile-config/bin:$PATH"