I followed the syncthing autostart guide and added ‘Start syncthing’ to the startup apps. There are 2 users. When I start the PC and log into user A, it works fine. After a while, I log out (not switch user, I don’t do that) and log into user B. user B’s syncthing doesn’t work, and requires user A’s login details. For User B’s syncthing to work right, I have to manually shutdown syncthing before logging out.
Is there any way to change this behavior or is it native to the OS?
Running Linux Mint Cinnamon.
I’m using the Task Scheduler method, which should work well for you. In your shoes, I’d suggest you configure Task Scheduler to start and stop Syncthing at login and logout.
I’m using the bare Syncthing executable on Windows, Mac and Linux. Windows uses Task Scheduler to start Syncthing on boot. Linux uses systemd and it’s a Login item on my Mac.
alright. because from my preliminary search it seems like there are many ways to manage cron jobs in linux, so I was curious what you used. I thought the built-in startup applications shut down the service on logout, but I guess that expectation was misplaced.
My apologies, I missed that you were running Linux in your original post. If you want multiple users to have their own Syncthing instances, I’d Have Syncthing launched by a login script.
is there any documentation or resource about that? I tried looking through the docs but there wasn’t any mention of a login script, only mentions of adding it to the startup apps on boot and the like. I’m not a power user so I have no clue how to write my own script.
The Syncthing documentation discusses using the Cinnamon GUI to start on login (Starting Syncthing Automatically — Syncthing documentation). For a login script, you most likely have a file in your home directory called .bashrc, which is a shell script that runs commands on login.
Read that file, separately find where your Syncthing deployment is and the command line options you want to use, and you’ll be able to edit the file and add the command to the end. If you’re not sure, I’m happy to help you figure out the right command line.
yes, I have followed those steps to add syncthing to my startup apps window. but as mentioned before, that doesn’t work, and syncthing continues running after logout.
would launching syncthing via bashsrc actually terminate it when logging out? because from what I know, bashsrc only executes once on startup and that’s it, it doesn’t terminate anything on logout.