.xinitrc and permanent xinput command


I have successfully set my tablet/pc with dual monitors to work with touch screen and stylus through:

xinput --map-to-output “Wacom HID 50DB Pen eraser” eDP-1
xinput --map-to-output “Wacom HID 50DB Pen stylus” eDP-1
xinput --map-to-output “Wacom HID 50DB Finger touch” eDP-1

But I would like to make these commands permanent?
I check here that there is no ~/.xinitrc file on my tumbleweed, only a ~/.initrc.template

How do I proceed? Should I rename ~/.initrc.template to ~/.xinitrc or create a new blank file

Is there a way to do this permanent setting through /etc/X11/xorg.conf.d ?


Without any specific knowledge about this subject, the thing I would do in your case were og course reading

man xinit

Did you do that?

You also need to be aware of thye fact that things that go anywhere in ~/ are only for that specific user. Things going in /etc/ are system wide for all users. Thus if what you want is typical an end-users wish, it never should be configured on a system wide base because another user may want different. This is true even if you think “there is only one real user of the system”, because the fact that on this system there is only one does not change the rules that Linux is a multu-user, multi-session operating system.

~/.xinitrc will be used instead of default session startup script, so you would need to add complete sequence to start your DE. So I would say either use your DE to autostart programs on login or create /etc/X11/xinit/xinitrc.d script to do it.


Thanks for the advice.

So, in the case of a script to run on startup by my DE (KDE Plasma) could I load it in System Settings>Power Management>Energy Saving ?



System Settings --> Startup and Shutdown

If you want to find where the script would be placed after you add it in system settings

find ~ -name 'myscriptname' -type l -user foo

Assuming you have a username foo
Assuming your script name is ‘myscriptname’