@wxl: I am so frustrated that I forgot to thank you for your very detailed explanations, Thank you
âPearls before swineâ
@wxl: Touchpad script
Found a solution but it works not always: Why?
Your script
# Turn it on
xinput set-prop "$(xinput list | grep -i touchpad | cut -d'=' -f2 | cut -d$'\t' -f1)" "Tapping Enabled" 1
doesn not work properly in my case, because of two âTapping Enabledâ lines in my touchpad list, see here:
Device 'ETPS/2 Elantech Touchpad':
Device Enabled (151): 1
Coordinate Transformation Matrix (153): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (307): 0
libinput Tapping Enabled Default (308): 0
So, I changed it to
xinput set-prop "$(xinput list | grep -i touchpad | cut -d'=' -f2 | cut -d$'\t' -f1)" "Tapping Enabled (" 1
This worked fine for some time, being able to change Tap on/Tap off just replacing 1 with 0 and vice versa). But now it does not anymore, it does not tap on, and there is an errotmodification, see later :
Response after running the script:
property 'Tapping Enabled (' doesn't exist, you need to specify its type and format
This is eve more strange sice hte property âTapping Enabledâ is correctly found in my test script, i.e., both numbers correctly turn out, MY_TOUCHPAD_ID
and MY_TOUCHPAD_STATE
, 13 and 0 (iTap off, the latter):
#!/bin/bash
# Turn it on
MY_TOUCHPAD_ID="$(xinput list | grep -i touchpad | cut -d'=' -f2 | cut -d$'\t' -f1)"
MY_TOUCHPAD_STATE="$(xinput list-props $MY_TOUCHPAD_ID | grep -i "Tapping Enabled (" | cut -f3)"
echo $MY_TOUCHPAD_ID
echo $MY_TOUCHPAD_STATE
read -p "Press [Enter] key to continue..."
# This is your original
# xinput set-prop "$(xinput list | grep -i touchpad | cut -d'=' -f2 | cut -d$'\t' -f1)" "Tapping Enabled" 1
# This is my modification
xinput set-prop "$(xinput list | grep -i touchpad | cut -d'=' -f2 | cut -d$'\t' -f1)" "Tapping Enabled (" 1
# xinput set-prop $MY_TOUCHPAD_ID $MY_TOUCHPAD_STATE 1
echo $MY_TOUCHPAD_ID
echo $MY_TOUCHPAD_STATE
read -p "Press [Enter] key to continue..."
When I run it now I get:
13
0
Press [Enter] key to continue... property 'Tapping Enabled (' doesn't exist, you need to specify its type and format
13
0
13 and 0 are correct, but why âdoesnât exist,âŚâ
What could be wrong?
Thanks, lubucub
Finally solved, and it is rebootproof
These are the 4 essential lines of the TapToClickOn-script for Lubuntu 19.04:
MY_TOUCHPAD_ID="$(xinput list | grep -i touchpad | cut -d'=' -f2 | cut -d$'\t' -f1)"
TOUCHPAD_STATE="$(xinput list-props $MY_TOUCHPAD_ID | grep -i "Tapping Enabled (" | cut -d '(' -f2)"
MY_TOUCHPAD_STATE="${TOUCHPAD_STATE:0:3}"
xinput set-prop $MY_TOUCHPAD_ID $MY_TOUCHPAD_STATE 1
To set TapOff just replace 1 with 0
Iâm really confused as to why youâre searching for âTapping Enabled (â and not âTapping Enabled,â but I see how you worked around it to get it there, and managed some more high-level scripting, too. Good work!
@wxl:
Thanks, and quite simple: without â(â I get a longer string to slice, e.g.,
289): 1 290): 0
i.e., the first plus the second lineâs information
while with " (" I get the shorter information from the first line only
289): 1
Thatâs all, nothing special about it, just my curiosity how to handle this tricky business in different ways.
Oh, I see the issue. Youâre trying to get the ID of the property. Originally I suggested that using the name of the property rather than the ID would be more general and would be less likely to get you in trouble. The problem was my assumption that the property was called âTapping Enabledâ when itâs actually âlibinput Tapping Enabled.â If you used that, it would likely be better.
Thank you, works perfect now:
#!/bin/bash
# Turn it on
xinput set-prop "$(xinput list | grep -i touchpad | cut -d'=' -f2 | cut -d$'\t' -f1)" "libinput Tapping Enabled" 1
This question by lubucub highlights a severe weakness of Lubuntu, in that there is no GUI for touchpad settings or mouse double-click times etc.
Surely, the simplest answer to the question is to add the command to Autostart in the LXSession Configuration GUI in the Preferences menu?
This is a severe weakness only of LXDE. If you read the entire thread, youâll notice the next version of Lubuntu will contain a fix for LXQt.
This brings me to the point Iâve been saying over and over and over again: DONâT USE 18.04/LXDE and instead upgrade to 19.04+/LXQt. LXDE is dead. I donât care what people say. The upstream developers are not fixing bugs, let alone adding features. Thatâs de facto dead.
The original question referred to 18.04, and there are many good reasons for LTS users not to upgrade yet, unless they are looking for a new hobby.
I have a nice, stable, 18.04 system. In a few yearsâ time, I might consider upgrading is worth the hassle, but certainly not at the moment.
Like the fact that there are âsevere weaknessesâ in it?
Yes, one that comes with a totally unreliable file manager.
What hassle is there?
The topic has digressed and the original issue has been solved. Closing.