Article 4S05Q How to start a service only when a user log to Desktop Environment

How to start a service only when a user log to Desktop Environment

by
linom
from LinuxQuestions.org on (#4S05Q)
Hello Members,

I trying to find a solution on starting a service or to execute a binary only when a user logs to his desktop environment. Basically, my binary is dependent on the Display environment of the user.

I tried with systemctl and PAM methods but unable to find a way. I tried with a script using cron, which would check the Display environment and start the binary. But i would like to use the service method rather than the cron method.latest?d=yIl2AUoC8zA latest?i=0FgSFfRgg_E:uUFJVxXKTRE:F7zBnMy latest?i=0FgSFfRgg_E:uUFJVxXKTRE:V_sGLiP latest?d=qj6IDK7rITs latest?i=0FgSFfRgg_E:uUFJVxXKTRE:gIN9vFw0FgSFfRgg_E
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments