linux_dropbox

由于+-的网络封锁,导致很多好东西无法使用,dropbox就是其一。
当我们在linux的软件管理器搜索并安装dropbox后,启动dropbox会弹出一个对话框,提示:In order to use Dropbox, you must download the proprietary daemon.让我们下载proprietary daemon。这时候你点击确定,是无法启动dropbox的。
其实,我们安装的这个dropbox只是一个壳,程序所需的daemon还没有安装。但是由于+-的封锁,我们无法连接官网进行下载。
经过查看dropbox的源代码,可以发现如下内容。
class DownloadState(object):
def __init__(self):
try:
self.file = urllib.urlopen(“http://www.getdropbox.com/download?plat=%s” % plat())
except IOError:
FatalVisibleError(“Trouble connecting to Dropbox servers. Maybe your internet connection is down, or you need to set your http_proxy environment variable.”)
fcntl.fcntl(self.file, fcntl.F_SETFL, os.O_NONBLOCK)
很明显,真实的下载地址就是: http://www.getdropbox.com/download?plat=%s  。但地址中的plat=???呢。我们查看plat函数的代码:
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”)
没错,64位系统下plat()的返回值是x86_64,32位的是x86.注意这一句:return “lnx.%s” % plat ,以我64位系统为例,返回的最终值为lnx.x86_64  。于是,真实的下载地址是  http://www.getdropbox.com/download?plat=lnx.x86_64   。遗憾的是:没有翻墙的童鞋还是无法下载这个文件。不过我已经将32和64对应的文件都下载并分享了。
地址如下:
https://dl.dropbox.com/u/102960712/dropbox-lnx.x86-1.4.17.tar.gz
https://dl.dropbox.com/u/102960712/dropbox-lnx.x86_64-1.4.17.tar.gz
这两个都是最新版本。
下载并解压后,你会得到一个名叫:.dropbox-dist的文件夹。直接拷贝到你电脑的主文件夹下面就好了。然后启动dropbox,一切ok。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值