我想我在过去几分钟内已经做了十几次系统重启来检查这个奇怪的行为。似乎 dropbox 服务在启动时成功或失败取决于我在输入密码的登录屏幕上花费了多少时间。我没有做过任何计时,所以我不知道确切的时间是多少,但不会超过半打秒。
当我快速输入密码时,Dropbox 启动,确实我验证了以下内容,
$ systemctl status [email protected]
● [email protected] - Dropbox
Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/[email protected]
└─override.conf
Active: active (running) since Wed 2018-06-13 17:07:04 CEST; 6min ago
Main PID: 1006 (dropbox)
Tasks: 84 (limit: 19660)
Memory: 148.0M
CGroup: /system.slice/system-dropbox.slice/[email protected]
├─1006 /usr/bin/dropbox
├─1052 dbus-launch --autolaunch 9f3c6fabb4aa40d1b7d5b3a3881af003 --binary-syntax --close-stderr
├─1053 /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
└─1057 /usr/bin/dunst
Jun 13 17:07:05 greywarden dropbox[1006]: dropbox: load fq extension '/opt/dropbox/PyQt5.QtWebKitWidgets.so'
Jun 13 17:07:05 greywarden dropbox[1006]: dropbox: load fq extension '/opt/dropbox/PyQt5.QtWidgets.so'
Jun 13 17:07:05 greywarden dropbox[1006]: dropbox: load fq extension '/opt/dropbox/PyQt5.QtPrintSupport.so'
Jun 13 17:07:05 greywarden dropbox[1006]: dropbox: load fq extension '/opt/dropbox/PyQt5.QtDBus.so'
Jun 13 17:07:05 greywarden dbus-daemon[1053]: [session uid=1000 pid=1051] Activating service name='org.freedesktop.Notifications' requested by ':1.0' (uid=1000 pid=1006 comm="/usr/bin/dropbox ")
Jun 13 17:07:05 greywarden org.freedesktop.Notifications[1053]: Warning: 'allow_markup' is deprecated, please use 'markup' instead.
Jun 13 17:07:05 greywarden org.freedesktop.Notifications[1053]: Warning: The frame section is deprecated, width has been renamed to frame_width and moved to the global section.
Jun 13 17:07:05 greywarden org.freedesktop.Notifications[1053]: Warning: The frame section is deprecated, color has been renamed to frame_color and moved to the global section.
Jun 13 17:07:05 greywarden org.freedesktop.Notifications[1053]: Warning: Unknown keyboard shortcut: mod4+grave
Jun 13 17:07:05 greywarden dbus-daemon[1053]: [session uid=1000 pid=1051] Successfully activated service 'org.freedesktop.Notifications'
另一方面,当我输入密码的速度太慢时(例如键入、退格、重新键入……)或者我在看书时根本不看屏幕,输出是
$ systemctl status [email protected]
● [email protected] - Dropbox
Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/[email protected]
└─override.conf
Active: failed (Result: exit-code) since Wed 2018-06-13 17:15:03 CEST; 39s ago
Process: 1031 ExecStart=/usr/bin/dropbox (code=exited, status=250)
Main PID: 1031 (code=exited, status=250)
并且保管箱确实没有运行(没有托盘图标)。
我在 ArchLinux 和 LightDM 登录管理器上运行 i3。我遵循了维基页面上的防止自动更新和自动启动部分,但我不太可能混淆了使用 systemd 启动时的自动启动和使用 systemd登录时的自动启动,这可能是问题的根源。
正如问题的第一条评论所建议的那样,这个维基页面解决了这个问题。