我已经从 abraunegg 安装了 Linux OneDrive 客户端 (https://github.com/abraunegg/onedrive) 在 ubuntu 20 LTS 上从 ppa (https://launchpad.net/~yann1ck/+archive/ubuntu/onedrive)。
sudo add-apt-repository ppa:yann1ck/onedrive
sudo apt update
sudo apt install onedrive
重启后,我发现 OneDrive 在启动时同步了我的所有文件夹。在更改 OneDrive 文件夹中的内容时,除非我执行了以下操作,否则不会执行同步
onedrive --synchronize
当我对它的工作有足够的信心时,我尝试用
onedrive --monitor
这一切一直顺利发生,直到我使用 ctr + C 终止该进程。
下次启动时,我注意到不仅在启动时进行了同步,而且在开机时还执行了更新监控。我该如何解释这一点呢?进程可见(更多详细信息请见底部)
$ pidof onedrive
1602
并向其发送信号直接禁用/启用文件同步
kill -STOP 1602
kill -CONT 1602
然而,没有明确启动任何服务。根据https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md我应该这样做
systemctl --user enable onedrive
systemctl --user start onedrive
但我没有(在命令历史中验证)。
onedrive 客户端配置正确吗?或者我应该尝试停止/终止当前正在运行的进程并执行前面的两个命令?当我想编辑需要
onedrive --synchronize --resync
那我该怎么办?
有关当前正在运行的进程的更多详细信息:
josja@sputter:~$ ps -Flww -p 1602
F S UID PID PPID C PRI NI ADDR SZ WCHAN RSS PSR STIME TTY TIME CMD
0 S josja 1602 1590 0 80 0 - 246222 hrtime 26012 5 20:32 ? 00:00:02 /usr/bin/onedrive --monitor
josja@sputter:~$ systemctl status [email protected]
● [email protected] - OneDrive Free Client for josja
Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: https://github.com/abraunegg/onedrive
josja@sputter:~$ systemctl status --user onedrive
● onedrive.service - OneDrive Free Client
Loaded: loaded (/usr/lib/systemd/user/onedrive.service; enabled; vendor pr>
Active: active (running) since Mon 2021-01-04 20:32:49 CET; 2h 31min ago
Docs: https://github.com/abraunegg/onedrive
Main PID: 1602 (onedrive)
CGroup: /user.slice/user-1000.slice/[email protected]/onedrive.service
└─1602 /usr/bin/onedrive --monitor
jan 04 21:43:21 sputter onedrive[1602]: Sync with OneDrive is complete
jan 04 22:08:28 sputter onedrive[1602]: Starting a sync with OneDrive
jan 04 22:08:28 sputter onedrive[1602]: Syncing changes from OneDrive ...
jan 04 22:08:29 sputter onedrive[1602]: Sync with OneDrive is complete
jan 04 22:33:35 sputter onedrive[1602]: Starting a sync with OneDrive
jan 04 22:33:35 sputter onedrive[1602]: Syncing changes from OneDrive ...
jan 04 22:33:37 sputter onedrive[1602]: Sync with OneDrive is complete
jan 04 22:58:42 sputter onedrive[1602]: Starting a sync with OneDrive
jan 04 22:58:42 sputter onedrive[1602]: Syncing changes from OneDrive ...
jan 04 22:58:43 sputter onedrive[1602]: Sync with OneDrive is complete
systemctl list-unit-files
<...>
[email protected] disabled enabled
<...>
更新:
从答案和我的经验来看,客户端似乎已由 ppa 自动启动,以便人们可以停止它并重新配置它
systemctl --user stop onedrive
onedrive --synchronize --resync
systemctl --user start onedrive
答案1
披露:我是 Linux 版 OneDrive 客户端的开发人员 -https://github.com/abraunegg/onedrive
@Josja
这是一个漏洞使用 Ubuntu PPA 包。
要正确安装客户端,您需要遵循以下说明:https://github.com/abraunegg/onedrive/blob/master/docs/ubuntu-package-install.md
还请注意已知的问题使用 Ubuntu 软件包时https://github.com/abraunegg/onedrive/blob/master/docs/ubuntu-package-install.md#known-issues-with-installing-from-the-above-packages