[PATCH] gnu: Add x11-socket-dir-service

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Thorsten Wilms
Owner
unassigned
Submitted by
Thorsten Wilms
Severity
normal

Debbugs page

Thorsten Wilms wrote 7 years ago
(address . guix-patches@gnu.org)
5fa3c48f-460e-f3d6-29b2-967fb462b060@thorstenwilms.com
* gnu/services/desktop.scm (gnu): Export x11-socket-dir-service, define it,
add it to %desktop-services list.
---
gnu/services/desktop.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 897252917..ef3a5457e 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -94,6 +94,8 @@
xfce-desktop-service
xfce-desktop-service-type

+ x11-socket-dir-service
+
%desktop-services))

;;; Commentary:
@@ -882,6 +884,21 @@ 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
+ activation-service-type
+ #~(begin (use-modules (guix build utils))
+ (let ((p "/tmp/.X11-unix"))
+ (mkdir-p p)
+ (chmod p #o777)))))
+
+
+;;;
;;; The default set of desktop services.
;;;

@@ -912,6 +929,8 @@ with the administrator's password."

(ntp-service)

+ x11-socket-dir-service
+
%base-services))

;;; desktop.scm ends here
--
2.11.0
Ludovic Courtès wrote 7 years ago
(name . Thorsten Wilms)(address . self@thorstenwilms.com)(address . 31005-done@debbugs.gnu.org)
87d0zffbkl.fsf@gnu.org
Hi Thorsten,

Thorsten Wilms <self@thorstenwilms.com> skribis:

Toggle quote (3 lines)
> * 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’.
Toggle diff (48 lines)
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))
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 31005@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 31005
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help