Faster Loading for Linux

Share tips and tricks on how to make the best use of Slimjet
Post Reply
User avatar
oftentired
Posts: 1234
Joined: Tue May 13, 2014 3:14 am

Faster Loading for Linux

Post by oftentired » Mon Aug 07, 2017 8:21 am

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
  exit
fi
exec /usr/bin/xdg-settings "$@"
Performance is almost 200x faster than freedesktop.org's xdg-settings script
Hence distinctly swifter loading of Slimjet now!
:D
For those of you who wear aluminum foil hats, the voices lie, don't believe them!

Running 32 Bit SJ on Win 7 Pro

User avatar
stringan
Posts: 16
Joined: Tue Jun 06, 2017 8:51 am

Re: Faster Loading for Linux

Post by stringan » Mon Aug 07, 2017 5:49 pm

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 https://specifications.freedesktop.org/ ... index.html may also be of assistance.

Post Reply