2

I have a configuration with 2 touch screens that I want to run independently.

When I run these commands from the command line:

$ xinput map-to-output "input ID" "Output Device"

It works fine.

When I try to make the change permanent (at boot) by either putting those commands in ./˜profile or by adding it to .xsessionrc:

echo xinput map-to-output "input ID" "Output Device" >> ~/.xsessionrc

It doesn't work properly.

Aaron Hall
  • 1,059
  • 2
  • 13
  • 22

3 Answers3

1

It looks like .xsessionrc runs too early so I added sleep 4 (it works fine for me, you can change it)

sleep 4 && xinput map-to-output 'input name/ID' "Display" &

Don`t forget & at the end of line otherwise your system will just stuck for sleep time without any effect.

  • It works only until the point, where you change your monitor configuration: attach new monitor, close laptop lid, ... Any ideas now to conquer this? – Boris Brodski Jan 12 '23 at 08:20
0

I found a suggestion to run xinput as Startup Applications in the desktop environment: https://forums.linuxmint.com/viewtopic.php?p=1907639#p1907639

Name: Thinkpad Touchscreen Fix
Command: xinput map-to-output 15 LVDS-1
Comment: Remap touchscreen to Thinkpad monitor
Delay: 41

This also uses a delay.

Peter T.
  • 223
  • It works only until the point, where you change your monitor configuration: attach new monitor, close laptop lid, ... Any ideas now to conquer this? – Boris Brodski Jan 12 '23 at 08:20
0

I've added my xinput commands to the end of /etc/xdg/lxsession/LXDE-pi/autostart (Raspberry Pi desktop environment)

xinput map-to-output 8 HDMI-1
ninedozen
  • 101