I need to force my KDE Plasma installed on ubuntu 18.04 to run the following script on startup (after login):
xinput --map-to-output "Wacom HID 48DE Finger touch" eDP-1-1
xinput --map-to-output "Wacom HID 48DE Pen stylus" eDP-1-1
xinput --map-to-output "Wacom HID 48DE Pen eraser" eDP-1-1
So I've put it in
/etc/X11/xinit/xinitrc
crontab -e
~/.bashrc
~/.profile
maybe some other places that I forgot
I've also created a *.sh with these 3 lines and put it in the settings->autostart in the "desktop file" section and in the "script file" section. In the latter one I put it twice: under "startup" option and under "before session start-up" option. I put it in the settings->login screen (sddm) "advanced" tab -> commands -> "reboot command" section. I have also tried to create a *.desktop file in 'cd ~/.config/autostart/' and put the following content in it:
[Desktop Entry]
Type=Application
Exec="/usr/bin/xinput_autostart.sh"
Name=Xinput
I put it with and without the "root" and "sudo" prescriptions, I put it everywhere I could where I could only find on the internet and it does not work. But when I execute exactly the same lines in the terminal manually or if I simply double click the *.sh file then it works!!! I am out of ideas, please help!
#!/bin/sh
. And make sure to make it executable, something likesudo chmod 660
or whatever you prefer.