10

Has anyone had any success getting dropbox installed with dropboxd running properly on OpenBSD (FreeBSD would work for me too..)? I have built from source and everything installs just fine but when I try to fire it up:


$ python /usr/bin/dropbox start                                                
Starting Dropbox...
The Dropbox daemon is not installed!
Run "dropbox start -i" to install the daemon

$ ssh root@localhost 
root@localhost's password: 

<snip>

# python /usr/bin/dropbox start -i                                                                    
Starting Dropbox...
Dropbox is the easiest way to share and store your files online. 
Want to learn more? Head to http://www.dropbox.com/

In order to use Dropbox, you must download the proprietary daemon. [y/n] y

Error: Platform not supported

So I checked out the command line clients and text only stuff from http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall but of course that's precompiled for linux.. no dice.

Anyone try to tackle this and get a workaround for a DropBox/BSD combo?


I continued to plug away at this and eventually ran into a show stopper: There's no linux emulation on amd64 for openbsd. Game over. Sorry to kill everyone's time.

unclejamil
  • 914
  • 6
  • 12
  • Can you open `/usr/bin/dropbox` on a text editor, search for the `Error: Platform not supported` message and post the corresponding line of code here (a few lines above and a few lines below it too)? Since it's a Python script it might be possible to change it slightly if it's just a check for officially supported platforms. – Vitor Py Jul 16 '11 at 17:36
  • ugh. Dropbox *still* doesn't support Mac OS X (which uses a BSD variant kernel) for command line tools - mean it *still* isn't possible to restart it remotely after a reboot via command line! – Michael Sep 27 '16 at 22:07
  • I have a couple of ideas: 1. Using the Dropbox API to build a simple client: https://www.dropbox.com/developers/documentation/http/overview 2. Run Dropbox in a Linux virtual machine. In that case the Dropbox folder in the VM could be made available to the host (e.g., with Samba). – jsb Aug 21 '19 at 13:02

3 Answers3

3

This is the offending code on the dropbox script:

def plat():
    if sys.platform.lower().startswith('linux'):
        arch = platform.machine()
        if (arch[0] == 'i' and
            arch[1].isdigit() and
            arch[2:4] == '86'):
            plat = "x86"
        elif arch == 'x86_64':
            plat = arch
        else:
            FatalVisibleError("Platform not supported")
        return "lnx.%s" % plat
    else:
        FatalVisibleError("Platform not supported")

You can try to substitute this for something akin to:

def plat():
    arch = platform.machine()
    if (arch[0] == 'i' and
        arch[1].isdigit() and
        arch[2:4] == '86'):
        plat = "x86"
    elif arch == 'x86_64':
        plat = arch
    else:
        FatalVisibleError("Platform not supported")

Of course, you might find other problems along the way. Good luck.

Vitor Py
  • 1,902
  • 2
  • 19
  • 24
  • Good suggestion. I'll give that whirl and let you know how it went. – unclejamil Jul 16 '11 at 17:53
  • @unclejamil If you run into other problems trying to get it to run, let me know :) I don't get why people put in those kind of senseless platform checks. If it works, let it work! – Vitor Py Jul 17 '11 at 15:08
  • The installer completed but unfortunately dropboxd is still dying. Not sure where the issue is but I thought I'd give you an update and thank you again for the suggestion. I'm going to keep hammering away at this thing and see if I can get any love. If I make any progress I'll let you know. – unclejamil Jul 21 '11 at 23:40
  • 1
    @unclejamil Are you sure dropboxd is being correctly run by the linux emulation layer? Did you run `sysctl kern.emul.linux=1` before running dropboxd? At least in the Fedora system where I am right now dropboxd is a static binary, this should be enough. On the other hand `~/.dropbox-dist/dropbox` is a dynamic executable and there's a few things that must be done before it can run: check the `compat_linux` man page. – Vitor Py Jul 21 '11 at 23:53
1

Option 1:

The Dropbox API is well documented and allows you to do more than you what you probably want. It seems like it would be easy to write a CLI for simple operations, but someone already did more than that: https://github.com/dropbox/dbxcli

I have not tested dbxcli on OpenBSD yet, but in general it seems to me that the API route would be the easiest solution.

Option 2:

Set up a Linux virtual machine and run Dropbox in it. You can access the guest file system conveniently on your host through several methods (local fileserver, or mount through ssh)

jsb
  • 281
  • 1
  • 6
0

Check the Linux Compatibility. Type:

sysctl -w kern.emul.linux=1

and re-run dropbox....

Raphael Ahrens
  • 9,701
  • 5
  • 37
  • 52
  • 1
    Linux compatibility was dropped in OpenBSD 6.0 (in 2016), because nobody was using it and it was too bothersome to maintain. – Kusalananda May 03 '18 at 10:01