I added this command to the rc.local
file:
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?
bootkeyboardstartupstartup-applicationsxinput
I added this command to the rc.local
file:
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?
Best Answer
Most likely the command is being executed.
The
xinput float
technique given in Is there a way to disable a laptop's internal keyboard? works... but not if you run it fromrc.local
.xinput
requires the X Window System to be running. But it's not running yet at the timerc.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 ofxinput list
).Then click Add.
Log out and back in, to check if it works.