![]() |
|
Proof of concept script to disable the touchpad while typing - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook (https://forum.pine64.org/forumdisplay.php?fid=76) +--- Forum: General Discussion on Pinebook (https://forum.pine64.org/forumdisplay.php?fid=77) +--- Thread: Proof of concept script to disable the touchpad while typing (/showthread.php?tid=4916) |
RE: Proof of concept script to disable the touchpad while typing - combs - 08-25-2017 it doesn't disable the password for your account--just for commands run with sudo. You can limit it so that only certain commands are run with no passwd. Lookie here https://askubuntu.com/questions/159007/how-do-i-run-specific-sudo-commands-without-a-password RE: Proof of concept script to disable the touchpad while typing - rookieone - 08-25-2017 Nice! The combo of the commands in sudoers and adding it to startup indeed starts it nicely in the background upon startup/login
RE: Proof of concept script to disable the touchpad while typing - daid - 08-27-2017 I don't run the script with sudo, shouldn't be needed, as user you should be able to do what it needs to do... RE: Proof of concept script to disable the touchpad while typing - combs - 08-27-2017 (08-27-2017, 07:56 AM)daid Wrote: I don't run the script with sudo, shouldn't be needed, as user you should be able to do what it needs to do... Code: combs@pinebook:/usr/local/bin$ python3 trackpadsleep.py
Unable to connect to X server
Traceback (most recent call last):
File "trackpadsleep.py", line 372, in <module>
TouchpadHack().inputReadThread()
File "trackpadsleep.py", line 332, in inputReadThread
f = open(event_path, "rb")
PermissionError: [Errno 13] Permission denied: '/dev/input/event0'Could probably just change perms on that, come to think of it... RE: Proof of concept script to disable the touchpad while typing - daid - 08-28-2017 Or add your user to the group "input"? RE: Proof of concept script to disable the touchpad while typing - Luke - 08-28-2017 (08-28-2017, 02:28 AM)daid Wrote: Or add your user to the group "input"? Tried that. I can now run the script without elevated privilages from terminal, but it still doesn't work on startup. RE: Proof of concept script to disable the touchpad while typing - Paul - 10-18-2017 Firstly, this is a brilliant script, very useful. I wish all laptops could run it! (That's a project for the future). Secondly, great idea to try to get it to run automatically at startup. I've struggled with this, I have to say, but have now got it working. I am relatively new to Ubuntu so forgive me if I have got any of this wrong, or write anything too obvious. This is assuming you have already got touchpadsleep.py to run properly. There are 2 stages: 1 Set up a startup program by:
paul ALL=(ALL)NOPASSWD:/usr/bin/python3 /usr/local/bin/touchpadsleep.py
RE: Proof of concept script to disable the touchpad while typing - dahni - 10-19-2017 i, too am using this. made a few tiny mods, see my here: http://dt.iki.fi/pbhacks/ RE: Proof of concept script to disable the touchpad while typing - southern.cross - 11-23-2017 Has anyone gotten this script to work in the Armbian OS for Pinebook? I get the following errors when I try to use it: Code: Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "touchpadsleep.py", line 312, in timeoutThread
device_number = self.findXInputDeviceNumber()
File "touchpadsleep.py", line 303, in findXInputDeviceNumber
res = subprocess.run(["/usr/bin/xinput", "list"], stdout=subprocess.PIPE).stdout
File "/usr/lib/python3.5/subprocess.py", line 693, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/xinput'RE: Proof of concept script to disable the touchpad while typing - rookieone - 11-24-2017 (11-23-2017, 08:51 PM)southern.cross Wrote: Has anyone gotten this script to work in the Armbian OS for Pinebook? I get the following errors when I try to use it: Looks like xinput is not installed: https://packages.ubuntu.com/search?keywords=xinput&searchon=names&suite=artful§ion=all After a: sudo apt-get install xinput it ill probaby work? (works on my pinebook, Armbian 5.34) |