CUI 版Dropbox?

あったよあった。CUIからでもDropbox使う方法。

Linux CLI in python

どうやら、この python スクリプト使って、X システムが無いCUIオンリーの環境でも、Dropbox のインストール・実行できるよってことらしい。

使ってみた。

$ wget https://dl.getdropbox.com/u/43645/dbcli.py
$ python dbcli.py 
Usage: dbcli.py <command> [options] ... <command> [options]
Available commands:
   status - Get overall status for the daemon.
   copypublic <file> - Copies the url to the clipboard (? I guess)
   install <x86/x86_64> - Tries to download the daemon and install it in your home directory.
   browse <folder> - Browse the specified folder in your browser.
   copygallery - Copies the gallery url to the clipboard.
   share <file> - Open the browser and shows share-information.
   file <file> - Get information about a file/folder.
   folder <folder> - Get information about a file/folder.
   help - Gives this.
   revisions <file> - Opens the revisions page in your browser for the specified file.

なるほどー取りあえず install コマンド使えば良い感じ?

$ python dbcli.py install x86
error: couldn't connect to the daemond.
Trying to start the daemon.
The daemon does not exist (try dbcli.py install)
rm: cannot remove `/home/kui/.dropbox-dist/': そのようなファイルやディレクトリはありません
Starting to download dropbox-lnx.x86-0.6.382.tar.gz...
  ... 1 kB of 17149 kB
  ... 1716 kB of 17149 kB
  ... 3431 kB of 17149 kB
  ... 5146 kB of 17149 kB
  ... 6861 kB of 17149 kB
  ... 8576 kB of 17149 kB
  ... 10291 kB of 17149 kB
  ... 12006 kB of 17149 kB
  ... 13721 kB of 17149 kB
  ... 15436 kB of 17149 kB
  ... 17151 kB of 17149 kB     # この辺で「おおおこれはひょっとして、dropboxdとかダウンロードしてる!?wktk」ってなってる。
Done. Unpacking...
Trying to start the daemon.
Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "__main__.py", line 105, in <module>
  File "__main__dropbox__.py", line 174, in <module>
  File "__main__dropbox__.py", line 169, in main_startup
  File "arch/linux/startup.py", line 131, in main_thread_loop
AttributeError: 'NoneType' object has no attribute 'MainLoop'
Exception in thread CONTROL (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "threading.py", line 486, in __bootstrap_inner
  File "common_util/trace.py", line 31, in intwatched
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Unhandled exception in thread started by <bound method WatchedThread.__bootstrap of <WatchedThread(CONTROL, started)>>
Error in sys.excepthook:
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "threading.py", line 462, in __bootstrap
  File "threading.py", line 527, in __bootstrap_inner
AttributeError: 'NoneType' object has no attribute 'acquire'
Exception in thread AUTHENTICATE (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "threading.py", line 486, in __bootstrap_inner
  File "client_api/authenticate.py", line 207, in run
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Unhandled exception in thread started by <bound method AuthenticationThread.__bootstrap of <AuthenticationThread(AUTHENTICATE, started)>>
Error in sys.excepthook:
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "threading.py", line 462, in __bootstrap
  File "threading.py", line 527, in __bootstrap_inner
AttributeError: 'NoneType' object has no attribute 'acquire'
Exception in thread RTRACE (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "threading.py", line 486, in __bootstrap_inner
  File "common_util/trace.py", line 486, in run
  File "common_util/trace.py", line 412, in rtrace_thread_func
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Unhandled exception in thread started by <bound method RtraceThread.__bootstrap of <RtraceThread(RTRACE, started)>>
Error in sys.excepthook:
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "threading.py", line 462, in __bootstrap
  File "threading.py", line 527, in __bootstrap_inner
AttributeError: 'NoneType' object has no attribute 'acquire'

何やらダメだった。pythonはちょっとしかかじった事無いので、何が書いてあるか今イチピンとこない。どうやら lenny な debian ではダメだったようだ。あとで原因追及したいな。

追記
どうやら

 :
Trying to start the daemon.
 :

から下のメッセージは、dropboxd からのメッセージみたい。直接 dropboxd を動かしてみて分かった。Ubuntu は良くても debian はダメってことかしら。残念。