Page 1 of 1

Faster Loading for Linux

Posted: Mon Aug 07, 2017 8:21 am
by oftentired
User stringan posted this script in another subject.
stringan wrote:Have now fronted xdg-settings with a script something like this:

Code: Select all

#!/usr/bin/env bash
# Fast wrapper to check default browser; save as /usr/local/bin/xdg-settings
if [[ "$1 $2" == "check default-web-browser" ]]; then
  def="$(sed -r "/^\[Default Applications\]/,/^\[/!d;/^x-scheme-handler\/http=/!d;s///;s/;.*//" ~/.config/mimeapps.list)"
  if [[ $def == $3 ]]; then echo yes; else echo no; fi  # Check <default>.desktop against <test>.desktop
exec /usr/bin/xdg-settings "$@"
Performance is almost 200x faster than's xdg-settings script
Hence distinctly swifter loading of Slimjet now!

Re: Faster Loading for Linux

Posted: Mon Aug 07, 2017 5:49 pm
by stringan
Thanks @oftentired for publicizing this further.
Of course, depending on what Linux desktop environment you use, your method of checking the default browser may have to differ from the one I described.
The specification at ... index.html may also be of assistance.