Page 1 of 1
xinput command doesn't work in .xinitrc (SOLVED)
Posted: Tue Apr 11, 2023 2:27 pm
by gychang
I am running F96-CE4.iso frugally installed to internal SSD and am trying to disable my optical mouse on boot.
Code: Select all
root@main ~
--> xinput -list
? Virtual core pointer id=2 [master pointer (3)]
? ? Virtual core XTEST pointer id=4 [slave pointer (2)]
? ? SINO WEALTH Gaming KB Consumer Control id=10 [slave pointer (2)]
? ? USB Optical Mouse id=13 [slave pointer (2)]
? Virtual core keyboard id=3 [master keyboard (2)]
? Virtual core XTEST keyboard id=5 [slave keyboard (3)]
? Power Button id=6 [slave keyboard (3)]
? Power Button id=7 [slave keyboard (3)]
? SINO WEALTH Gaming KB id=8 [slave keyboard (3)]
? SINO WEALTH Gaming KB System Control id=9 [slave keyboard (3)]
? SINO WEALTH Gaming KB Keyboard id=11 [slave keyboard (3)]
? UVC Camera (046d:0825) id=12 [slave keyboard (3)]
? HP WMI hotkeys id=14 [slave keyboard (3)]
? SINO WEALTH Gaming KB Consumer Control id=15 [slave keyboard (3)]
root@main ~
-->
on terminal : xinput -disable 13 and xinput -disable 'USB Optical Mouse' works well. If I add the either of the lines in the .xinitrc file before the ####END### line and reboot, it does not disable the mouse. What am I doing wrong?
Re: xinput command doesn't work in .xinitrc ?
Posted: Tue Apr 11, 2023 2:44 pm
by gychang
I solved the problem by inserting the line in the beginning of the .xinitrc file, i.e. before the windowmanager launch?
can someone explain why this work in the beginning but not near the end of the file?
Re: xinput command doesn't work in .xinitrc ?
Posted: Tue Apr 11, 2023 2:50 pm
by Trapster
I've always put startup terminal commands in /etc/rc.d/rc.local.
Note: I do not use F96-CE4 and I'm not sure the newer pups even use it.
Re: xinput command doesn't work in .xinitrc (SOLVED)
Posted: Tue Apr 11, 2023 3:15 pm
by Burunduk
gychang wrote: ↑Tue Apr 11, 2023 2:44 pm
I solved the problem by inserting the line in the beginning of the .xinitrc file, i.e. before the windowmanager launch?
can someone explain why this work in the beginning but not near the end of the file?
The commands at the end was inserted after the exec. The window manager is launched by one of the exec commands in .xinitrc. The launched program replaces the script. Anything after exec won't run (exec without arguments is different).
Re: xinput command doesn't work in .xinitrc ?
Posted: Tue Apr 11, 2023 3:21 pm
by gychang
Trapster wrote: ↑Tue Apr 11, 2023 2:50 pm
I've always put startup terminal commands in /etc/rc.d/rc.local.
Note: I do not use F96-CE4 and I'm not sure the newer pups even use it.
interesting..., there is the rc.local file but for me xinput command didn't work.
Re: xinput command doesn't work in .xinitrc (SOLVED)
Posted: Tue Apr 11, 2023 3:23 pm
by gychang
Burunduk wrote: ↑Tue Apr 11, 2023 3:15 pm
gychang wrote: ↑Tue Apr 11, 2023 2:44 pm
I solved the problem by inserting the line in the beginning of the .xinitrc file, i.e. before the windowmanager launch?
can someone explain why this work in the beginning but not near the end of the file?
The commands at the end was inserted after the exec. The window manager is launched by one of the exec commands in .xinitrc. The launched program replaces the script. Anything after exec won't run (exec without arguments is different).
@Burunduk thanks, that makes sense.