mirror of
https://codeberg.org/claui/mobile-config-firefox.git
synced 2024-11-09 19:30:15 +00:00
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:
parent
8ec23ac39b
commit
49698e65c5
4 changed files with 8 additions and 16 deletions
6
Makefile
6
Makefile
|
@ -31,8 +31,8 @@ install: all
|
|||
install -Dm644 "out/userChrome.css" \
|
||||
"$(DESTDIR)/etc/mobile-config-firefox/userChrome.css"
|
||||
install -Dm755 "src/mobile-config-firefox.sh" \
|
||||
"$(DESTDIR)/usr/bin/mobile-config-firefox"
|
||||
install -Dm644 "src/mobile-config-firefox.desktop" \
|
||||
"$(DESTDIR)/usr/mobile-config/share/applications/org.mozilla.firefox.desktop"
|
||||
"$(DESTDIR)/usr/mobile-config/bin/firefox"
|
||||
install -Dm755 "src/mobile-config-path.sh" \
|
||||
"$(DESTDIR)/etc/profile.d/mobile-config-path.sh"
|
||||
|
||||
.PHONY: all clean install
|
||||
|
|
|
@ -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
|
|
@ -23,9 +23,9 @@ for profiledir in ~/.mozilla/firefox/*/; do
|
|||
done
|
||||
|
||||
if [ "$profile_found" = "true" ]; then
|
||||
exec firefox "$@"
|
||||
exec /usr/bin/firefox "$@"
|
||||
else
|
||||
profiledir=~/.mozilla/firefox/firefox.default
|
||||
prepare_profile "$profiledir"
|
||||
exec firefox --profile "$profiledir" "$@"
|
||||
exec /usr/bin/firefox --profile "$profiledir" "$@"
|
||||
fi
|
||||
|
|
3
src/mobile-config-path.sh
Normal file
3
src/mobile-config-path.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
export PATH="/usr/local/bin:/usr/mobile-config/bin:$PATH"
|
Loading…
Reference in a new issue