The official Dropbox CLI (dropbox.py) doesn't detect the Flatpak Dropbox daemon. Commands like dropbox status report "Dropbox isn't running" even when it is.
Root cause: The CLI checks ~/.dropbox/dropbox.pid, but the Flatpak daemon writes its sandboxed PID there, which doesn't correspond to a real process on the host.
curl -sL "https://linux.dropbox.com/packages/dropbox.py" -o ~/.local/bin/dropbox
chmod +x ~/.local/bin/dropboxEdit ~/.local/bin/dropbox and replace the is_dropbox_running() function with:
def is_dropbox_running():
# Check for Flatpak or native dropbox process
import subprocess
try:
result = subprocess.run(['pgrep', '-f', 'dropbox-lnx|dropboxd'],
capture_output=True, text=True)
return result.returncode == 0
except:
pass
# Fallback to original pid file check
pidfile = os.path.expanduser("~/.dropbox/dropbox.pid")
try:
with open(pidfile, "r") as f:
pid = int(f.read())
with open("/proc/%d/cmdline" % pid, "r") as f:
cmdline = f.read().lower()
except:
cmdline = ""
return "dropbox" in cmdlineThis uses pgrep to find the actual Dropbox process on the host, falling back to the original PID file check for non-Flatpak installs.
Flatpak Dropbox doesn't autostart by default. Fix by copying the desktop entry:
cp /var/lib/flatpak/exports/share/applications/com.dropbox.Client.desktop ~/.config/autostart/dropbox status # Sync status
dropbox filestatus path # Check if a file is synced
dropbox exclude list # Show excluded folders