Dropbox

From Gentoo Wiki
Jump to: navigation, search

Dropbox is a closed source file synchronization and cloud service utility built from open and closed source software.

Installation

USE flags

USE flags for net-misc/dropbox Dropbox daemon (pretends to be GUI-less)

X Add support for X11
librsync-bundled Use bundled librsync library
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur

Emerge

root #emerge --ask net-misc/dropbox

Configuration

Set the DROPBOX_USERS variable to the regular user name in /etc/conf.d/dropbox

root #nano -w /etc/conf.d/dropbox

DROPBOX_USERS="user_name"

Adding to runlevel

OpenRC

OpenRC users can add the Dropbox init script to the default runlevel with the following:

root #rc-update add dropbox default

systemd

systemd users have to pass a username as the instance identifier to enable it:

root #systemctl enable dropbox@<user_name>

Be sure to replace <user_name> in the example above with the appropriate local machine user name.

To display a tray-icon you have to define which display to use:

root #systemctl edit dropbox@<user_name>
CODE Adding display for DropBox
[Service]
Environment=DISPLAY=:0

service

Now as a regular user run the command line shown below:

user $dropbox start

Which will create these directories in the user's directory:

  • Dropbox/
  • .dropbox-dist/
  • .dropbox/
Note
The command line above will also launch the Dropbox login window. Enter credentials or register an existing account to finish up the installation.
Note
The instructions shown above will not result in a GUI launcher for Dropbox being integrated into the window manager or desktop environment, so it seems. At least, some users have reported with XFCE4. A Dropbox launcher may need to be created for each desktop environment.

Xfce

Launcher

To create a Dropbox launcher for Xfce,

Download an icon and copy it into the /opt/dropbox/images/hicolor/16x16/ directory.

Here is a screenshot of the the launcher properties window:

Dropbox launcher screenshot.png

KDE

KDE4

Adding Dropbox ServiceMenu to Dolphin, which allows easy access to most of Dropbox features. It uses Dropbox CLI to generate public urls, and pyndexer to allow sharing directories in public folder.

Download scripts and unzip it.

user $tar xvzf *DropboxServiceMenu*.tar.gz

Then you can use install script, which makes it all himself.

user $./install-it.sh

After install you must some edit script, because original script-set no longer development (but it still works good).

user $nano ~/.kde4/share/kde4/services/ServiceMenus/dropbox-scripts/dropbox_menu.sh

Find 37 line

dropbox_path=`${SCRIPTS_PATH}get_dropbox_folder.sh`

And change it to:

dropbox_path="$HOME/Dropbox"

Don't forget add dropbox-daemon to autorun in systemsettings.

Kde-dropbox-10.png

KDE Plasma 5

KDE Plasma dropped support for legacy Xembed-based systray support. In order for the systray icon to appear Plasma needs to be built with legacy systray support. Please refer to the Plasma 5 page for details. Dropbox integration with Dolphin is provided by kde-apps/dolphin-plugins-dropbox when the dropbox USE flag is enabled:

USE flags for kde-apps/dolphin-plugins-dropbox Dolphin plugin for Dropbox service integration

debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces

root #emerge --ask kde-apps/dolphin-plugins-dropbox

Troubleshooting

Dropbox says it's an old version

When you start dropbox and return the error of it's an old version of dropbox, you can have some problems, between their version to some problems of dropbox, please, follow the following steps, their can help you to solve the problem

Step 1: Unmasking the later version

unmask the latest version for your architecture, you can found the information in net-misc/dropbox

x86
root #echo -e "net-misc/dropbox ~x86" >> /etc/portage/package.accept_keywords
amd64
root #echo -e "net-misc/dropbox ~amd64" >> /etc/portage/package.accept_keywords

Step 2: Dropbox not create the .dropbox-dist

Another problem is that dropbox does not install the dropboxd daemon, it's on .dropbox-dist folder of their user's home, for force to Dropbox to install it you must install the CLI version (don't uninstall nothing) and force the installation of the daemon

root #emerge --ask net-misc/dropbox-cli

Creating the daemon's folder:

user $dropbox-cli start -i

Starting Dropbox:

user $dropbox start

if it does not start now, keep calm and follow the next step

Step 3: Dropbox does not start now

At this time, you have a problem between the GL library installed by dropbox called libGL.so.1 , it conflicts with your X, to solve the problem, remove it, its inside ~/.dropbox-dist/dropbox-lnx.{Dropbox's version}/, remove it

user $ rm ~/.dropbox-dist/dropbox-lnx.x86_64-3.10.11/libGL.so.1
user $ dropbox start

Sometimes is is also necessary to remove the DRM library from ~/.dropbox-dist/dropbox-lnx.{Dropbox's version}/, remove it

user $ rm ~/.dropbox-dist/dropbox-lnx.x86_64-3.10.11/libdrm.so.2
user $ dropbox start

Crash with nvidia-drivers

When trying to launch Dropbox on a system with nVidia proprietary drivers (x11-drivers/nvidia-drivers) Dropbox wouldn't start. It turns out that the problem is related to a bundled libGL.so.1 library inside the Dropbox installation.

In order to fix this it is necessary to remove this library and let Dropbox use the system-provided version. This is already done by the ebuild, however Dropbox is automatically updating itself into ~/.dropbox-dist/ so it is necessary to also remove the library from there.

user $rm ~/.dropbox-dist/dropbox-lnx.x86_64-3.8.8/libGL.so

Don't show Dropbox icon on KDE/Plasma's systray

 As of 2019-10-18, the information in this section is probably outdated. You can help the Gentoo community by verifying and updating this section.

make sure that you added the "legacy-systray" support and understand all issues mentioned in Plasma 5 page

Resume of adding legacy-systray suport for KDE/Plasma:

root #echo "kde-plasma/plasma-desktop legacy-systray gtk2 gtk3 qt4" >> /etc/portage/package.use
root #emerge --ask dev-libs/sni-qt libappindicator:2 libappindicator:3
root #emerge --ask --update --deep --verbose --tree --newuse kde-plasma/plasma-desktop

If it does not works for you, make sure that you are on the latest version (~x86, ~amd64,...) and, stop the service, remove the following files and restart dropbox from the user's bash.

Stopping Dropbox:

root #rc-service dropbox stop

Deleting some files (make sure that's your adding your Dropbox's Version on {Dropbox's Version}) and restarting dropbox:

user $rm .dropbox-dist/dropbox-lnx.{Dropbox's Version}/libQt5*
user $rm .dropbox-dist/dropbox-lnx.{Dropbox's Version}/qt.conf
user $rm .dropbox-dist/dropbox-lnx.{Dropbox's Version}/plugins/platforms/libqxcb.so
user $dropbox

ImportError: libffi.so.6: cannot open shared object file: No such file or directory

If you tried to start Dropbox after installing it and got the followingː

user $dropbox start
dropbox: locating interpreter
dropbox: logging to /tmp/dropbox-antifreeze-qeteiz
dropbox: initializing
dropbox: initializing python 3.5.4
dropbox: setting program path '/opt/dropbox/dropbox'
dropbox: setting home path '/opt/dropbox'
dropbox: setting python path '/opt/dropbox:/opt/dropbox/python-packages-35.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/opt/dropbox/cryptography.hazmat.bindings._constant_time.cpython-35m-x86_64-linux-gnu.so'
Traceback (most recent call last):
  File "dropbox/__init__.pyc", line 8, in <module>
  File "dropbox/overrides.pyc", line 517, in <module>
  File "dropbox/overrides.pyc", line 418, in __ssl_wrap_socket_internal_ca_certs
  File "dropbox/ssl/revoked_certs.pyc", line 9, in <module>
  File "cryptography/x509/__init__.pyc", line 9, in <module>
  File "cryptography/x509/base.pyc", line 16, in <module>
  File "cryptography/x509/extensions.pyc", line 18, in <module>
  File "cryptography/hazmat/primitives/constant_time.pyc", line 9, in <module>
  File "<_bootstrap_overrides>", line 153, in load_module
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
!! dropbox: fatal python exception:
['Traceback (most recent call last):\n', '  File "dropbox/__init__.pyc", line 8, in <module>\n', '  File "dropbox/overrides.pyc", line 517, in <module>\n', '  File "dropbox/overrides.pyc", line 418, in __ssl_wrap_socket_internal_ca_certs\n', '  File "dropbox/ssl/revoked_certs.pyc", line 9, in <module>\n', '  
File "cryptography/x509/__init__.pyc", line 9, in <module>\n', '  File "cryptography/x509/base.pyc", line 16, in <module>\n', '  File "cryptography/x509/extensions.pyc", line 18, in <module>\n', '  File "cryptography/hazmat/primitives/constant_time.pyc", line 9, in <module>\n', '  File 
"<_bootstrap_overrides>", line 153, in load_module\n', 'ImportError: libffi.so.6: cannot open shared object file: No such file or directory\n'] (error 3)
Aborted

Install the net-misc/dropbox-58.3.88-r1 and above which does not have this problem:

root #emerge --ask '>=net-misc/dropbox-58.3.88-r1'

See also

  • SparkleShare — a cross platform, free, open source, Dropbox-like, git-based collaboration and file sharing tool.
  • Owncloud — a free, open source, Dropbox-like file synchronization and cloud service.