Dropbox on non-supported Linux

When installing Dropbox in a non-supported distro like Mageia, you'l soon encounter the problem, that starting Dropbox upon login to the UI (in this case: KDE) is not that easy.

Once you downloaded the Dropbox-Distribution and installed it as described here, you should also download the CLI-script provided by Dropbox from here. After this, you can use the following script to automatically start Dropbox after login with KDE; is should be in the same directory as the CLI-Script.

#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ -z "$DROPBOXPY" ]]; then
  DROPBOXPY="$DIR/dropbox.py"
else
  echo "Using preconfigured dropbox.py from $DROPBOXPY."
fi

if [ -f $DROPBOXPY ]; then
  echo "Found $DROPBOXPY. Check if the daemon is running..."
  eval "$DROPBOXPY running"
  RUNNING=$?
  if [ $RUNNING -eq 0 ]; then
    echo "Nope. Start it..."
    eval "$DROPBOXPY start"
  else
    echo "Yes, nothing to do."
  fi
else
  echo "Cannot find / load dropbox.py."
fi

This script does not take any arguments by default, but simply asks the Dropbox' CLI-Script to start the daemon; hence can be run by KDE's Autostart-System:

Picture of Dropbox configured for autostart with KDE

edit: if dropbox.py results in the error

Traceback (most recent call last):
  File "/home/alex/.dropbox-dist/dropbox.py", line 25, in <module>
    import locale
  File "/usr/lib64/python2.7/locale.py", line 18, in <module>
    import operator
ImportError: /home/alex/.dropbox-dist/operator.so: undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString

you might place both dropbox.py and the starter-script into a different folder than the one created by the Dropbox-installer (which is ~/.dropbox-dist). E.g. use ~/.dropbox for both files, this should do the trick. Dropbox itself uses a custom build of Python, with some not-so-compatible libraries coming along.

Now, once we have installed Dropbox, we might want Dolphin to show the status of files and folders in our Dropbox. Well, there's a Plugin available for download in Dolphin's settings that adds some Dropbox-specific menu entries to the context menu, but it doesn't provide icon overlays. Another plugin written by Thomas Richard, however not available via the wizard, does.

You can download, compile and install the plugin with the following commands (you need CMake installed for this):

git clone git://anongit.kde.org/scratch/trichard/dolphin-box-plugin.git
cd dolphin-box-plugin/
cmake . -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
su -c 'make install'

The kde4-config-Part was taken from a commend at the Plugin's "Homepage" and ensures that the plugin get's installed into the right directory. After installing, you have to restart dolphin; after that, you get some pretty cool icons floating above the file and folder icons in your Dolphin indicating the sync-status of your files!

Posted in English, Software

Leave a Reply

Your email address will not be published. Required fields are marked *

*