Two touchscreen for Ubuntu and mapping of touch events












0















i've a touchscreen laptop (1920x1080) and a ineractive whiteboard with touch (1280x800).
To use the full resolution of the laptop i just present a part of the monitor, that is done succesfully with the first xrandr command.



Now i want to map the touch events of the monitor to the laptop monitor, which works.
Because the whiteboard has always different number by xinput list i grep the number and show it on the bash. Then i map the touch events of the whiteboard to this part of the presented screen.



The last commands are a part of xfce4 to maximise any window inside the presented part of my laptop screen.



#!/bin/
sh xrandr --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --mode 1280x800 --pos 480x270 --rotate normal
xinput map-to-output 'ELAN Touchscreen' eDP1
daten=$(xinput list | grep 'TimeLink' | tail -n 1 | cut -c 56-57)
echo $daten
xinput map-to-output "$daten" HDMI1
xfconf-query -c xfwm4 -p /general/margin_right -s 160
xfconf-query -c xfwm4 -p /general/margin_left -s 480
xfconf-query -c xfwm4 -p /general/margin_top -s 270
xfconf-query -c xfwm4 -p /general/margin_bottom -s 10



This script worked fine, but suddenly the mapping of the whiteboard didn't function any more. At the left and right margin there get a displace of the mouse position and the touch event. I tried to calibrate the monitor by deactivating eDP1 and use xinput_calibrator for the whiteboard and wrote this into /etc/X11/xorg.conf.d/99-calibration.conf like the programme suggested.
But the touch event is after a reboot still perfect in the middle but gets worse on both margin, left and right.



I also checked, if any programme was updated, but i found nothing helpful.
The beamer also just show the picture without any new ratio and so on.
Any suggestions?










share|improve this question





























    0















    i've a touchscreen laptop (1920x1080) and a ineractive whiteboard with touch (1280x800).
    To use the full resolution of the laptop i just present a part of the monitor, that is done succesfully with the first xrandr command.



    Now i want to map the touch events of the monitor to the laptop monitor, which works.
    Because the whiteboard has always different number by xinput list i grep the number and show it on the bash. Then i map the touch events of the whiteboard to this part of the presented screen.



    The last commands are a part of xfce4 to maximise any window inside the presented part of my laptop screen.



    #!/bin/
    sh xrandr --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --mode 1280x800 --pos 480x270 --rotate normal
    xinput map-to-output 'ELAN Touchscreen' eDP1
    daten=$(xinput list | grep 'TimeLink' | tail -n 1 | cut -c 56-57)
    echo $daten
    xinput map-to-output "$daten" HDMI1
    xfconf-query -c xfwm4 -p /general/margin_right -s 160
    xfconf-query -c xfwm4 -p /general/margin_left -s 480
    xfconf-query -c xfwm4 -p /general/margin_top -s 270
    xfconf-query -c xfwm4 -p /general/margin_bottom -s 10



    This script worked fine, but suddenly the mapping of the whiteboard didn't function any more. At the left and right margin there get a displace of the mouse position and the touch event. I tried to calibrate the monitor by deactivating eDP1 and use xinput_calibrator for the whiteboard and wrote this into /etc/X11/xorg.conf.d/99-calibration.conf like the programme suggested.
    But the touch event is after a reboot still perfect in the middle but gets worse on both margin, left and right.



    I also checked, if any programme was updated, but i found nothing helpful.
    The beamer also just show the picture without any new ratio and so on.
    Any suggestions?










    share|improve this question



























      0












      0








      0








      i've a touchscreen laptop (1920x1080) and a ineractive whiteboard with touch (1280x800).
      To use the full resolution of the laptop i just present a part of the monitor, that is done succesfully with the first xrandr command.



      Now i want to map the touch events of the monitor to the laptop monitor, which works.
      Because the whiteboard has always different number by xinput list i grep the number and show it on the bash. Then i map the touch events of the whiteboard to this part of the presented screen.



      The last commands are a part of xfce4 to maximise any window inside the presented part of my laptop screen.



      #!/bin/
      sh xrandr --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --mode 1280x800 --pos 480x270 --rotate normal
      xinput map-to-output 'ELAN Touchscreen' eDP1
      daten=$(xinput list | grep 'TimeLink' | tail -n 1 | cut -c 56-57)
      echo $daten
      xinput map-to-output "$daten" HDMI1
      xfconf-query -c xfwm4 -p /general/margin_right -s 160
      xfconf-query -c xfwm4 -p /general/margin_left -s 480
      xfconf-query -c xfwm4 -p /general/margin_top -s 270
      xfconf-query -c xfwm4 -p /general/margin_bottom -s 10



      This script worked fine, but suddenly the mapping of the whiteboard didn't function any more. At the left and right margin there get a displace of the mouse position and the touch event. I tried to calibrate the monitor by deactivating eDP1 and use xinput_calibrator for the whiteboard and wrote this into /etc/X11/xorg.conf.d/99-calibration.conf like the programme suggested.
      But the touch event is after a reboot still perfect in the middle but gets worse on both margin, left and right.



      I also checked, if any programme was updated, but i found nothing helpful.
      The beamer also just show the picture without any new ratio and so on.
      Any suggestions?










      share|improve this question
















      i've a touchscreen laptop (1920x1080) and a ineractive whiteboard with touch (1280x800).
      To use the full resolution of the laptop i just present a part of the monitor, that is done succesfully with the first xrandr command.



      Now i want to map the touch events of the monitor to the laptop monitor, which works.
      Because the whiteboard has always different number by xinput list i grep the number and show it on the bash. Then i map the touch events of the whiteboard to this part of the presented screen.



      The last commands are a part of xfce4 to maximise any window inside the presented part of my laptop screen.



      #!/bin/
      sh xrandr --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --mode 1280x800 --pos 480x270 --rotate normal
      xinput map-to-output 'ELAN Touchscreen' eDP1
      daten=$(xinput list | grep 'TimeLink' | tail -n 1 | cut -c 56-57)
      echo $daten
      xinput map-to-output "$daten" HDMI1
      xfconf-query -c xfwm4 -p /general/margin_right -s 160
      xfconf-query -c xfwm4 -p /general/margin_left -s 480
      xfconf-query -c xfwm4 -p /general/margin_top -s 270
      xfconf-query -c xfwm4 -p /general/margin_bottom -s 10



      This script worked fine, but suddenly the mapping of the whiteboard didn't function any more. At the left and right margin there get a displace of the mouse position and the touch event. I tried to calibrate the monitor by deactivating eDP1 and use xinput_calibrator for the whiteboard and wrote this into /etc/X11/xorg.conf.d/99-calibration.conf like the programme suggested.
      But the touch event is after a reboot still perfect in the middle but gets worse on both margin, left and right.



      I also checked, if any programme was updated, but i found nothing helpful.
      The beamer also just show the picture without any new ratio and so on.
      Any suggestions?







      ubuntu xfce xrandr xinput touch-screen






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 17 at 16:48









      Rui F Ribeiro

      39.6k1479132




      39.6k1479132










      asked Jan 17 at 16:48









      J. AlmerJ. Almer

      11




      11






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495117%2ftwo-touchscreen-for-ubuntu-and-mapping-of-touch-events%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495117%2ftwo-touchscreen-for-ubuntu-and-mapping-of-touch-events%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

          is 'sed' thread safe

          How to make a Squid Proxy server?