xinput command doesn't work in .xinitrc (SOLVED)

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
gychang
Posts: 591
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 206 times
Been thanked: 64 times

xinput command doesn't work in .xinitrc (SOLVED)

Post 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?

Last edited by gychang on Tue Apr 11, 2023 2:44 pm, edited 1 time in total.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
gychang
Posts: 591
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 206 times
Been thanked: 64 times

Re: xinput command doesn't work in .xinitrc ?

Post 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?

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Trapster
Posts: 180
Joined: Sat Aug 01, 2020 7:44 pm
Has thanked: 1 time
Been thanked: 50 times

Re: xinput command doesn't work in .xinitrc ?

Post 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.

Burunduk
Posts: 251
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: xinput command doesn't work in .xinitrc (SOLVED)

Post 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).

User avatar
gychang
Posts: 591
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 206 times
Been thanked: 64 times

Re: xinput command doesn't work in .xinitrc ?

Post 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.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
gychang
Posts: 591
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 206 times
Been thanked: 64 times

Re: xinput command doesn't work in .xinitrc (SOLVED)

Post 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. :thumbup2:

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

Post Reply

Return to “Users”