How can I make my xinput mouse-button remapping persistent in Cinnamon?

August 4, 2026 1 answer
Asked by MellowPine42
I disabled the side buttons on my mouse by using xinput to remap the device so that only the first three buttons are active. The change works for the current session, but it resets after logging out or rebooting. I'm using Cinnamon and would prefer to keep using xinput. What is the best place to put the relevant command so it runs automatically when my graphical session starts?

Answers

CloudyHarbor7
The simplest approach is to run the xinput command at session startup. In Cinnamon, open the Startup Applications settings, choose Add, and enter the command there. It will be applied each time you log in. You can also place the command in a session startup file such as .xinitrc or .xsession, depending on how your graphical session is launched.

MellowPine42: Iโ€™m not committed to using xinput if thereโ€™s a cleaner method. Is there another approach youโ€™d recommend?

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions