this post was submitted on 03 May 2024
4 points (61.1% liked)

Programming

17020 readers
261 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

Many commertial apps have options to run apps at logins... Is there any cross-platform way to do so in python or other languages?

top 6 comments
sorted by: hot top controversial new old
[–] xmunk@sh.itjust.works 13 points 4 months ago (2 children)

The ways to register programs to run at startup vary wildly from platform to platform but they're all relatively simple. I might suggest you just look into how to do it manually before looking for a library since it's extremely trivial (at least on windows/Linux - I'm not familiar with how macs do it but I hope it's the same approach as linux).

[–] bitfucker@programming.dev 2 points 4 months ago (1 children)

If it is trivial in linux, it shouldn't be vary wildly. But the reality is that most people just assume systemd and everything else is an after though. I agree that it would be nice if there is a single API that we can agree on, but adding another standard just making things worse. I'd say it is not that trivial due to the variety but also not that hard to do for each.

[–] xmunk@sh.itjust.works 1 points 4 months ago

I'm pretty sure that even if systemd is in place you can still use /etc/init.d

[–] Miaou@jlai.lu 2 points 4 months ago* (last edited 4 months ago)

Extremely trivial? Init stuff probably shouldn't be touched by random user app, systemd cannot always be assumed, login shell can probably do this but syntax will vary by shell, and the only other I can think of is WM dépendent (although I assume the big ones will agree on using desktop files, i3 for example does not, and location might vary there too).

It's not difficult but to handle this generically requires some work to handle various scenarios.

[–] bizdelnick@lemmy.ml 4 points 4 months ago

Too specific I guess.