Dropbox 无头式崩溃“无法连接到显示器:1”

Dropbox 无头式崩溃“无法连接到显示器:1”

我从安装了Dropboxhttps://www.dropbox.com/install-linux按照说明进行无头安装。但是,当我尝试运行它时,在输出列表的末尾出现了以下错误:

[simernes@simernes ~]$ dropbox start
Starting Dropbox...dropbox: locating interpreter
dropbox: logging to /tmp/dropbox-antifreeze-HaMTae
dropbox: initializing
dropbox: initializing python 3.7.2
dropbox: setting program path '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/dropbox'
dropbox: setting home path '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126'
dropbox: setting python path '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126:/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/python-packages-37.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/cryptography.hazmat.bindings._constant_time.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/cryptography.hazmat.bindings._openssl.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/cryptography.hazmat.bindings._padding.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/psutil._psutil_linux.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/psutil._psutil_posix.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/linuxffi.pthread._linuxffi_pthread.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/cpuid.compiled._cpuid.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/apex._apex.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/linuxffi.resolv.compiled._linuxffi_resolv.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/tornado.speedups.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/librsyncffi.compiled._librsyncffi.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/linuxffi.sys.compiled._linuxffi_sys.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/posixffi.libc._posixffi_libc.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/linuxffi.gnu.compiled._linuxffi_gnu.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/PyQt5.QtCore.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/PyQt5.QtGui.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/PyQt5.QtWidgets.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/PyQt5.QtNetwork.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/simernes/.dropbox-dist/dropbox-lnx.x86_64-76.4.126/PyQt5.QtDBus.cpython-37m-x86_64-linux-gnu.so'
No protocol specified
b'!! (Qt:Fatal) QXcbConnection: Could not connect to display :1'
Dropbox isn't running!
Done!

我之前已经从 dropbox 存储库安装了 Dropbox,但我想在启动时以无头用户身份运行 dropbox,因此我删除了之前创建的 ~/.dropbox 和 ~/.dropbox-dist 。

我能做什么?最终目标是我可以在启动时将 Dropbox 作为无头守护进程运行,可能在 crontab 中的 @reboot 条目中。

提前致谢!

答案1

dropbox start

不是启动 dropbox 的正确命令,因为它需要显示,所以它可能是桌面系统上使用的命令。链接中使用的命令是

~/.dropbox-dist/dropboxd

这将启动守护进程(dropboxd 中的最后一个“d”)。

答案2

这对我有用

export DISPLAY=:0 
dropbox start

相关内容