sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (2670B)


      1 Multi-pointer
      2 =============
      3 Multi-pointer can be an alternative to multi-seat. Compared to multi-seat,
      4 multi-pointer is easier to setup (because no multi-seat experience), allows
      5 hardware acceleration and at least one monitor is required. Bad news? Both
      6 shared the same xorg server, most things are shared.
      7 
      8 As of now, no window manager with active development support multi-pointers
      9 with multiple active window. Dwm does not support multi-pointer but here's a
     10 crappy version in which the other users can only control one application
     11 through keyboard since there is only one active window at a time.
     12 
     13 Configuring inputs
     14 ------------------
     15 One way to configure input devices is via the `xinput` tool. Without any
     16 arguments given, it should list all the input devices in short format.
     17 
     18 	xinput
     19 
     20 It will print all the master device (cursors on screen) and the slave device
     21 (physical device). Master device comes in pair, which is pointer and keyboard.
     22 
     23 Adding master device
     24 --------------------
     25 To create another pointer for a new user. First, we add a master device.
     26 
     27 	xinput create-master Name
     28 
     29 Another pointer should appear in the center of the screen by now.
     30 
     31 Assigning slave device
     32 ----------------------
     33 We will then require to assign a slave device to the master device. The *id* of
     34 the **master** and **slave** device can be found by using `xinput`.
     35 
     36 	xinput reattach <slave> <master>
     37 
     38 By the end of this, both pointer can move simultaneously but keyboard cannot
     39 type in different application simultaneously, this is normal for window manager
     40 without multi-pointer support.
     41 
     42 Point master device to window
     43 -----------------------------
     44 Time to point the master device to the respective window, do this for both
     45 pointer and keyboard master device (not sure if specifying one works).
     46 
     47 The **window** is the PID of window which can be checked with either `xprop`
     48 (useless sometimes) or `xdotool selectwindow`.
     49 
     50 	xinput set-cp <window> <master>
     51 
     52 If the setup is successful, the other keyboard should be able to input only in
     53 the window. In which multiple user can play different games at the same time.
     54 
     55 Cleaning up
     56 -----------
     57 Remove all the master device that was created.
     58 
     59 	xinput remove-master <master>
     60 
     61 And `reattach` the pointer or keyboard back to the main master device.
     62 
     63 Ideas
     64 -----
     65 
     66 * The other could have used Xephyr or Xnest to have his own session instead.
     67 
     68 See also
     69 --------
     70 
     71 * [https://ao2.it/en/blog/2010/01/19/poor-mans-multi-touch-using-multiple-mice-xorg](https://ao2.it/en/blog/2010/01/19/poor-mans-multi-touch-using-multiple-mice-xorg)
     72 * [https://www.x.org/wiki/Development/Documentation/MPX/](https://www.x.org/wiki/Development/Documentation/MPX/)