2
if ! [ -x /snap/bin/chromium ]; then
4
echo "Command '$0' requires the chromium snap to be installed." >&2
5
echo "Please install it with:" >&2
7
echo "snap install chromium" >&2
13
OLD="chromium-browser.desktop"
14
NEW="chromium_chromium.desktop"
15
FAVS=$(gsettings get org.gnome.shell favorite-apps)
16
if echo "$FAVS" | grep -q "'$OLD'"; then
17
NEWFAVS=$(echo $FAVS | sed -e "s#'$OLD'#'$NEW'#")
18
gsettings set org.gnome.shell favorite-apps "$NEWFAVS"
22
OLD="application://chromium-browser.desktop"
23
NEW="application://chromium_chromium.desktop"
24
FAVS=$(gsettings get com.canonical.Unity.Launcher favorites)
25
if echo "$FAVS" | grep -q "'$OLD'"; then
26
NEWFAVS=$(echo $FAVS | sed -e "s#'$OLD'#'$NEW'#")
27
gsettings set com.canonical.Unity.Launcher favorites "$NEWFAVS"
30
# TODO: handle KDE and other desktop environments
32
exec /snap/bin/chromium "$@"