I added this command to the
xinput float 12
Then I saved the file. But when I reboot my PC, Ubuntu doesn't execute this command, cause the internal keyboard of my laptop is still working. What should I do?
Most likely the command is being executed.
xinput float technique given in Is there a way to disable a laptop's internal keyboard? works... but not if you run it from
xinput requires the X Window System to be running. But it's not running yet at the time
rc.local is executed.
Most of the time, the best solution is to have your
xinput command run automatically every time you log in graphically. See:
Open Startup Applications (you can search for it in the dash). In the Startup Programs tab of the Startup Applications Preferences window, click the Add button.
I took this screenshot on a MATE desktop, but if you use Ubuntu's default Unity desktop, or GNOME Shell, it's the same.
Fill in the fields:
xinput float 12(assuming 12 is the number of the device you wish to disable, as shown in the output of
Then click Add.
Log out and back in, to check if it works.