From: Harald Meyer on
Does somebody know an easy way to run a script when the virtual terminal is
switched? I have to re-adjust the monitor gamma every time, can be annoying.


Harald
From: Vilmos Soti on
Harald Meyer <meyersharald(a)googlemail.com> writes:

> Does somebody know an easy way to run a script when the virtual
> terminal is switched? I have to re-adjust the monitor gamma every
> time, can be annoying.

I am not aware that you can run something like that automatically,
but the fgconsole(1) program tells you which one is the active VT.

You might run a busy loop program (less than ideal) which calls this
program all the time (watch(1) is a good candidate), and when the vt
changes, it calls the appropriate program.

Vilmos