3

I installed "onedrive" from repo. Works great but I don't want it to start automatically. I'm tired of turning it off after each reboot - how to fix it? I'm turning it off using systemctl --user stop onedrive I was expecting systemctl --user disable onedrive will turn off autostart but it has no effect - systemctl --user status onedrive stil shows enabled;:

Loaded: loaded (/usr/lib/systemd/user/onedrive.service; enabled; vendor preset: enabled)

and it starts after reboot.

Lord_JABA
  • 103
  • 1
  • 7
  • Quite some explanation here. May depend on the configuration. https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#running-onedrive-as-a-system-service – vanadium Apr 05 '21 at 10:51
  • FYI - this issue is a Ubuntu PPA Packaging Bug as detailed here: https://github.com/abraunegg/onedrive/issues/1274 – abraunegg Apr 05 '21 at 21:02

2 Answers2

7

Disclosure: I am the developer of the OneDrive Client for Linux - https://github.com/abraunegg/onedrive

This issue is caused by the Ubuntu PPA package creating a symbolic link when the package is installed:

Created symlink /etc/systemd/user/default.target.wants/onedrive.service → /usr/lib/systemd/user/onedrive.service.

To resolve this situation, this symbolic link needs to be removed:

sudo rm /etc/systemd/user/default.target.wants/onedrive.service

To fix this issue permanently, the PPA package needs to be updated so that this symbolic link is not created.

The above information is also listed in https://github.com/abraunegg/onedrive/issues/1274 which tracks this particular issue.

andrew.46
  • 38,003
  • 27
  • 156
  • 232
abraunegg
  • 778
  • Can confirm:I had this same issue on Ubuntu 22.04.3 with onedrive v2.4.25-1+np1 and these steps successfully stopped it from starting automatically – stephan Oct 03 '23 at 12:43
0

If the app is located in startup applications it is accessed by pressing left windows (or whatever you have set up as your Super key) and typing startup in the search box, select the startup applications icon then disable OneDrive from there by highlighting it and then clicking on remove.

Just to be clear, this will only remove OneDrive from Startup Applications - it will not remove it from your system.

enter image description here

graham
  • 10,436