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

  • xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    13
    ·
    6 months ago

    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
      link
      fedilink
      arrow-up
      3
      ·
      6 months ago

      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.

    • Miaou@jlai.lu
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      6 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.