From 28909b7239e4ca496266c9f22e73fe36afc6a325 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 31 Aug 2021 15:39:20 -0500 Subject: [PATCH] Fix up MimeType entries in .desktop instructions We aso had a sed in the Makefile that changes text/html. I changed that to only look at the top 20 lines of each page. --- Makefile | 4 ++-- xsoft/graphweb/firefox-legacy.xml | 10 ++++++++-- xsoft/graphweb/firefox.xml | 12 +++++++++--- xsoft/other/thunderbird.xml | 9 ++------- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 5a6c92ca1e..81bbad66d0 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ $(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML) version tidy -config tidy.conf $$filename; \ true; \ bash obfuscate.sh $$filename; \ - sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \ + sed -i -e "1,20s@text/html@application/xhtml+xml@g" $$filename; \ done; nochunks: $(BASEDIR)/$(NOCHUNKS_OUTPUT) @@ -144,7 +144,7 @@ $(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(BLFSHTML) version @echo "Running Tidy and obfuscate.sh on non-chunked XHTML..." $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT) + $(Q)sed -i -e "1,20s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT) tmpdir: $(RENDERTMP) $(RENDERTMP): diff --git a/xsoft/graphweb/firefox-legacy.xml b/xsoft/graphweb/firefox-legacy.xml index 22597d5079..2c620f65a8 100644 --- a/xsoft/graphweb/firefox-legacy.xml +++ b/xsoft/graphweb/firefox-legacy.xml @@ -502,7 +502,11 @@ export MOZBUILD_STATE_PATH=${PWD}/mozbuild && mkdir -pv /usr/share/applications && mkdir -pv /usr/share/pixmaps && -cat > /usr/share/applications/firefox.desktop << "EOF" && +MIMETYPE="text/xml;text/mml;text/html;" && +MIMETYPE="$MIMETYPE;application/xhtml+xml;application/vnd.mozilla.xul+xml" && +MIMETYPE="$MIMETYPE;x-scheme-handler/http;x-scheme-handler/https; && + +cat > /usr/share/applications/firefox.desktop << EOF && [Desktop Entry] Encoding=UTF-8 Name=Firefox Web Browser @@ -513,10 +517,12 @@ Terminal=false Type=Application Icon=firefox Categories=GNOME;GTK;Network;WebBrowser; -MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; +MimeType=$MIMETYPE StartupNotify=true EOF +unset MIMETYPE && + ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \ /usr/share/pixmaps/firefox.png diff --git a/xsoft/graphweb/firefox.xml b/xsoft/graphweb/firefox.xml index 84e106f78f..aa21d89de5 100644 --- a/xsoft/graphweb/firefox.xml +++ b/xsoft/graphweb/firefox.xml @@ -512,9 +512,13 @@ export MOZBUILD_STATE_PATH=${PWD}/mozbuild && mkdir -pv /usr/share/applications && -mkdir -pv /usr/share/pixmaps && +mkdir -pv /usr/share/pixmaps && -cat > /usr/share/applications/firefox.desktop << "EOF" && +MIMETYPE="text/xml;text/mml;text/html;" && +MIMETYPE="$MIMETYPE;application/xhtml+xml;application/vnd.mozilla.xul+xml" && +MIMETYPE="$MIMETYPE;x-scheme-handler/http;x-scheme-handler/https; && + +cat > /usr/share/applications/firefox.desktop << EOF && [Desktop Entry] Encoding=UTF-8 Name=Firefox Web Browser @@ -525,10 +529,12 @@ Terminal=false Type=Application Icon=firefox Categories=GNOME;GTK;Network;WebBrowser; -MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; +MimeType=$MIMETYPE StartupNotify=true EOF +unset MIMETYPE && + ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \ /usr/share/pixmaps/firefox.png diff --git a/xsoft/other/thunderbird.xml b/xsoft/other/thunderbird.xml index b4cf3f1267..6cae11eaa6 100644 --- a/xsoft/other/thunderbird.xml +++ b/xsoft/other/thunderbird.xml @@ -359,10 +359,7 @@ export MACH_USE_SYSTEM_PYTHON=1 && mkdir -pv /usr/share/{applications,pixmaps} && -MIMETYPE="text/html;text/xml;application/xhtml+xml;application/xml" -MIMETYPE="$MIMETYPE;application/rss+xml;x-scheme-handler/mailto;" - -cat > /usr/share/applications/thunderbird.desktop << EOF && +cat > /usr/share/applications/thunderbird.desktop << "EOF" && [Desktop Entry] Name=Thunderbird Mail Comment=Send and receive mail with Thunderbird @@ -372,12 +369,10 @@ Terminal=false Type=Application Icon=thunderbird Categories=Network;Email; -MimeType=$MIMETYPE +MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;x-scheme-handler/mailto; StartupNotify=true EOF -unset MIMETYPE - ln -sfv /usr/lib/thunderbird/chrome/icons/default/default256.png \ /usr/share/pixmaps/thunderbird.png