News for hackers. Stuff that matters.
Re:Sudo for Windows by oflebbe on Thursday February 08, 2024 @02:19PM (#39306273)
Next: systemd for windows?
Re:Sudo for Windows by cogman10 on Thursday February 08, 2024 @02:29PM (#39306420)
Already there. Windows has had services for a long time managed pretty similarly to systemd/launchd.
Re:Sudo for Windows by madspindel on Thursday February 08, 2024 @05:09PM (#39308466)
Well, compare how to start syncthing automatically on Windows: https://docs.syncthing.net/users/autostart.html

On Debian I could just type:

systemctl --user enable --now syncthing.service

Native systemd on Windows would be awesome. Microsoft should hire the creator of systemd...

Re:Sudo for Windows by bigstrat2003 on Thursday February 08, 2024 @07:09PM (#39309606)
Looking at that page, it looks like syncthing chooses to not provide a Windows service. That is where 100% of the complexity is coming from. If they did provide a Windows service, then it would be as simple as opening the service manager, and setting the startup type from "manual" to "automatic".

It's not fair to blame Windows for the developers of an app not using its features. Similarly, if syncthing didn't bother to create a unit file on Linux, your example would no longer be a simple one liner. That wouldn't be systemd's fault though.

Re:Sudo for Windows by marwis on Thursday February 08, 2024 @07:31PM (#39309798)
The manual GUI steps could be replaced with single command line on windows too.

https://learn.microsoft.com/en-us/windows-server/administrat...

Re:Sudo for Windows by pjmlp on Thursday February 08, 2024 @11:38PM (#39311467)
Powershell exists.
Re:Sudo for Windows by magicalhippo on Friday February 09, 2024 @05:31AM (#39313440)
There's sc[1] on Windows for this, though many services can do it themselves, eg

    myservice.exe /install
Of course, the application must support the service interface[2] to do this, which is like providing the .service file for systemd.

The key difference is that it's built into the application[3] in Windows, not external like with systemd, which has pros and cons.

[1]: https://learn.microsoft.com/en-us/windows-server/administrat...

[2]: https://learn.microsoft.com/en-us/windows/win32/services/ser...

[3]: https://learn.microsoft.com/en-us/windows/win32/services/ser...

Re:Sudo for Windows by jraph on Thursday February 08, 2024 @07:52PM (#39309980)
Coincidentally, Lennart works at MS. I don't know what he works on there though.