||04-30-2005 02:21 PM
Determining the Active Virtual Console
This may be a really stupid question but does anyone know how to tell which virtual console / screen is currently being displayed on screen by a script. I'm writing a cron script to do some things when it detects a network connection but some of the things (like running evolution) depend on the DISPLAY being set. i'm currently just using "who" and awking for my username and the console, but it would be nice to know which display is actually active, since i sometimes log in on more than one.