[wiki] [sites] [dwm] Tutorial: crappy multi-pointer || Ivan Tham

From: <git_AT_suckless.org>
Date: Wed, 28 Dec 2016 04:47:58 +0100

commit 863101f8fc5070a3d36bd24a2af85fd1daaf1eec
Author: Ivan Tham <pickfire_AT_riseup.net>
Date: Wed Dec 28 11:47:55 2016 +0800

    [dwm] Tutorial: crappy multi-pointer

diff --git a/dwm.suckless.org/multi-pointer.md b/dwm.suckless.org/multi-pointer.md
new file mode 100644
index 0000000..2e3ff54
--- /dev/null
+++ b/dwm.suckless.org/multi-pointer.md
_AT_@ -0,0 +1,78 @@
+Multi-pointer
+-------------
+
+Multi-pointer can be an alternative to multi-seat. Compared to multi-seat,
+multi-pointer is easier to setup (because no multi-seat experience), allows
+hardware acceleration and at least one monitor is required. Bad news? Both
+shared the same xorg server, most things are shared.
+
+As of now, no window manager with active development support multi-pointers
+with multiple active window. Dwm does not support multi-pointer but here's a
+crappy version in which the other users can only control one application
+through keyboard since there is only one active window at a time.
+
+Configuring inputs
+------------------
+
+One way to configure input devices is via the `xinput` tool. Without any
+arguments given, it should list all the input devices in short format.
+
+ xinput
+
+It will print all the master device (cursors on screen) and the slave device
+(physical device). Master device comes in pair, which is pointer and keyboard.
+
+Adding master device
+--------------------
+
+To create another pointer for a new user. First, we add a master device.
+
+ xinput create-master Name
+
+Another pointer should appear in the center of the screen by now.
+
+Assigning slave device
+----------------------
+
+We will then require to assign a slave device to the master device. The *id* of
+the **master** and **slave** device can be found by using `xinput`.
+
+ xinput reattach <slave> <master>
+
+By the end of this, both pointer can move simultaneously but keyboard cannot
+type in different application simultaneously, this is normal for window manager
+without multi-pointer support.
+
+Point master device to window
+-----------------------------
+
+Time to point the master device to the respective window, do this for both
+pointer and keyboard master device (not sure if specifying one works).
+
+The **window** is the PID of window which can be checked with either `xprop`
+(useless sometimes) or `xdotool selectwindow`.
+
+ xinput set-cp <window> <master>
+
+If the setup is successful, the other keyboard should be able to input only in
+the window. In which multiple user can play different games at the same time.
+
+Cleaning up
+-----------
+
+Remove all the master device that was created.
+
+ xinput remove-master <master>
+
+And `reattach` the pointer or keyboard back to the main master device.
+
+Ideas
+-----
+
+- The other could have used Xephyr or Xnest to have his own session instead.
+
+See also
+--------
+
+- https://ao2.it/en/blog/2010/01/19/poor-mans-multi-touch-using-multiple-mice-xorg
+- https://www.x.org/wiki/Development/Documentation/MPX/
Received on Wed Dec 28 2016 - 04:47:58 CET

This archive was generated by hypermail 2.3.0 : Wed Dec 28 2016 - 04:48:17 CET