I have a KVM switch (Trendnet TK 409) that helps me switch between my Ubuntu laptop and Linux computer. The switch use a hotkey for switching (numlock+numlock).
Unfortunatly, that only works on Windows. I found a guide on the net, and have now a script called kvm
(etc/init.d
)
#!/bin/bash
numlockx on;
sleep 1;
numlockx off;
sleep 1;
numlockx on
exit 0
I have then attached a hotkey (ctrl+numlock) and this works perfectly.. But I would like to have done so that whenever I shutdown my Ubuntu computer, the script is executed so that I can continue on my windows computer.
As mentioned earlier kvm
lies in etc/init.d
and I have created a shortcut in rc0.d
called K99kvm
But whenever I turn of my Ubuntu computer, the KVM doesnt switch to Windows computer. As I said the script itself works perfectly with hotkeys, but it doesnt work when turning the computer off.
Help would be much appreciated...
A small question aswell. Is it possible to create a hotkey in Ubuntu like numlock+numlock (2 clicks on the same button) and if yes, then how?