Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to disable my laptop keyboard and use only my usb keyboard, to do this i uses the xinput set-prop command, and since my keyboard id is 16, my command is xinput set-prop 16 "Device Enabled" 0

but when O restart my computer, i need to re-enter the command again, and this is a problem because my internal keyboard has been acting crazy, how do save this changes??

share|improve this question

There are different ways of doing this. If you're absolutely sure the ID never changes, the easiest may be to put the line into Systems->Preferences->Startup Applications.

The canonical method seems to be editing udev rules nowadays. There's a Wiki page on this here.

share|improve this answer

Edit the configuration file located in /etc/X11/xorg.conf . It handles input devices as well as displays

share|improve this answer

My preferred way of doing this is by appending xinput set-prop 16 "Device Enabled" 0 to ~/.xprofile

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.