unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: guix-devel@gnu.org
Subject: Defining user services in Guix.
Date: Sat, 22 Apr 2017 18:50:27 +0200	[thread overview]
Message-ID: <87o9vowfn0.fsf@gmail.com> (raw)


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	other threads:[~2017-04-22 16:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-22 16:50 Mathieu Othacehe [this message]
2017-04-22 18:31 ` Defining user services in Guix Danny Milosavljevic
2017-04-22 23:06   ` Ludovic Courtès
2017-04-23 16:27     ` Mathieu Othacehe
2017-04-25  0:02       ` Mekeor Melire
2017-04-25  8:36         ` Ricardo Wurmus
2017-04-27 13:36           ` Ludovic Courtès
2017-04-28 15:22             ` Mathieu Othacehe
2017-05-02 10:02               ` Ludovic Courtès
2017-05-02 19:23                 ` Mathieu Othacehe
2017-05-02 21:21                   ` Ludovic Courtès
2017-05-02 21:44                     ` Ricardo Wurmus
2017-05-03  9:43                       ` Mathieu Othacehe
2017-06-11  1:29                 ` Invoking user shepherd; Was: Re: Defining *user* " Danny Milosavljevic
2017-06-11  8:33                   ` Mathieu Othacehe
2017-06-13  8:00                     ` Ludovic Courtès
2017-06-13  8:06                   ` Ludovic Courtès
2017-06-13 14:32                     ` Danny Milosavljevic
2017-06-13 16:06                       ` Ludovic Courtès
2017-05-02 21:22               ` Defining user " Ludovic Courtès
2017-04-22 23:53   ` Carlo Zancanaro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9vowfn0.fsf@gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).