bulletmark / libinput-gestures

Actions gestures on your touchpad using libinput
3.9k stars 241 forks source link

libinput-gestures failed to start as a desktop application. #353

Closed kibasaur closed 1 year ago

kibasaur commented 1 year ago

Discussed in https://github.com/bulletmark/libinput-gestures/discussions/352

Originally posted by **kibasaur** July 21, 2023 Hi! I downloaded this and managed to get it to work but then I changed some settings and it won't autostart nor am I able to start it by running either the regular command or the system command. I removed everything and reinstalled but can't get it to work. I can change the autostart settings etc but gestures won't start at launch and running the start command doesn't work either. I have rebooted like 20 times in total trying to see if the group thing is an issue. I don't know what I am doing wrong, help would be greatly appreciated!

-> sudo libinput-gestures -l
    libinput-gestures: session unknown+unknown on Linux-5.19.0-46-generic-x86_64-with-glibc2.35, python 3.10.6, libinput 1.20.0 
    --[removed hash]-- 
    Gestures configured in /etc/libinput-gestures.conf: 
    swipe up           _internal ws_up 
    swipe down         _internal ws_down
    swipe left         xdotool key alt+Right
    swipe right        xdotool key alt+Left
    pinch in           xdotool key super+s
    pinch out          xdotool key super+s
    libinput-gestures: device /dev/input/by-path/platform-AMDI0010:01-event-mouse(event7): SYNA2BA6:00 06CB:CE2D Touchpad
and

-> libinput-gestures-setup status
    libinput-gestures is installed.
    libinput-gestures is set up as a desktop application.
    libinput-gestures is not currently running.
    libinput-gestures is set to autostart as a desktop application.
    libinput-gestures is using default configuration file.
bulletmark commented 1 year ago
  1. You have created this both as a discussion and an issue, why create both? Which one should I delete?

  2. Please edit your post to put the hash back in. That tells me the version of libinput-gestures you are running. It does not identify anything personal.

bulletmark commented 1 year ago

I deleted the discussion as this will be an issue with your personal environment or setup.

bulletmark commented 1 year ago

Also, why have you run libinput-gestures -l with sudo? Please run it as the instructions say, i.e. without sudo.

kibasaur commented 1 year ago

It was suggested by github that I create an issue after I created a discussion, that's why I created both, thought it would be moved to issues.

If I run without sudo I get this (hash is in there):


-> libinput-gestures -l
libinput-gestures: session cinnamon+x11 on Linux-5.19.0-46-generic-x86_64-with-glibc2.35, python 3.10.6, libinput 1.20.0
Hash: 1cfe6ad528f2202a483fea24b3cd7f47
Traceback (most recent call last):
  File "/usr/bin/libinput-gestures", line 839, in 
    main()
  File "/usr/bin/libinput-gestures", line 718, in main
    confname = read_conf(args.conffile, CONFNAME)
  File "/usr/bin/libinput-gestures", line 637, in read_conf
    get_conf(confpath, confname)
  File "/usr/bin/libinput-gestures", line 597, in get_conf
    with conffile.open() as fp:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
IsADirectoryError: [Errno 21] Is a directory: '/home/kibasaur/.config/libinput-gestures.conf'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_libinput-gestures.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/libinput-gestures", line 839, in 
    main()
  File "/usr/bin/libinput-gestures", line 718, in main
    confname = read_conf(args.conffile, CONFNAME)
  File "/usr/bin/libinput-gestures", line 637, in read_conf
    get_conf(confpath, confname)
  File "/usr/bin/libinput-gestures", line 597, in get_conf
    with conffile.open() as fp:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
IsADirectoryError: [Errno 21] Is a directory: '/home/kibasaur/.config/libinput-gestures.conf'

bulletmark commented 1 year ago

Did you not notice the error message? It says you have created your configuration file ~/.config/libinput-gestures.conf as a directory, not a file. That is a mistake I could not imagine but I will add a check for this to give a better error message if somebody else does it. Please fix that and try again. If something else goes wrong then paste the output here of libinput-gestures -l, or close this bug if it works.

kibasaur commented 1 year ago

Wow! Thank you so much!

I copied my config file and replaced the directory (which is strange that it was a directory, considering I never created any files or folders, it was just a fresh install), and then I was able to start it and now it runs correctly!

I'll post libinput-gestures -l anyways below


-> libinput-gestures -l
libinput-gestures: session cinnamon+x11 on Linux-6.2.0-25-generic-x86_64-with-glibc2.35, python 3.10.6, libinput 1.20.0
Hash: 1cfe6ad528f2202a483fea24b3cd7f47
Gestures configured in ~/.config/libinput-gestures.conf:
swipe right      4 _internal ws_up
swipe left       4 _internal ws_down
pinch in           xdotool key super+s
pinch out          xdotool key super+s
libinput-gestures: device /dev/input/by-path/platform-AMDI0010:01-event-mouse(event14): SYNA2BA6:00 06CB:CE2D Touchpad
libinput-gestures is installed.
libinput-gestures is set up as a desktop application.
libinput-gestures is currently running as a desktop application.
libinput-gestures is set to autostart as a desktop application.
libinput-gestures is using custom configuration file.