I want xflux to run automatically as a daemon when logging into my 15.04 desktop account. It would seem that Upstart should be the way to go. I am able to run my Upstart job manually, but I have failed to get it to run automatically upon login. I need to keep the .conf file local to my account, so I want to run it as an Upstart session job. I created ~/.config/upstart/xflux.conf like this:

start on runlevel [2345]

stop on runlevel [016]

exec /home/me/bin/xflux -l 0 -g 0 -nofork

I can run this fine via "start xflux" & "stop xflux", but it won't run automatically on login. Googling did not help.

I was looking at the available events for session jobs, but not sure if that's my problem really. I kind of thought I'd see upstart-event-bridge running, but that does not seem to be the case.

It would seem to defeat the purpose to add "start xflux" to my .profile or some other init file.


After finding the list of common user events in the Upstart Cookbook, I changed the .conf file to start on desktop-start and stop on desktop-end, which seems to work. In addition I added a five second delay to avoid getting reset to the old display state later during startup:

start on desktop-start

stop on desktop-end

  sleep 5
  exec /home/me/bin/xflux -l 0 -g 0 -nofork
end script

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.