Hi Guix,

I just a wrote a small service for redshift¹. Redshift is a program
adjusting color temperature of the screen according to surroundings.

This program needs to communicate to X, so DISPLAY and XAUTHORITY must
be set correctly.

The only way I found to make my service work is something very hacky:

--8<---------------cut here---------------start------------->8---
(start #~(make-forkexec-constructor
          #$redshift-command
          #:user "mathieu"
          #:group "users"
          #:environment-variables
          '("DISPLAY=:0"
            "XAUTHORITY=/home/mathieu/.Xauthority")))
--8<---------------cut here---------------end--------------->8---

Is there a better way to define this kind of "user" service in Guix ?

Thanks,

Mathieu

¹: http://jonls.dk/redshift/

Reply via email to