Natural scrolling in Ubuntu 22.04

A quick workaround. Install synaptics and reboot sudo apt install xserver-xorg-input-synaptics then synclient VertScrollDelta=-111    Autoload the configuration   Add a file 20-natural-scrolling-touchpads.conf under /usr/share/X11/xorg.conf.d with the following content Section “InputClass” Identifier “Natural Scrolling Touchpads” MatchIsTouchpad “on” MatchDevicePath “/dev/input/event*” Option “VertScrollDelta” “-111” Option “HorizScrollDelta” “-111” EndSection  

top annoying traps

sklearn is not sklearn If you came across complaint no module named sklearn and you are sure that you “installed” that with pip install sklearn. Sorry, sklearn is scikit-learn instead of sklearn. pip install scikit-learn should solve the problem. Dropbox is syncing all files except some Check if you own the file. It maybe belong…

import module from another folder

A simple hack to import a module from another folder   import sys # caution: path[0] is reserved for script path (or ” in REPL) sys.path.insert(1, ‘/path/to/application/app/folder’) import file    

google passwords

Google passwords failed me again. I got “can’t load this page” error. I didn’t know that password is also saved in chrome. One can retrieve that at setting->autofill

Connnecting slots by name

I tried to use Qt designer, and I don’t see how I can rename a slot in the designer. It turns out that it will try to “connect by the name” directly.  It is quite obscure. And here is a bit of explanation.

gstreamer not working

Somehow using installing ros seems to screw up PKG_CONFIG_PATH and it returns only /opt/ros/noetic/lib/pkgconfig And if I try gst-inspect-1.0 It will return almost nothing. Manage to find the path back with pkg-config –variable pc_path pkg-config So adding export PKG_CONFIG_PATH=`pkg-config –variable pc_path pkg-config`:$PKG_CONFIG_PATH to .bashrc will do the trick. Now gst-launch-1.0 playbin uri=file:///path/to/video will play video…