diff mbox series

[bug#55235] gnu: Add touchegg.

Message ID XM9MMzn5dXqYw9ZTnFAHyAMPaXNLD9K_mFJMenpfkrClevP0ludOhw_At8zydjXSwU30V9ZnNkcw60jDwcHzGG-idCYHPtyjgJCrTbljsz0=@protonmail.com
State Accepted
Headers show
Series [bug#55235] gnu: Add touchegg. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Rene Saavedra May 7, 2022, 9:53 p.m. UTC
hi Maxime,

>
> Doesn't look like a toy to me.
moved to gnu/packages/linux.scm

>
> What does it need root for?
touchegg --daemon requires to detect touchpad device.

> Is it Linux-specific? Also, does it work in a pure environment (./pre-
> inst-env guix shell --pure touchegg -- touchegg)?
fixed synopsis.

don't work in a pure environment, see error:
--
rex@crash ~/dev/guix$ ./pre-inst-env guix shell --pure touchegg -- touchegg --daemon
Touchégg v2.0.14.
Starting Touchégg in daemon mode
Starting daemon server...
Generating D-Bus introspection data
Creating D-Bus server
Server started at address unix:abstract=touchegg
A list of detected compatible devices will be displayed below:
Warning: Error opening device /dev/input/event3
Warning: Error opening device /dev/input/event0
Warning: Error opening device /dev/input/event1
Warning: Error opening device /dev/input/event5
Warning: Error opening device /dev/input/event8
Warning: Error opening device /dev/input/event6
Warning: Error opening device /dev/input/event9
Warning: Error opening device /dev/input/event10
Warning: Error opening device /dev/input/event11
Warning: Error opening device /dev/input/event7
Warning: Error opening device /dev/input/event2
Warning: Error opening device /dev/input/event4
--

>
> The exact library used seems like an implementation detail to me.
description fixed.

Cheers
--
Rene

Comments

M May 8, 2022, 10:58 a.m. UTC | #1
Rene Saavedra via Guix-patches via schreef op za 07-05-2022 om 21:53
[+0000]:
> > Is it Linux-specific? Also, does it work in a pure environment
> (./pre-
> > inst-env guix shell --pure touchegg -- touchegg)?
> fixed synopsis.
> 
> don't work in a pure environment, see error:
> --
> rex@crash ~/dev/guix$ ./pre-inst-env guix shell --pure touchegg --
> touchegg --daemon

That's the daemon, which apparently requires root whereas you're
running it as non-root (see Error opening device.  Try

(not sure if the -E is 
$ ./pre-inst-env guix shell --pure touchegg -- sudo -E touchegg --daemon

and

$ ./pre-inst-env guix shell --pure touchegg -- touchegg

instead.

Greetings,
Maxime.
Rene Saavedra May 15, 2022, 3:46 p.m. UTC | #2
Hi Maxime,

> That's the daemon, which apparently requires root whereas you're
> running it as non-root (see Error opening device. Try
>
> (not sure if the -E is
> $ ./pre-inst-env guix shell --pure touchegg -- sudo -E touchegg --daemon

rex@crash ~/dev/guix$ ./pre-inst-env guix shell --pure touchegg -- $(sudo touchegg --daemon)

> $ ./pre-inst-env guix shell --pure touchegg -- touchegg
--
rex@crash ~/dev/guix$ ./pre-inst-env guix shell --pure touchegg -- touchegg
Touchégg v2.0.14.
Starting Touchégg in client mode
Parsing your configuration file...
Using configuration file "/home/rex/.config/touchegg/touchegg.conf"
Configuration parsed successfully
Connecting to Touchégg daemon...
Connection with Touchégg established
--

With this, touchegg works in a pure environment!.


Cheers
--
Rene
Rene Saavedra May 18, 2022, 10:24 p.m. UTC | #3
Hi Maxime,

I will send an updated version of the package that works with a Shepherd service.


Cheers
--
Rene
diff mbox series

Patch

From 81a71a1cad5bd86acfbb6751a92e3dfd0a579591 Mon Sep 17 00:00:00 2001
From: Rene Saavedra <nanuui@protonmail.com>
Date: Sat, 7 May 2022 16:39:20 -0500
Subject: [PATCH] gnu: Add touchegg.

* gnu/packages/linux.scm (touchegg): New variable.
---
 gnu/packages/linux.scm | 49 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9bb2314ebd..272fd23db0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -61,6 +61,7 @@ 
 ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022 Rene Saavedra <nanuui@protonmail.com>
 
 ;;;
 ;;; This file is part of GNU Guix.
@@ -110,6 +111,7 @@  (define-module (gnu packages linux)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages golang)
   #:use-module (gnu packages gperf)
@@ -9179,3 +9181,50 @@  (define-public libtree
      "This tool turns @command{ldd} into a tree and explains how shared
 libraries are found or why they cannot be located.")
     (license license:expat)))
+
+(define-public touchegg
+  (package
+    (name "touchegg")
+    (version "2.0.14")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JoseExposito/touchegg")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0shvslz0c8nqx5f988z55qjc9xw0in9rb7b19r6vr1f7cdkqb6yr"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; No tests exist
+       #:configure-flags
+       (list "-DUSE_SYSTEMD=OFF") ; No systemd
+       #:phases
+       (modify-phases %standard-phases
+         ;; gnome-shell launch touchegg daemon on startup, touchegg daemon
+         ;; requires root privileges to detect touchpad or touchscreen device.
+         (add-after 'unpack 'disable-autostart
+           (lambda _
+             (substitute* "installation/touchegg.desktop"
+               (("Exec=touchegg")
+                "Exec=false")))))))
+    (native-inputs
+     (list
+      pkg-config))
+    (inputs
+     (list
+      cairo
+      gtk+
+      libgudev
+      libinput
+      libxrandr
+      libxtst
+      pugixml))
+    (home-page "https://github.com/JoseExposito/touchegg")
+    (synopsis "Multitouch gesture recognizer")
+    (description
+     "Touchégg is an application that runs in the background and transform the
+gestures you make on your touchpad or touchscreen into visible actions in your
+desktop.")
+    (license license:gpl3+)))
-- 
2.34.0