I was calibrating my touch screen, and saw that the best tool around was xinput_calibrator. So I used it. It have two options (one of which did not work), so I am here for the second. It says I should execute this command "in a script that starts with your X session":
xinput set-int-prop "3M 3M USB Touchscreen - EX II" "Evdev Axis Calibration" 32 14410 2146 14574 2115
So I tried ~/.xinitrc
, ~/.xsession
and ~/.xsessionrc
, all of which did not exist. So I created them and the exact content was this command. The first two files made my logins fail (after I login, I fall back to the login screen).
With the last file, the calibration was functional, but only after logging in...
I need that command to run before the login dialog shows up. I thought of adding this command to the end of /etc/X11/xinit/xinitrc
with no result (nothing changed). Also, I tried to add it to the end of /etc/X11/Xsession.d/40x11-common_xsessionrc
(after inspecting some of the files), but the result was exactly the same as adding it to ~/.xsessionrc
.
How can I make this command run before the login screen shows (is this before the window manager starts, or before the X session starts)?
(I am running Kubuntu with the default window manager, if that matters)
UPDATE As I am using Kubuntu, my display manager is kdm. As the accepted answer suggests, I edited the file /etc/kde4/kdm/Xsetup
, and as mentioned here I added the command before the command that is there by default. And it works like a charm :)
/etc/gdm3/Init/display
or/etc/gdm3/Init/Default
- manpages.debian.net/cgi-bin/…