• 1 Post
  • 12 Comments
Joined 11 months ago
cake
Cake day: September 5th, 2024

help-circle
  • I use something like this:

    #!/bin/bash
    
    set -euo pipefail
    URLS=(
        'https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/'
        'https://addons.mozilla.org/en-US/firefox/addon/privacy-badger17/'
        'https://addons.mozilla.org/en-US/firefox/addon/passff/'
        'https://addons.mozilla.org/en-US/firefox/addon/copy-plaintext/'
        'https://addons.mozilla.org/en-US/firefox/addon/duckduckgo-for-firefox/'
        'https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/'
        'https://addons.mozilla.org/en-US/firefox/addon/clearurls/'
        'https://addons.mozilla.org/en-US/firefox/addon/temporary-containers/'
        'https://addons.mozilla.org/en-US/firefox/addon/consent-o-matic/'
    )
    
    DOWNLOAD_BASE_URL='https://addons.mozilla.org/firefox/downloads/latest'
    _="${FIREFOX:=firefox}"
    _="${DST:=/usr/lib/$FIREFOX/browser/extensions}"
    
    if [ $UID -eq 0 ]; then
        SUDO=
    else
        SUDO=sudo
    fi
    
    
    download_links=()
    for url in "${URLS[@]}"; do
        package_name="$(sed 's_/$__' <<< "$url" | awk -F/ '{print $NF}')"
        download_links+=("$DOWNLOAD_BASE_URL/$package_name/addon-$package_name.xpi")
    done
    
    workdir="$(mktemp --directory)"
    cd "$workdir"
    for url in "${download_links[@]}"; do
        curl -OL "$url"
    done
    
    for ext in *.xpi; do
        ext_id="$(unzip -p "$ext" 'manifest.json' | jq -r '(if .browser_specific_settings then .browser_specific_settings else .applications end).gecko.id')"
        target="$DST/$ext_id.xpi"
        echo "$ext -> $target"
        $SUDO install -Dm644 "$ext" "$target"
    done
    

    That doesn’t handle the extension config though.





  • redxef@feddit.orgtoLinux@lemmy.mlWhy do we hate SELinux?
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    edit-2
    5 months ago

    Docker container can’t read a bind mount. Permission issue? No, it’s SELinux, again. And I didn’t even install it explicitly, it just got pulled in by another package.

    And to be clear, the issue isn’t SELinux really, but unexpected non standard behaviour which I never asked for (never explicitly installed it).


  • redxef@feddit.orgtoLinux@lemmy.mlMore info on pixel 4a battery nerf by Google
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    6 months ago

    Seems like I have an affected device. No thanks to google for helping me figure that out. Their useless page shows no information regarding that. Had to look at the serial number of the battery: sudo cat /sys/class/power_supply/battery/serial_number. Which contains the string from the mastodon post.

    Now, I have a custom ROM, so that means I won’t suffer degraded battery capacity, it just might be dangerous to continue to use my phone.