Dropbox on OpenBSD

2,323

Solution 1

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.

Solution 2

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)

Share:
2,323

Related videos on Youtube

Anthony
Author by

Anthony

Updated on September 18, 2022

Comments

  • Anthony
    Anthony almost 2 years

    I have a file with data in the following format:

    <user>
        <fname>Anthony</fname>
        <lname>Smith</lname>
        <accid>3874918</accid>
    </user>
    
    <user>
         ...
    </user>
    

    I'm trying to parse this data and store it to MySQL database with the follwing fields: fname, lname, accid.

    Now the problem is how to determine <user> and </user> so I can parse the data inside of it? Thank you.

    • Admin
      Admin almost 13 years
      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.
    • Admin
      Admin over 7 years
      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!
    • Admin
      Admin almost 5 years
      I have a couple of ideas: 1. Using the Dropbox API to build a simple client: 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).
  • soulmerge
    soulmerge over 14 years
    It is not valid XML, if it does not contain a single root node.
  • Ben James
    Ben James over 14 years
    Yes, this is true. I was not sure if he had posted only an extract, or a true representation of the document structure.
  • Yaron
    Yaron almost 13 years
    Good suggestion. I'll give that whirl and let you know how it went.
  • Vitor Py
    Vitor Py almost 13 years
    @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!
  • Yaron
    Yaron almost 13 years
    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.
  • Vitor Py
    Vitor Py almost 13 years
    @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.
  • Kusalananda
    Kusalananda about 6 years
    Linux compatibility was dropped in OpenBSD 6.0 (in 2016), because nobody was using it and it was too bothersome to maintain.