如何禁止onedrive服务自动启动

Lor*_*ABA 3 autostart kubuntu services systemd 20.04

我从存储库安装了“onedrive”。效果很好,但我不希望它自动启动。我厌倦了每次重新启动后都将其关闭 - 如何修复它?我正在使用它关闭它,systemctl --user stop onedrive 我预计systemctl --user disable onedrive会关闭自动启动,但它没有效果 - systemctl --user status onedrivestil 显示enabled;

Loaded: loaded (/usr/lib/systemd/user/onedrive.service; enabled; vendor preset: enabled)
Run Code Online (Sandbox Code Playgroud)

并在重新启动后启动。

小智 7

披露:我是 Linux 版 OneDrive 客户端的开发人员 - https://github.com/abraunegg/onedrive

\n

此问题是由 Ubuntu PPA 包在安装时创建符号链接引起的:

\n
Created symlink /etc/systemd/user/default.target.wants/onedrive.service \xe2\x86\x92 /usr/lib/systemd/user/onedrive.service.\n
Run Code Online (Sandbox Code Playgroud)\n

要解决这种情况,需要删除此符号链接:

\n
sudo rm /etc/systemd/user/default.target.wants/onedrive.service\n
Run Code Online (Sandbox Code Playgroud)\n

要永久解决此问题,需要更新 PPA 包,以便不会创建此符号链接。

\n

上述信息也列在跟踪此特定问题的https://github.com/abraunegg/onedrive/issues/1274中。

\n