determine if GUI is being used while logged in via SSH

Discussion in 'Apple' started by osiris, Oct 8, 2006.

  1. osiris

    osiris Guest

    Is it possible to determine if someone is using a Mac interactively
    while I am logged in at the shell via SSH? I manage 25 iMacs
    in a Mac Lab at a university and applications are often
    left running. I'd like to kill them if the app is not being used.

    It wouldn't be enough to see that applications are open via 'ps ax'
    since the apps could have been left running but I'm not sure
    how to determine the last time that the Mac was used in the Finder.
    Thanks for any help.
     
    osiris, Oct 8, 2006
    #1
    1. Advertisements

  2. osiris

    Tom Stiller Guest

    How about 'ps ax | grep -i finder' ?
     
    Tom Stiller, Oct 9, 2006
    #2
    1. Advertisements

  3. osiris

    Bob Harris Guest

    what if you check for the screen saver running?

    Bob Harris
     
    Bob Harris, Oct 9, 2006
    #3
  4. osiris

    osiris Guest


    This is good idea using e.g. /usr/bin/top
    (ScreenSave should always be near the top
    if it is running)
    but what if displaysleep comes on
    and, thus, the screensaver is not active?
    Should I see anything in top or ps?
     
    osiris, Oct 9, 2006
    #4
  5. osiris

    D P Schreber Guest

     
    D P Schreber, Oct 9, 2006
    #5
  6. osiris

    D P Schreber Guest

    Sorry about the spurious empty post. I was about to respond to the
    question in Subject line, then realized you were in fact asking an
    entirely different question, then in my confusion hit 'y' instead of
    'n'. Oops. I tried to cancel afterwards but of course that almost
    never works.
     
    D P Schreber, Oct 9, 2006
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.