To be able to install and run a Dropbox client in a Linux server, follow these steps (see https://www.dropbox.com/install).
To begin, we must download and uncompress the package (as a normal user, root is not needed):
aarrieta@kooka:~$ cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
The needed files will be downloaded and uncompressed in the (hidden) .dropbox-dist directory.
Next step is to launch the daemon. Because it is the first time, it will ask us to go to an website with a browser to link the client we are installing with our Dropbox account:
aarrieta@kooka:~$ ~/.dropbox-dist/dropboxd
This client is not linked to any account...
Please visit https://www.dropbox.com/cli_link?host_id=5c707a104e389bb7a0c2c36a3e79afc5 to link this machine.
This client is not linked to any account...
(it will keep repeating the message until we do what it wants)
We must go to that address and enter our Dropbox password:
Once finished, a message telling us about the success of the action will appear in the console and in the browser:
Client successfully linked, Welcome Ariel!
We type Ctrl-c to close the daemon now.
If we look into our home directory, there will be a new folder called Dropbox, where the files will be stored.
Next step is to download a pythons script that will be used to manage the daemon:
aarrieta@kooka:~$ wget https://www.dropbox.com/download?dl=packages/dropbox.py -O dropbox.py
We give it execute permission:
aarrieta@kooka:~$ chmod +x dropbox.py
And then launch it without parameters, to see the available options:
aarrieta@kooka:~$ ./dropbox.py
Dropbox command-line interface
commands:
Note: use dropbox help <command> to view usage for a specific command.
status get current status of the dropboxd
help provide help
puburl get public url of a file in your dropbox
stop stop dropboxd
running return whether dropbox is running
start start dropboxd
filestatus get current sync status of one or more files
ls list directory contents with current sync status
autostart automatically start dropbox at login
exclude ignores/excludes a directory from syncing
lansync enables or disables LAN sync
aarrieta@kooka:~$ ./dropbox.py status
Dropbox isn't running!
We start it:
aarrieta@kooka:~$ ./dropbox.py start
Starting Dropbox...Dropbox isn't running!
Done!
And now we can see how it begins to sync with our files "in the cloud":
aarrieta@kooka:~$ ./dropbox.py status
Downloading 2,732 files (110.7 kB/sec, 8 hr left)
Topic for a future post or for homework: configure the dameon so it runs automatically when the system starts, without the need of launching it "by hand" with the command ./dropbox.py start.

No hay comentarios.:
Publicar un comentario