0

What I want is simple: I want that after my user login through agetty, my display manager (LightDM) or whatever login way, a specific service of OpenRC be run. Is there a way to setup that?.

My personal motivation behind that: I have a emacs daemon running as OpenRC service for my specific user and I need that this service starts only after a dbus session is created. An way to accomplish this is running emacs daemon after dbus-launch (related history) runs my main session (currently XFCE session), which for instance happens after a login through the LightDM display manager .

What I do as workaround is: restart emacs after login with my user to initialize correctly dbus integration with emacs. But this is just painful. It must have a better way to do that.

  • I'm not sure I understand, but maybe ~/.profile or ~/.xinitrc? – n.caillou Nov 27 '17 at 12:05
  • I can run services with cow powers (root) on ~/.profile or ~/.xinitrc without prompting for auth (sudo)? Because if I start "manually" the OpenRC services, I need to run as root as usual (su or sudo). – Manoel Vilela Nov 27 '17 at 12:36
-2

Yes, it's possible. You just have to add sudo rc-service yourservice start to your user's .bashrc.

  • Using sudo on .bashrc... I don't want do that for a couple of reasons. Thanks for the attempt, but sorry. This is not what I want. – Manoel Vilela Nov 27 '17 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.