I am developing an applet for Cinnamon which lets me enable/disable the touchscreen of my laptop. This also shows the current status of the touchscreen.

Currently I am using synchronous calls to the xinput command to query or set the current state of the touchscreen device.

This however has at least two problems:

  • Calling shell commands earns my applet a warning upon installation
  • The applet is not notified if other actors change the status of the touchscreen device

Therefore I am looking for a way to automatically (e.g. pubsub subscription or DBus) receive notification about status changes of my touchscreen X device.

Extra nice would be a way to enable/disable the device through this other channel as well, so my applet is no longer marked as dangerous.

  • 2
    look at my answer and examples here. Your applet could listen itself to XInput events, which go through the common X11 connection. – mosvy Jul 15 at 9:48
  • Seems promising, I'll have a look at it later. – aef Jul 15 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.