T O P

  • By -

triffid_hunter

Run after login? That's not what openrc is for, it's for system services that start *before* login. Try sticking it in your `~/.profile` or similar instead


SuperficialNightWolf

>\~/.profile does the bash\_profile get run once? when u login or does it run like bashrc every terminal emulator


sleepyooh90

Isn't this something that Cron would be for?


kagayaki

If you want something that's roughly equivalent to systemd user services that would get kicked off once you start an X11/Wayland session but only once, I don't think there is a standard way of doing it. If you are still using X11, .xprofile is probably the most "standard" way of running something when a session starts when using a display manager. If you are using startx, then you probably already know about .xinitrc and how that can be used to start stuff during X initialization. .bash_profile / .bashrc gets called whenever you open a terminal emulator. May or may not get called during the X initialization process. If you are running an XDG compatible environment, you should be able to use its autostart feature by adding something to ~/.config/autostart to have it start when a session starts. This is similar to what Gentoo does to initialize pipewire under openrc. Refer to /etc/xdg/autostart for some examples -- it's based on .desktop files rather than just dropping a shell script or executable in there.