Arch-Linux

保管箱服務失敗或成功取決於在登錄螢幕上花費的時間

  • December 12, 2019

我想我在過去幾分鐘內已經進行了十多次系統重啟來檢查這種奇怪的行為。Dropbox 的服務似乎在啟動時執行成功或失敗,這取決於我在輸入密碼的登錄螢幕上花費了多少時間。我沒做過計時,所以不知道具體是多少時間,不過也不過半打而已。

當我快速輸入密碼時,Dropbox 啟動,確實我驗證了以下內容,

$ systemctl status dropbox@enrico.service
● dropbox@enrico.service - Dropbox
  Loaded: loaded (/usr/lib/systemd/system/dropbox@.service; enabled; vendor preset: disabled)
 Drop-In: /etc/systemd/system/dropbox@enrico.service.d
          └─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/dropbox@enrico.service
          ├─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 dropbox@enrico.service
● dropbox@enrico.service - Dropbox
  Loaded: loaded (/usr/lib/systemd/system/dropbox@.service; enabled; vendor preset: disabled)
 Drop-In: /etc/systemd/system/dropbox@enrico.service.d
          └─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。我在wiki 頁面上關注了防止自動更新自動啟動部分,但我不太可能在使用 systemd 啟動時自動啟動和使用 systemd登錄時自動啟動之間混淆,這可能是問題的根源。

正如對該問題的第一條評論所建議的那樣,這個維基頁面解決了這個問題。

引用自:https://unix.stackexchange.com/questions/449585