|
|
@@ -1,14 +1,81 @@
|
|
|
# GNOME Settings Backup & Restore
|
|
|
|
|
|
-[cite_start]This script is a specialized utility designed to backup, archive, and restore a complete GNOME desktop environment to another user profile[cite: 1, 16]. [cite_start]It handles the migration of themes, extensions, and low-level dconf settings while ensuring that file ownership is correctly mapped to the target user[cite: 10, 30].
|
|
|
+A robust bash utility designed to backup, archive, and restore a complete GNOME desktop environment across different user profiles. This script handles the heavy lifting of migrating dconf databases, shell extensions, and visual assets while ensuring correct file ownership on the target system.
|
|
|
|
|
|
----
|
|
|
|
|
|
## Features
|
|
|
|
|
|
-* [cite_start]**Complete Profile Capture**: Backs up dconf databases, shell extensions, icons, themes, and fonts[cite: 4, 10].
|
|
|
-* [cite_start]**Security Focused**: Explicitly scrubs `keyrings` and `kwalletd` data to ensure your sensitive credentials aren't leaked in the archive.
|
|
|
-* [cite_start]**Cross-User Migration**: Designed to restore a profile to a different username and home directory with automatic ownership fixes[cite: 16, 30].
|
|
|
-* [cite_start]**Headless dconf Loading**: Generates a helper script (`load_gnome_settings.sh`) that can load settings even without an active graphical session by spawning a temporary D-Bus[cite: 31, 32].
|
|
|
-* [cite_start]**Dry Run Support**: Includes a simulation mode to see exactly what files will be affected before any changes are made[cite: 2, 5, 23].
|
|
|
+- **Dconf Integration**: Automatically dumps and loads the dconf database to preserve system settings.
|
|
|
+
|
|
|
+- **Asset Migration**: Captures extensions, backgrounds, fonts, icons, and themes.
|
|
|
+
|
|
|
+- **Security Focused**: Aggressively scrubs `keyrings` and `kwalletd` directories to prevent sensitive credential leakage.
|
|
|
+
|
|
|
+- **Cross-User Support**: Designed specifically to restore configurations to a different username and home directory.
|
|
|
+
|
|
|
+- **Headless Capability**: Includes a helper script to load settings via a temporary D-Bus session if no graphical environment is active.
|
|
|
+
|
|
|
|
|
|
+
|
|
|
+## Usage
|
|
|
+
|
|
|
+### 1. Backup
|
|
|
+
|
|
|
+Run as your current user to create a compressed archive:
|
|
|
+
|
|
|
+Bash
|
|
|
+
|
|
|
+```
|
|
|
+./gnome-backup backup <archive_name.tgz>
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+- **Dry Run**: Use `./gnome-backup --dry-run backup <archive_name.tgz>` to simulate the process without touching files.
|
|
|
+
|
|
|
+
|
|
|
+### 2. Restore
|
|
|
+
|
|
|
+Restore the archive to a target user profile. **Requires sudo** to fix file ownership.
|
|
|
+
|
|
|
+Bash
|
|
|
+
|
|
|
+```
|
|
|
+sudo ./gnome-backup restore <archive_name.tgz> <target_home_directory> <target_username>
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+- **Example**: `sudo ./gnome-backup restore /tmp/setup.tgz /home/guest guest`
|
|
|
+
|
|
|
+
|
|
|
+### 3. Finalize
|
|
|
+
|
|
|
+Log in as the **target user** and execute the generated helper script to apply the dconf settings:
|
|
|
+
|
|
|
+Bash
|
|
|
+
|
|
|
+```
|
|
|
+./load_gnome_settings.sh
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+## Technical Details
|
|
|
+
|
|
|
+### Included Paths
|
|
|
+
|
|
|
+The script preserves the following structure:
|
|
|
+
|
|
|
+- **Config**: `monitors.xml`, `mimeapps.list`, `gtk-3.0/4.0`, `fontconfig`, `user-dirs.dirs`, `autostart`.
|
|
|
+
|
|
|
+- **Local Shares**: `gnome-shell/extensions`, `backgrounds`, `fonts`, `themes`, `icons`.
|
|
|
+
|
|
|
+- **Hidden Folders**: `.themes`, `.icons`, `.fonts`.
|
|
|
+
|
|
|
+
|
|
|
+### Automation
|
|
|
+
|
|
|
+The restore process automatically scaffolds standard XDG user directories (Desktop, Downloads, etc.) to ensure GNOME stability upon first login.
|
|
|
+
|
|
|
+
|
|
|
+## Troubleshooting
|
|
|
+
|
|
|
+If you encounter "Permission denied" errors during dconf loading, ensure the `.cache/dconf` directory exists. This script attempts to pre-create this for you during the restore phase.
|