Software & AppsOperating SystemLinux

How To Disable Touch Screen on Ubuntu

Ubuntu 8

In this detailed guide, we will walk you through the process of disabling the touch screen on your Ubuntu device. This can be useful if you are experiencing issues with the touch screen, or if you simply prefer to use a mouse and keyboard.

Quick Answer

To disable the touch screen on Ubuntu, you can use the xinput disable command in the terminal. Identify the device ID of your touch screen using the xinput list command, and then use the xinput disable <device-id> command to disable it. To make the change permanent, you can create a startup script that runs the xinput disable command every time your system boots.

Identifying Your Touch Screen Device

The first step in disabling your touch screen is to identify the device ID associated with it. You can do this using the xinput command in the terminal.

  1. Open a terminal by pressing Ctrl+Alt+T. This is the standard shortcut for opening a terminal in Ubuntu.
  2. Type the command xinput list and press Enter. This command lists all input devices connected to your system.
xinput list

In the output, look for an entry that corresponds to your touch screen. It might be named something like “ELAN Touchscreen” or “Synaptics Touchscreen”. Note down the ID number that is associated with it.

Disabling the Touch Screen

Once you have identified your touch screen device, you can disable it using the xinput disable command.

  1. In the terminal, type the command xinput disable <device-id> and replace <device-id> with the ID number of your touch screen. Press Enter to execute the command.
xinput disable <device-id>

This command disables the specified input device. In this case, it disables the touch screen.

Making the Change Permanent

The above steps will disable the touch screen until the next reboot. If you want to make this change permanent, you can create a startup script that runs the xinput disable command every time your system boots.

  1. Open a terminal.
  2. Type the command sudo nano /etc/X11/Xsession.d/99-disable-touchscreen.sh and press Enter. This command opens a text editor with administrative privileges.
sudo nano /etc/X11/Xsession.d/99-disable-touchscreen.sh
  1. In the text editor, add the following lines:
#!/bin/bash
xinput disable <device-id>

Replace <device-id> with the ID number of your touch screen.

  1. Press Ctrl+O to save the file, then Ctrl+X to exit the text editor.
  2. Make the script executable by typing the command sudo chmod +x /etc/X11/Xsession.d/99-disable-touchscreen.sh and pressing Enter.
sudo chmod +x /etc/X11/Xsession.d/99-disable-touchscreen.sh

This command changes the permissions of the script file to make it executable.

Now, the touch screen should be disabled every time you boot your system.

Conclusion

Disabling the touch screen on Ubuntu is a straightforward process once you know the device ID of your touch screen. However, the specific steps can vary depending on your Ubuntu version and the touch screen device. If the above steps don’t work for you, you can try searching for specific instructions for your touch screen model or consult the Ubuntu community for further assistance.

Can I re-enable the touch screen after disabling it?

Yes, you can re-enable the touch screen by using the xinput enable command followed by the device ID of your touch screen.

How can I find the device ID of my touch screen?

You can use the xinput list command in the terminal to list all input devices connected to your system. Look for the entry that corresponds to your touch screen and note down the ID number associated with it.

Will disabling the touch screen affect other input devices?

No, disabling the touch screen will only affect the touch screen input. Other input devices such as a mouse or keyboard will still function normally.

Can I temporarily enable the touch screen without rebooting?

Yes, you can use the xinput enable command followed by the device ID of your touch screen to temporarily enable it. However, this change will not persist after a reboot.

How can I undo the changes and enable the touch screen permanently?

To undo the changes and enable the touch screen permanently, you can remove the startup script by using the command sudo rm /etc/X11/Xsession.d/99-disable-touchscreen.sh. This will revert the changes made and restore the touch screen functionality.

Leave a Comment

Your email address will not be published. Required fields are marked *