Automated installer for odrive sync agent on Linux with KDE desktop integration.
- Automatic Installation: Downloads and installs odrive sync agent binaries
- KDE Integration: Creates file associations and context menu for Dolphin
- Idempotent: Can be run multiple times safely without duplicating work
- KDE Plasma 5 & 6 Compatible: Automatically detects and creates appropriate service menus
./install-odrive-linux.sh
Options:
./install-odrive-linux.sh
- Normal installation (skip existing files)./install-odrive-linux.sh --force
- Force reinstall (overwrite existing files)./install-odrive-linux.sh --help
- Show help message
Requirements:
- Linux system with KDE desktop environment
curl
installedpython
orpython3
installedodrive-icon.png
file in the same directory as the script
- Downloads odrive sync agent (64-bit) to
~/.odrive-agent/bin/
- Creates mount directory at
~/odrive-agent-mount/
- Installs icon to
/usr/share/icons/odrive.png
- Creates file associations for
.cloud
and.cloudf
files:- Double-click on cloud files automatically syncs them
- Files are associated with odrive in system file manager
- Installs MIME type definitions:
- Registers
.cloud
and.cloudf
file extensions with the system - Enables proper file recognition and icon display
- Registers
- Adds KDE context menu in Dolphin:
- Right-click on
.cloud
and.cloudf
files shows sync options:- "odrive sync" - Sync single file/folder
- "odrive sync all (recursive)" - Recursively sync entire folder contents
- "odrive unsync" - Convert back to placeholder
- Right-click on any folder shows "odrive unsync" option
- Compatible with both KDE Plasma 5 and 6
- Right-click on
- Sets up systemd user service (optional):
- Enables automatic startup at boot
- Provides crash recovery and restart functionality
Create an account at odrive.com if you don't have one.
- Navigate to your odrive Auth Codes page
- Click "Create Auth Key"
- Copy the generated authentication key
python ~/.odrive-agent/bin/odrive.py authenticate [your-auth-key]
Mount entire odrive root:
python ~/.odrive-agent/bin/odrive.py mount ~/odrive-agent-mount /
Mount specific cloud storage:
# Mount Google Drive Documents folder
python ~/.odrive-agent/bin/odrive.py mount ~/Documents "/Google Drive/Documents"
# Mount Dropbox folder
python ~/.odrive-agent/bin/odrive.py mount ~/Dropbox "/Dropbox"
Important Notes:
- Do not mount root (
/
) to an existing local folder containing data - Use separate, empty directories for mounting
- Once mounted,
.cloud
and.cloudf
files represent your cloud content
After mounting, you'll see your cloud services as placeholder files:
.cloudf
files: Folders (not yet synced).cloud
files: Individual files (not yet synced)
# Check what cloud services are available
python ~/.odrive-agent/bin/odrive.py syncstate ~/odrive-agent-mount
Sync a cloud folder:
# Sync your Google Drive (expands .cloudf to folder)
python ~/.odrive-agent/bin/odrive.py sync ~/odrive-agent-mount/"GDrive Personale.cloudf"
# Sync Dropbox
python ~/.odrive-agent/bin/odrive.py sync ~/odrive-agent-mount/"Dropbox.cloudf"
# Sync OneDrive
python ~/.odrive-agent/bin/odrive.py sync ~/odrive-agent-mount/"OneDrive.cloudf"
Sync individual files:
# Download a specific document
python ~/.odrive-agent/bin/odrive.py sync ~/odrive-agent-mount/"MyDocument.pdf.cloud"
# Sync a Google Docs file
python ~/.odrive-agent/bin/odrive.py sync ~/odrive-agent-mount/"My Presentation.gslidesx.cloud"
Sync everything in a folder:
# First, sync the folder to see its contents
python ~/.odrive-agent/bin/odrive.py sync ~/odrive-agent-mount/"GDrive Personale.cloudf"
# Then check what's inside
python ~/.odrive-agent/bin/odrive.py syncstate ~/odrive-agent-mount/"GDrive Personale"
# Sync a specific subfolder
python ~/.odrive-agent/bin/odrive.py sync ~/odrive-agent-mount/"GDrive Personale"/"Documents.cloudf"
Sync all cloud files in current folder:
# Navigate to your mount point
cd ~/odrive-agent-mount/"GDrive Personale"
# Sync all .cloud files (downloads all files)
find . -name "*.cloud" -exec python ~/.odrive-agent/bin/odrive.py sync "{}" \;
# Sync all .cloudf folders (expands all folders)
find . -name "*.cloudf" -exec python ~/.odrive-agent/bin/odrive.py sync "{}" \;
# Check overall odrive status
python ~/.odrive-agent/bin/odrive.py status
# Check sync state of a specific folder
python ~/.odrive-agent/bin/odrive.py syncstate ~/odrive-agent-mount/"GDrive Personale"
# Monitor sync progress
python ~/.odrive-agent/bin/odrive.py syncstate ~/odrive-agent-mount --recursive
Sync only documents:
cd ~/odrive-agent-mount/"GDrive Personale"
find . -name "*.pdf.cloud" -exec python ~/.odrive-agent/bin/odrive.py sync "{}" \;
find . -name "*.gdocx.cloud" -exec python ~/.odrive-agent/bin/odrive.py sync "{}" \;
find . -name "*.gslidesx.cloud" -exec python ~/.odrive-agent/bin/odrive.py sync "{}" \;
Sync a project folder:
# Expand the coding projects folder
python ~/.odrive-agent/bin/odrive.py sync ~/odrive-agent-mount/"GDrive Personale"/"Git.cloudf"
# Then sync all repositories inside
cd ~/odrive-agent-mount/"GDrive Personale"/"Git"
find . -name "*.cloudf" -exec python ~/.odrive-agent/bin/odrive.py sync "{}" \;
If you enabled the systemd service during installation:
# Check service status
systemctl --user status odrive.service
# Start/stop service manually
systemctl --user start odrive.service
systemctl --user stop odrive.service
# View service logs
journalctl --user -u odrive.service
# Disable autostart
systemctl --user disable odrive.service
~/.odrive-agent/bin/ # odrive binaries
~/odrive-agent-mount/ # mount point for cloud files
~/.local/share/applications/ # .desktop files for file associations
~/.local/share/mime/packages/ # MIME type definitions
~/.config/systemd/user/odrive.service # systemd user service
/usr/share/icons/odrive.png # odrive icon
~/.local/share/kio/servicemenus/ # KDE6 service menu
~/.local/share/kservices5/ServiceMenus/ # KDE5 service menu (if detected)
If the right-click context menus don't appear:
-
Check if service menu files are executable:
ls -la ~/.local/share/kio/servicemenus/ chmod +x ~/.local/share/kio/servicemenus/*.desktop
-
Rebuild KDE cache and restart Dolphin:
kbuildsycoca6 update-desktop-database ~/.local/share/applications/ killall dolphin
For KDE Plasma 5, use
kbuildsycoca5
instead ofkbuildsycoca6
. -
Check recursive sync debug logs:
tail -f ~/.odrive-agent/log/recursive-sync-debug.log
- odrive agent logs:
~/.odrive-agent/log/main.log
- systemd service logs:
journalctl --user -u odrive.service
- Advanced configuration:
~/.odrive-agent/odrive_user_general_conf.txt
For automated syncing, see the forum discussions:
For more advanced Python utilities: odrive-utilities