From cd730719846538bf04061f85adc1651f8c2a509d Mon Sep 17 00:00:00 2001 From: Thorsten Wilms Date: Sat, 31 Mar 2018 14:34:50 +0200 Subject: gnu: Add x11-socket-directory-service. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/desktop.scm (x11-socket-directory-service): New variable. (%desktop-services): Add it. Signed-off-by: Ludovic Courtès --- gnu/services/desktop.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'gnu/services') diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 8972529179..517d5d3efe 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -94,6 +94,8 @@ (define-module (gnu services desktop) xfce-desktop-service xfce-desktop-service-type + x11-socket-directory-service + %desktop-services)) ;;; Commentary: @@ -880,6 +882,24 @@ (define* (xfce-desktop-service #:key (config (xfce-desktop-configuration))) with the administrator's password." (service xfce-desktop-service-type config)) + +;;; +;;; X11 socket directory service +;;; + +(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 + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (let ((directory "/tmp/.X11-unix")) + (mkdir-p directory) + (chmod directory #o777)))))) + ;;; ;;; The default set of desktop services. @@ -912,6 +932,8 @@ (define %desktop-services (ntp-service) + x11-socket-directory-service + %base-services)) ;;; desktop.scm ends here -- cgit v1.2.3