guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31005: [PATCH] gnu: Add x11-socket-dir-service


From: Ludovic Courtès
Subject: bug#31005: [PATCH] gnu: Add x11-socket-dir-service
Date: Wed, 04 Apr 2018 13:36:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi Thorsten,

Thorsten Wilms <address@hidden> skribis:

> * gnu/services/desktop.scm (gnu): Export x11-socket-dir-service, define it,
>   add it to %desktop-services list.

I made the following cosmetic changes and committed.

Thanks!

Ludo’.

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 7f2d10d90..517d5d3ef 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -94,7 +94,7 @@
             xfce-desktop-service
             xfce-desktop-service-type
 
-            x11-socket-dir-service
+            x11-socket-directory-service
 
             %desktop-services))
 
@@ -887,15 +887,18 @@ with the administrator's password."
 ;;; X11 socket directory service
 ;;;
 
-(define x11-socket-dir-service
-  ;; Return a service that creates /tmp/.X11-unix. X11 servers, including
-  ;; XWayland, create their socket file there.
-  (simple-service 'x11-socket-dir
+(define x11-socket-directory-service
+  ;; Return a service that creates /tmp/.X11-unix.  When using X11, libxcb
+  ;; takes care of creating that directory.  However, when using XWayland, we
+  ;; need to create beforehand.  Thus, create it unconditionally here.
+  (simple-service 'x11-socket-directory
                   activation-service-type
-                  #~(begin (use-modules (guix build utils))
-                           (let ((p "/tmp/.X11-unix"))
-                             (mkdir-p p)
-                             (chmod p #o777)))))
+                  (with-imported-modules '((guix build utils))
+                    #~(begin
+                        (use-modules (guix build utils))
+                        (let ((directory "/tmp/.X11-unix"))
+                          (mkdir-p directory)
+                          (chmod directory #o777))))))
 
 
 ;;;
@@ -929,7 +932,7 @@ with the administrator's password."
 
          (ntp-service)
 
-         x11-socket-dir-service
+         x11-socket-directory-service
 
          %base-services))
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]