Thorsten Wilms <[email protected]> writes:

> On 22.03.2018 14:04, Thorsten Wilms wrote:
>> On 22.03.2018 00:00, Ricardo Wurmus wrote:
>>>
>>> Thorsten Wilms <[email protected]> writes:
>>>
>>>> Initially I thought creation of /tmp/.X11-unix should be tied to the
>>>> xorg-server-xwayland package, but since it is more generic: which
>>>> component should create that dir on Guix SD (based on what)?
>>>
>>> It is needed at run-time (because packages cannot create files outside
>>> of their store prefix at build time), so it should be created by a
>>> system service.  A service is not the same as a shepherd service; we
>>> also have activation services that run once and only create a file or a
>>> directory.
>
> Revisiting, this wasn't too hard, actually:
>
> Using (guix gexp) implied:
>
> ; Create /tmp/.X11-unix and make it writeable to, as required by 
> weston-launch with XWayland enabled:
> (define mkdir-x11-service
>    (simple-service 'mkdir-x11
>                    activation-service-type
>                    #~(begin (let ((p "/tmp/.X11-unix"))
>                                (mkdir-p p)
>                                (chmod p #o777)))))
>
> Or perhaps rather:
>
> (define mkdir-x11-service
>    (simple-service 'mkdir-x11
>                    activation-service-type
>                    #~(begin (use-modules (guix build utils))
>                             (let ((p "/tmp/.X11-unix"))
>                                (mkdir-p p)
>                                (chmod p #o777)))))
>
>
> I can't find anything that suggests a way to automatically add such a 
> service to the operating system, if xorg-server-xwayland (or anything 
> else that would use that dir) is installed.

It could be done with a "profile hook" in (guix profiles).  Although for
the common case I suppose this will be done by a display manager?

Attachment: signature.asc
Description: PGP signature

Reply via email to