2022-07-03

If GNOME Shell crashes during startup it automatically disables all extensions in case one was responsible. For crashes not caused by extensions, however, this behavior is unhelpful.

A simple prompt on startup can assist with recovery from that situation:

screenshot of notification
#!/usr/bin/env bash
set -Eeuo pipefail

[[ "$(gsettings get org.gnome.shell disable-user-extensions)" == 'true' ]] || exit

case "$(notify-send --urgency 'critical' --icon 'extensions' \
'Extensions have been automatically disabled.' \
--action 'enable=Re-Enable' \
--action 'settings=Settings…')
"
\
in
'enable') gsettings set org.gnome.shell disable-user-extensions 'false';;
'settings') gnome-extensions-app & disown;;
esac