• 2 Posts
  • 19 Comments
Joined 1 year ago
cake
Cake day: September 5th, 2024

help-circle


  • All the important login information should just be present somewhere in your home folder. If you back that up and restore it later you should be fine, no need to save the dropbox binary.

    If that is no option and you only want to back up dropbox files and nothing else follow the instructions below (I can’t guarantee that they will work, but they should):

    Back up the whole system, if something goes wrong you can at least restore to a working state. Read the instructions at least once completely before following them.

    Look at the documentation for dropbox to see which files are relevant and need backing up. Its the Dropbox folder with all the files, but will probably be some folders/files in your $HOME too, which store login information. Lets hope that they don’t store some metadata there that will invalidate the config if it’s running on a different machine (to prevent what you are trying to do).

    If there is no documentation, you can stop dropbox completely. Look for dropbox processes that don’t get stopped when you stop the GUI with something like pgrep -f -i dropbox.

    Once you are sure all dropbox processes are stopped run inotifywait -r -m ~. That command wont exit unless you stop it by issuing ^C. It will list all filesystem events in your home directory. Now start dropbox and see which files it accesses, those are the files you need to back up. It will probably be one or more whole directories in ~/.config and ~/.local.

    Add those files to a tar archive using something like this: tar cvJf dropbox_config.tar.xz [list of folders...]. Savre the resulting tar file somewhere else, reinstall and extract it using tar xvJf dropbox_config.tar.xz. Take care to run those commands from the same directory.

    The dropbox login secrets might also be stored in your system’s keyring, if you are using GNOME, then that will be GNOME Keyring. Open your system’s credential manager and look for stuff related to dropbox. Look for instructions on how to back up and restore those secets. I don’t use that often enough to be able to give you more detailed instructions right now though.

    References

    Edit:

    • backups
    • keyring

  • 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
    9 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
    ·
    11 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.