You are not logged in.
Hi all,
Is there a trigger for when switching between vcs or from vc to X and vice versa? The reason I ask is I have to modprobe my mouse each time i go from X->vc->X and I would like this to be automated. I wrote a script for it but typing it in each time, although a minor inconvenience, is something I would like to eliminate if possible.
Cheers,
Adam
Last edited by Maverick1712 (2009-04-01 15:00:03)
Offline
sudo chvt 1
to go to tty1, and then
sudo chvt 7
to go back to X again - if X is running on tty7. (It usually does.)
Offline
that would take exactly as many keystrokes as running my script then hitting ctrl+alt+fx. I'm looking for a trigger like there is when the machine goes to sleep and such.
Offline
Ahh, sorry, didn't read your post properly. I don't know about any X->vc / vc-> trigger, but maybe you could add a keyboard shortcut to your script?
Offline
considering all vt/s (including 7) are active all the time, i don't think there's an 'event' to note when you switch between them. personally, depending on your vm i'd script the action like
#!/bin/bash
sudo modprobe mouse
sudo chvt $1
give yourself passwordless sudo rights to those via visudo, then remap Ctrl+Alt+FX to /myscript X. or add new bindings.
but, there's probably a better way...
//github/
Offline