blob: 8243d3cdd8b9bde575cb678f5e2cb0b709b04ede (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# README for kvm-mapping
This `kvm-mapping` project is designed to make it easy to run a script in my user session when the kvm output goes to this machine. Specifically, I want keyboard mappings restored for easy switching between layouts 'us,us(dvorak)'.
## Upstream
This project's upstream is at <https://bgstack15.ddns.net/cgit/kvm-mapping/>
## Alternatives
None. Original idea and implementation.
## Reason for existence
Custom solution for myself that might be useful in alternate ways or as an example of the various concepts. Also, putting this in scm acts as a backup.
## Using
* Set up the scripts in `/usr/local/bin`.
* Set up the udev rule in `/etc/udev/rules.d/`.
* Modify `kvm-plugged-in.sh` to run whatever you want.
* Set up your X session to run `kvm-user-daemon.sh` at startup. In ~/.fluxbox/startup this would look like:
/usr/local/bin/kvm-user-daemon.sh 1>/dev/null 2>&1 &
Logging of the user daemon happens to ~/log/kvm or ~/.log/kvm, whichever exists or you can set `LOGFILE` before running.
## Dependencies
* xinput, setxkbmap, udev, plecho (bgscripts)
## Building
Not implemented yet; there is nothing to build. Just deploy manually.
## References
1. <https://superuser.com/questions/305723/using-udev-rules-to-run-a-script-on-usb-insertion>
2. <https://unix.stackexchange.com/questions/71348/why-doesnt-this-udev-rule-trigger-upon-removal-of-the-device>
|