Skip to content

Instantly share code, notes, and snippets.

@jbodah
Last active June 7, 2022 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbodah/0a85df982d1993da1ec327175e3dcefd to your computer and use it in GitHub Desktop.
Save jbodah/0a85df982d1993da1ec327175e3dcefd to your computer and use it in GitHub Desktop.

linux notes

List all files in a pkg

$ dpkg -L ulauncher | grep service

Book systemd service

$ systemctl --user enable --now ulauncher

Disable touchscreen

$ xinput
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ELAN0000:00 04F3:3124 Mouse             	id=12	[slave  pointer  (2)]
⎜   ↳ ELAN901C:00 04F3:2A8A                   	id=11	[slave  pointer  (2)]
⎜   ↳ ELAN0000:00 04F3:3124 Touchpad          	id=13	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Ideapad extra buttons                   	id=14	[slave  keyboard (3)]
    ↳ Intel HID events                        	id=15	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=16	[slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C         	id=9	[slave  keyboard (3)]
    ↳ Integrated Camera: Integrated I         	id=10	[slave  keyboard (3)]
$ xinput disable 12

Example of compiling software with specific lib versions

tar -zxf libevent-*.tar.gz
cd libevent-*/
./configure --prefix=$HOME/local --enable-shared
make && make install
tar -zxf ncurses-*.tar.gz
cd ncurses-*/
./configure --prefix=$HOME/local --with-shared --with-termlib --enable-pc-files --with-pkg-config-libdir=$HOME/local/lib/pkgconfig
make && make install
tar -zxf tmux-*.tar.gz
cd tmux-*/
PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig ./configure --prefix=$HOME/local
make && make install

Remove unnecessary deps

$ sudo apt autoremove

Recovering from kernel issues

Reboot
Hold shift
Advanced Options
Select older kernel
Uninstall newer one

List userspace input driver

$ xinput
⎜   ↳ ELAN0000:00 04F3:3124 Touchpad            id=14   [slave  pointer  (2)]
$ xinput list-props 14
Device 'ELAN0000:00 04F3:3124 Touchpad':
        Device Enabled (189):   1
        Coordinate Transformation Matrix (191): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Tapping Enabled (344): 1
        libinput Tapping Enabled Default (345): 0
        libinput Tapping Drag Enabled (346):    1
        libinput Tapping Drag Enabled Default (347):    1
        libinput Tapping Drag Lock Enabled (348):       0
        libinput Tapping Drag Lock Enabled Default (349):       0
        libinput Tapping Button Mapping Enabled (350):  1, 0
        libinput Tapping Button Mapping Default (351):  1, 0
        libinput Natural Scrolling Enabled (328):       1
        libinput Natural Scrolling Enabled Default (329):       0
        libinput Disable While Typing Enabled (352):    0
        libinput Disable While Typing Enabled Default (353):    1
        libinput Scroll Methods Available (330):        1, 1, 0
        libinput Scroll Method Enabled (331):   1, 0, 0
        libinput Scroll Method Enabled Default (332):   1, 0, 0
        libinput Click Methods Available (354): 1, 1
        libinput Click Method Enabled (355):    0, 1
        libinput Click Method Enabled Default (356):    1, 0
        libinput Middle Emulation Enabled (357):        0
        libinput Middle Emulation Enabled Default (358):        0
        libinput Accel Speed (335):     0.116936
        libinput Accel Speed Default (336):     0.000000
        libinput Left Handed Enabled (340):     0
        libinput Left Handed Enabled Default (341):     0
        libinput Send Events Modes Available (309):     1, 1
        libinput Send Events Mode Enabled (310):        0, 0
        libinput Send Events Mode Enabled Default (311):        0, 0
        Device Node (312):      "/dev/input/event9"
        Device Product ID (313):        1267, 12580
        libinput Drag Lock Buttons (342):       <no items>
        libinput Horizontal Scroll Enabled (343):       0

Permanently disable touchscreen

# /etc/X11/xorg.conf.d/touchscreen.conf
Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"

	Option "Ignore" "true"
EndSection

Enable service to start at boot

$ systemctl --user enable ulauncher
@jbodah
Copy link
Author

jbodah commented Jun 7, 2022

need a config to permanently disable touchscreen https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml

@jbodah
Copy link
Author

jbodah commented Jun 7, 2022

@jbodah
Copy link
Author

jbodah commented Jun 7, 2022

@jbodah
Copy link
Author

jbodah commented Jun 7, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment