Ed Merrett
02/10/2025, 7:03 PMorg.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 3600
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1200
org.gnome.desktop.screensaver lock-delay uint32 30
org.gnome.desktop.screensaver lock-enabled true
org.gnome.desktop.screensaver ubuntu-lock-on-suspend true
org.gnome.desktop.session idle-delay uint32 900
Ed Merrett
02/10/2025, 7:05 PMAllen Houchins
02/10/2025, 7:19 PM#!/bin/sh
# Define the SQLite database file
DB_FILE="dconf_settings.db"
TABLE_NAME="settings"
# Dump all dconf settings into a variable
DCONF_DUMP=$(dconf dump /)
# Create the SQLite database and table
sqlite3 "$DB_FILE" <<EOF
CREATE TABLE IF NOT EXISTS $TABLE_NAME (
id INTEGER PRIMARY KEY AUTOINCREMENT,
key TEXT UNIQUE NOT NULL,
value TEXT NOT NULL
);
EOF
# Parse the dumped settings and insert them into the database
# Loop through each line of the dump
echo "$DCONF_DUMP" | while IFS= read -r line; do
if [[ "$line" == "["*"]" ]]; then
# Extract the current key namespace
NAMESPACE=$(echo "$line" | tr -d '[]')
elif [[ "$line" == *"="* ]]; then
# Split the line into key and value
KEY=$(echo "$line" | cut -d'=' -f1 | xargs)
VALUE=$(echo "$line" | cut -d'=' -f2- | xargs)
# Full key path
FULL_KEY="/$NAMESPACE/$KEY"
# Insert into SQLite database
sqlite3 "$DB_FILE" "INSERT OR IGNORE INTO $TABLE_NAME (key, value) VALUES ('$FULL_KEY', '$VALUE');"
fi
done
echo "dconf settings have been saved to $DB_FILE."
Allen Houchins
02/10/2025, 7:20 PMEd Merrett
02/10/2025, 7:27 PMorg.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 3600
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1200
org.gnome.desktop.screensaver lock-delay uint32 30
org.gnome.desktop.screensaver lock-enabled true
org.gnome.desktop.screensaver ubuntu-lock-on-suspend true
org.gnome.desktop.session idle-delay uint32 900
That seems like a really useful plan, a new native table for gsettings would be really IDEAL as could then kick off remediation scriptsAllen Houchins
02/10/2025, 7:30 PMAllen Houchins
02/10/2025, 7:30 PMgiphy
02/10/2025, 7:31 PMEd Merrett
02/10/2025, 7:31 PMAllen Houchins
02/10/2025, 10:05 PMEd Merrett
02/11/2025, 1:38 PMAllen Houchins
02/11/2025, 2:00 PMEd Merrett
02/11/2025, 2:18 PMEd Merrett
02/13/2025, 2:24 PMAllen Houchins
02/13/2025, 2:51 PMEd Merrett
02/13/2025, 2:53 PMremote: Permission to allenhouchins/fleet-stuff.git denied to edmerrett.
fatal: unable to access '<https://github.com/allenhouchins/fleet-stuff.git/>': The requested URL returned error: 403
Allen Houchins
02/13/2025, 3:06 PMEd Merrett
02/13/2025, 6:10 PMAllen Houchins
02/14/2025, 3:18 PM