gnome-shell-extension-syncthing icon indicating copy to clipboard operation
gnome-shell-extension-syncthing copied to clipboard

Feature Request: Autostart Syncthing

Open cxt666 opened this issue 4 years ago • 3 comments

Request: Add an option to the Syncthing Icon Configuration "Launch Syncthing on Startup"

Expected behavior: Activating the "Launch Syncthing on Startup" Option would automatically activate Syncthing after the Syncthing Icon has been loaded in a Gnome Session.

Use Case: On my Desktop PC, I manually start Syncthing via the Syncthing icon every time after login. The Option "Launch Syncthing on Startup" would take away the need to manually do this and in many cases synchronize any changes to my folders between logging in to Gnome and starting to work. Launch Synchting on Startup

cxt666 avatar Feb 21 '21 16:02 cxt666

The extension uses systemd user services, so

systemctl --user enable syncthing.service

should do just what you want.

Also take a look at loginctl enable-linger.

jaystrictor avatar Feb 21 '21 21:02 jaystrictor

Would it be possible to

  • Query the systemctl status like systemctl --user list-unit-files | grep syncthing.service and display the Result on the Slider
  • Set Enabled through systemctl --user enable syncthing.service
  • Set Disabled through systemctl --user disable syncthing.service

cxt666 avatar Sep 14 '21 08:09 cxt666

Would it be possible to

* Query the systemctl status like `systemctl --user list-unit-files | grep syncthing.service` and display the Result on the Slider

I am not sure what you are trying to accomplish with that command. Maybe it would be easier to use

/bin/systemctl --user show -p LoadState -p ActiveState -p UnitFileState syncthing.service

Take a look at src/systemd.js.

* Set _Enabled_ through `systemctl --user enable syncthing.service`

* Set _Disabled_ through `systemctl --user disable syncthing.service`

That would certainly be possible. Someone has to implement that, but I am short on time right now. I would accept pull requests for that, though.

jaystrictor avatar Sep 26 '21 08:09 jaystrictor