I'm looking for a way for linux to query a pc if user X is on, and has used the pc recently or the screensaver is not active. If so, I'll route a call for user X to the phone near that PC. Ideas, anyone? Leif
On Mon, 1 Mar 2010, Leif Neland wrote:> I'm looking for a way for linux to query a pc if user X is on, and has > used the pc recently or the screensaver is not active. > > If so, I'll route a call for user X to the phone near that PC. > > Ideas, anyone?In the good old days we had utilities such as finger and so on - these days we're all paranoid about security, etc. that all the nice stuff is turned off... Or should be! However, if you're on a LAN/WAN at the company level then they can be made to work again, but outside a strictly controlled environment it's not going to be easy - unless you write something to do it yourself... Gordon
On Mon, 2010-03-01 at 23:46 +0100, Leif Neland wrote:> I'm looking for a way for linux to query a pc if user X is on, and has > used the pc recently or the screensaver is not active. > > If so, I'll route a call for user X to the phone near that PC.If you're using a relatively modern version of Asterisk, you could use the res_jabber and the JABBER_STATUS function to see if they're marked as available in their XMPP IM client. (Most IM clients will set the status to away when the screensaver kicks in.) -- Jared Smith Digium, Inc.
On Mon, 2010-03-01 at 23:46 +0100, Leif Neland wrote:> I'm looking for a way for linux to query a pc if user X is on, and has > used the pc recently or the screensaver is not active. > > If so, I'll route a call for user X to the phone near that PC. > > Ideas, anyone? >'who' can give you info who is logged in and when for all terminals on a linux machine. Also 'fgconsole' will be usefull. This assumes you got remote access (ssh probably) to the machine and you are able to execute commands as root (for the fgconsole at least) Check also the XDMCP protocol for the X Display Manager XDM, KDM, GDM etc (not sure which one your machines will be running) as it can provide some info also -- Stelios S. Koroneos Digital OPSiS - Embedded Intelligence Tel +30 210 9858296 Ext 100 Fax +30 210 9858298 http://www.digital-opsis.com