natask / gestures

Fluid gestures for Linux.
MIT License
67 stars 7 forks source link

Program doesn't work on openSUSE #9

Closed ghost closed 3 years ago

ghost commented 3 years ago

When installed on openSUSE, the program refuses to start


Previous comment:

Describe the bug When running install script, it doesn't use zypper to install dependencies.

To Reproduce Use openSUSE, run install.sh

Expected behavior Dependencies should be installed using zypper.

Actual behavior Log is full of dnf errors due to the lack of repository.

Debugging

╰─$ ./install.sh 
Installing evtest, daemonize, evemu, evemu-tools, python3-pip, python-pip, xdotool, xkbset.
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value

Installing evtest
[sudo] password for root: 
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing daemonize
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing evemu
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing evemu-tools
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing python3-pip
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing python-pip
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing xdotool
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing xkbset
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
Installing pathlib, simplejson.
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value

Installing pathlib through pip
Collecting pathlib
  Downloading pathlib-1.0.1.tar.gz (49 kB)
     |████████████████████████████████| 49 kB 7.2 kB/s 
Using legacy 'setup.py install' for pathlib, since package 'wheel' is not installed.
Installing collected packages: pathlib
    Running setup.py install for pathlib ... done
Successfully installed pathlib-1.0.1

Installing simplejson through pip
Collecting simplejson
  Downloading simplejson-3.17.2-cp38-cp38-manylinux2010_x86_64.whl (137 kB)
     |████████████████████████████████| 137 kB 2.4 kB/s 
Installing collected packages: simplejson
Successfully installed simplejson-3.17.2

Placing gestures getConfig.py in /usr/local/bin.

Should I install utilities, evemu_do, flip, killTouchpad, orientation, reset_keyboard, restartTouchpad,
restartTouchpadAndPen, save_and_close, set_orientation,
toggle_global_window_switcher, in /usr/local/bin? Recommended for default operation.
(y/n):y
Placing evemu_do, flip, killTouchpad, orientation, reset_keyboard, restartTouchpad,
restartTouchpadAndPen, save_and_close, set_orientation,
toggle_global_window_switcher in /usr/local/bin.

Would you like xdo-tool version (x or y) or evemu_do version (e or n)? xdo-tool version is recommended unless using wayland.
([x/y]do-tool/[e/n]vemu_do):e
Placing evemu_do version of config file in /home/golden/.config/.
cp: cannot stat '/home/golden/.config//gestures.conf': No such file or directory
./install.sh: line 89: break: only meaningful in a `for', `while', or `until' loop

Placing desktop file in /home/golden/.config/autostart.
Adding user golden to input group.
Adding user golden to group input
Starting gestures. Welcome!
Traceback (most recent call last):
  File "/usr/local/bin/gestures", line 814, in <module>
    subprocess.Popen(["daemonize", sys.argv[0], "execute"])
  File "/usr/lib64/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'daemonize'
╰─$ gestures                                                                             127 ↵
Traceback (most recent call last):
  File "/usr/local/bin/gestures", line 814, in <module>
    subprocess.Popen(["daemonize", sys.argv[0], "execute"])
  File "/usr/lib64/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'daemonize'
╰─$ cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20210205"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20210205"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20210205"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo"

Additional context openSUSE uses rpm package but not rpm/dnf command line. dnf can be manually installed but it comes without RHEL repository.

ghost commented 3 years ago

zypper equivalent: evtest -> evtest daemonize -> python38-daemonize (Fixed python version, might cause issues) evemu -> evemu evemu-tools -> Included in evemu python3-pip -> python38-pip (Fixed python version, might cause issues) python-pip -> Unknown, but python38-pip should be enough xdotool -> xdotool xkbset -> setxkbmap

After manually installing dependencies, gestures still won't work, but that's out of the scope of this issue.

natask commented 3 years ago

can you try gestures debug. see if you get output. also check gestures debug | grep Handlers.

I have added setxkbmap, python38-daemonize, python38-pip.

natask commented 3 years ago

you installed the evemu version. can you check if it works on your machine. for example run "evemu_do alt+tab" and check if it switches applications

ghost commented 3 years ago

can you try gestures debug. see if you get output. also check gestures debug | grep Handlers.

I have added setxkbmap, python38-daemonize, python38-pip.

I believe it's still not fixed.

╭─golden@DESKTOP-G4KA9BY ~/build/gestures ‹master*› 
╰─$ git pull
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 10 (delta 6), reused 9 (delta 5), pack-reused 0
Unpacking objects: 100% (10/10), 1.45 KiB | 124.00 KiB/s, done.
From https://github.com/natask/gestures
   d8bd080..5c8c2b8  master     -> origin/master
Updating d8bd080..5c8c2b8
Fast-forward
 all_pkg_requirements |  3 +++
 gestures             |  6 +++---
 install.sh           | 70 +++++++++++++++++++++++++++++++------------------------------
 pkg_requirements     |  3 +++
 utilities/evemu_do   | 76 ++++++++++++++++++++++++-------------------------------------------
 5 files changed, 72 insertions(+), 86 deletions(-)
╭─golden@DESKTOP-G4KA9BY ~/build/gestures ‹master*› 
╰─$ ./install.sh 
Installing evtest, daemonize, evemu, evemu-tools, python3-pip, python-pip, xdotool, xkbset, setxkbmap, python38-daemonize, python38-pip.
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value

Installing evtest
[sudo] password for root: 
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing daemonize
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing evemu
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing evemu-tools
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing python3-pip
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing python-pip
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing xdotool
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing xkbset
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing setxkbmap
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing python38-daemonize
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing python38-pip
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
Installing pathlib, simplejson.
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value

Installing pathlib through pip
Collecting pathlib
  Using cached pathlib-1.0.1.tar.gz (49 kB)
Using legacy 'setup.py install' for pathlib, since package 'wheel' is not installed.
Installing collected packages: pathlib
    Running setup.py install for pathlib ... done
Successfully installed pathlib-1.0.1

Installing simplejson through pip
Collecting simplejson
  Using cached simplejson-3.17.2-cp38-cp38-manylinux2010_x86_64.whl (137 kB)
Installing collected packages: simplejson
Successfully installed simplejson-3.17.2

Placing gestures getConfig.py in /usr/local/bin.

Should I install utilities, evemu_do, flip, killTouchpad, orientation, reset_keyboard, restartTouchpad,
restartTouchpadAndPen, save_and_close, set_orientation,
toggle_global_window_switcher, in /usr/local/bin? Recommended for default operation.
(y/n):

I've fixed that in my own branch.

ghost commented 3 years ago

you installed the evemu version. can you check if it works on your machine. for example run "evemu_do alt+tab" and check if it switches applications

╰─$ evemu_do alt+tab works for me, but

╰─$ gestures debug                                                                         1 ↵
Traceback (most recent call last):
  File "/usr/local/bin/gestures", line 812, in <module>
    main()
  File "/usr/local/bin/gestures", line 670, in main
    dev_path = item[1].split("=")[1]
IndexError: list index out of range
natask commented 3 years ago

I added a couple more debug points. can examine again what "gestures debug" returns.

ghost commented 3 years ago
╰─$ gestures debug                                                                         1 ↵
('mice_items = [\'\\nS: Sysfs=/devices/virtual/input/input23\\nU: Uniq=\\nH: Handlers=mouse2 event13 \\n\', \'\\nS: Sysfs=/devices/virtual/input/input24\\nU: Uniq=\\nH: Handlers=mouse3 event14 \\n\', \'\\n\\nI: Bus=0003 Vendor=045e Product=09c0 Version=0111\\nN: Name="Microsoft Surface Type Cover Mouse"\\n\', \'\\nS: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:045E:09C0.0003/input/input33\\nU: Uniq=\\nH: Handlers=mouse0 event2 \\n\', \'\\nS: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:045E:09C0.0003/input/input36\\nU: Uniq=\\nH: Handlers=mouse1 event5 \\n\', \'\\n\\nI: Bus=0005 Vendor=045e Product=0932 Version=0117\\nN: Name="Surface Arc Mouse"\\n\', \'\\nS: Sysfs=/devices/virtual/misc/uhid/0005:045E:0932.0007/input/input62\\nU: Uniq=f2:35:dd:ad:f0:b9\\nH: Handlers=mouse4 event22 \\n\', \'\\n\\nI: Bus=0005 Vendor=045e Product=0932 Version=0117\\nN: Name="Surface Arc Mouse Keyboard"\\n\', \'\\n\\nI: Bus=0005 Vendor=045e Product=0932 Version=0117\\nN: Name="Surface Arc Mouse Consumer Control"\\n\', \'\\n\\nI: Bus=0005 Vendor=045e Product=0932 Version=0117\\nN: Name="Surface Arc Mouse"\\n\', \'\\n\\nI: Bus=0005 Vendor=045e Product=0932 Version=0117\\nN: Name="Surface Arc Mouse"\']',)
("item = ['', 'S: Sysfs=/devices/virtual/input/input23', 'U: Uniq=', 'H: Handlers=mouse2 event13 ', '']",)
("item = ['', 'S: Sysfs=/devices/virtual/input/input24', 'U: Uniq=', 'H: Handlers=mouse3 event14 ', '']",)
('item = [\'\', \'\', \'I: Bus=0003 Vendor=045e Product=09c0 Version=0111\', \'N: Name="Microsoft Surface Type Cover Mouse"\', \'\']',)
Traceback (most recent call last):
  File "/usr/local/bin/gestures", line 797, in <module>
    main()
  File "/usr/local/bin/gestures", line 652, in main
    dev_path = item[1].split("=")[1]
IndexError: list index out of range
natask commented 3 years ago

I see. fixed in latest commit.

natask commented 3 years ago

feel free to reopen if it is not fixed.