我想在过去的几分钟里我已经重新启动了十几次系统来检查这种奇怪的行为。看来 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)
并且 dropbox 确实没有运行(没有托盘图标)。
我在 ArchLinux 和 LightDM 登录管理器上运行 i3。我跟着防止自动更新和自动启动部分位于维基页面,但我不太可能混淆使用 systemd 启动时自动启动和使用 systemd 登录时自动启动这可能是问题的根源。
答案1
正如该问题的第一条评论中所建议的,这维基页面解决了这个问题。