I am using Manjaro 17 with i3wm (if any relevance).
I want to run a single command on start-up to fix the my touchpad tap click setting. I wrote the script that enables the option in /usr/bin/
and change its mode as executable.
/usr/bin/touchpad-enable-tap-click:
#!/bin/bash
exec xinput set-prop 11 290 1
The script can be smootly executed in terminal without causing any problem.
Based on my research, I prepared a simple service file in /etc/systemd/system/
.
/etc/systemd/system/touchpad-enable-tap-click.service:
[Unit]
Description=Allow touchpad tap click
[Service]
Type=oneshot
ExecStart=/usr/bin/touchpad-enable-tap-click
[Install]
WantedBy=multi-user.target
than executed following command before reboot:
[sercan@compaq ~]$ sudo systemctl enable touchpad-enable-tap-click.service
Created symlink /etc/systemd/system/multi-user.target.wants/touchpad-enable-tap-click.service → /etc/systemd/system/touchpad-enable-tap-click.service.
I also tried full path.
The service is not working, as a result:
systemctl status
[sercan@compaq ~]$ systemctl status touchpad-enable-tap-click.service
● touchpad-enable-tap-click.service - Allow touchpad tap click
Loaded: loaded (/etc/systemd/system/touchpad-enable-tap-click.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2017-04-22 01:51:17 +03; 14min ago
Main PID: 32429 (code=exited, status=1/FAILURE)
Nis 22 01:51:17 compaq systemd[1]: Starting Allow touchpad tap click...
Nis 22 01:51:17 compaq bash[32429]: Unable to connect to X server
Nis 22 01:51:17 compaq systemd[1]: touchpad-enable-tap-click.service: Main process exited, code=exited, status=1/FAILURE
Nis 22 01:51:17 compaq systemd[1]: Failed to start Allow touchpad tap click.
Nis 22 01:51:17 compaq systemd[1]: touchpad-enable-tap-click.service: Unit entered failed state.
Nis 22 01:51:17 compaq systemd[1]: touchpad-enable-tap-click.service: Failed with result 'exit-code'.
journal -xe after attempting restart service:
Nis 22 02:09:52 compaq sudo[21550]: sercan : TTY=pts/0 ; PWD=/home/sercan ; USER=root ; COMMAND=/usr/bin/systemctl restart touchpad-enable-tap-click.service
Nis 22 02:09:52 compaq sudo[21550]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nis 22 02:09:52 compaq systemd[1]: Starting Allow touchpad tap click...
-- Subject: Unit touchpad-enable-tap-click.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit touchpad-enable-tap-click.service has begun starting up.
Nis 22 02:09:52 compaq bash[21553]: Unable to connect to X server
Nis 22 02:09:52 compaq systemd[1]: touchpad-enable-tap-click.service: Main process exited, code=exited, status=1/FAILURE
Nis 22 02:09:52 compaq systemd[1]: Failed to start Allow touchpad tap click.
-- Subject: Unit touchpad-enable-tap-click.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit touchpad-enable-tap-click.service has failed.
--
-- The result is failed.
Nis 22 02:09:52 compaq systemd[1]: touchpad-enable-tap-click.service: Unit entered failed state.
Nis 22 02:09:52 compaq systemd[1]: touchpad-enable-tap-click.service: Failed with result 'exit-code'.
Nis 22 02:09:52 compaq sudo[21550]: pam_unix(sudo:session): session closed for user root
I hope you can help me, I appreciate.