Rclone-Based Google Drive Sync Integration for GNOME

KeePassXC Sync with Google Drive via Executor GNOME Shell Extension

This project provides a solution to keep your KeePassXC .kdbx password database (or any other file) synchronized between your local machine and cloud storage (i.e. Google Drive) using rclone and the Executor - Gnome Shell Extension. It includes two bash scripts:


Features

Prerequisites

Download Scripts

Save the following two scripts to your local machine:

Adjust the following variables inside the scripts to fit your environment:

Variable Description Example
LOCAL_FILE Path to your local file LOCAL_FILE="$HOME/Passwords.kdbx"
REMOTE_FILE Temporary file location for downloads REMOTE_FILE="/tmp/Passwords_tmp.kdbx"
STATUS_FILE Path to status tracking file STATUS_FILE="/tmp/rclone_status.txt"
SYNC Location of rclone-sync.sh script SYNC="$HOME/.local/share/bin/rclone-sync.sh"
CLOUD_DIR Remote cloud directory (not file) CLOUD_DIR="remote:/path"
CLOUD_FILE Remote cloud file location CLOUD_FILE="remote:/path/Passwords.kdbx"

Make scripts executable

chmod +x /path/to/rclone-sync.sh /path/to/sync-status-display.sh

Configure Executor extension

  1. Open GNOME Extensions app, find Executor extension and open its preferences or open directly from the terminal:
     gnome-extensions prefs executor@raujonas.github.io
    
  2. Add a new command for syncing:

    • Command: /path/to/rclone-sync.sh

    • Run every: 600 seconds (15 minutes)

  3. Add a new command for display/status updates:

    • Command: /path/to/sync-status-display.sh

    • Run every: 10 seconds

  4. Save and enable both commands.

How it works

Manual Usage

You can manually run sync script anytime:

./rclone-sync.sh

Or display script:

./sync-status-display.sh

Troubleshooting

Customization

Example Directory Structure

$HOME/.local/share/bin/
  ├─ rclone-sync.sh
  └─ sync-status-display.sh

/tmp/
  ├─ rclone_status.txt
  └─ Passwords_tmp.kdbx (temporary)
  
$HOME/
  └─ Passwords.kdbx (local KeePassXC database)