Wednesday, April 22, 2020

Disabling touchscreeen on Ubuntu / Xubuntu

For temporarily disabling, touchscreen will be enabled after re-login, first we should identify touchscreen id. For this run following command in terminal:

xinput --list

It will show like this:

Virtual core pointer                    id=2 [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              id=4 [slave  pointer  (2)]
⎜   ↳ SYN1B7F:00 06CB:7DA2 Touchpad            id=17 [slave  pointer  (2)]
⎣   ↳ Xyz Touchscreen            id=9 [slave  pointer  (2)] 
Virtual core keyboard                    id=3 [master keyboard (2)]
    ↳ Virtual core XTEST keyboard              id=5 [slave  keyboard (3)]
    ↳ Video Bus                                id=6 [slave  keyboard (3)]
    ↳ Power Button                            id=7 [slave  keyboard (3)]
    ↳ Lid Switch                              id=8 [slave  keyboard (3)]
    ↳ HDA Intel PCH Front Headphone            id=10 [slave  keyboard (3)]
    ↳ HDA Intel PCH HDMI/DP,pcm=3              id=11 [slave  keyboard (3)]
    ↳ HDA Intel PCH HDMI/DP,pcm=7              id=12 [slave  keyboard (3)]
    ↳ HDA Intel PCH HDMI/DP,pcm=8              id=13 [slave  keyboard (3)]
    ↳ HDA Intel PCH HDMI/DP,pcm=9              id=14 [slave  keyboard (3)]
    ↳ HDA Intel PCH HDMI/DP,pcm=10            id=15 [slave  keyboard (3)]
    ↳ HD WebCam: HD WebCam                    id=16 [slave  keyboard (3)]
    ↳ Intel Virtual Button driver              id=18 [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            id=19 [slave  keyboard (3)]
    ↳ Acer WMI hotkeys                        id=20 [slave  keyboard (3)]

From above it is clear that touchscreen id is 9

For disabling touchscreen, use command:

xinput disable 9

For enabling touchscreen, use command:

xinput enable 9

In the above procedure re-login will enable touchscreen. For permanent disabling, we have to edit the file /usr/share/X11/xorg.conf.d/40-libinput.conf. for this run command

sudo gedit  /usr/share/X11/xorg.conf.d/40-libinput.conf

or for xubuntu

sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf

This file will have entry like


Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection


Change MatchIsTouchscreen "on" to MatchIsTouchscreen "off" like this

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "off"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Save the file. Now touch screen is permanetly disabled

Thursday, April 16, 2020

Adding / Deleteing users in Linux

In linux users can be added / deleted from GUI (graphical user interface). These options are in settings > Users and Groups. It is very easy and type of user can also be selected from options like Administrator, Desktop user, Custom user etc.

Sometime we need to add / delete user from command line terminal. The procedure is as below:

Command to add user "xyzabc"

sudo useradd xyzabc

Command to delete user "xyzabc"

sudo userdel xyzabc

If home directory (all files created by that user will be deleted) for this user has also to be deleted along with user deletion

sudo userdel -r xyzabc