Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am trying to find programatically if a Linux box is screen lock/unlock. In KDE, i can lock a linux machine using, kdesktop_lock --forcelock Once machine gets lock, a ...
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    1

    Post Knowing Linux machine state (Screen Lock/unlock)

    Hi,

    I am trying to find programatically if a Linux box is screen lock/unlock.

    In KDE, i can lock a linux machine using,
    kdesktop_lock --forcelock
    Once machine gets lock, a process called 'KDesktop_lock' starts running.

    In GNOME, i can lock machine using,
    gnome-screensaver-command --lock
    But there is no way to find whether a machine using GNOME is screen lock or unlock.

    I am trying to find what is the command to know state of a Linux machine. State is locked or unlocked?

    Help on this will be appreciated...

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    That is a GUI thing, and the fact is that more than one user can have an X-Windows GUI running, such as remote clients running VNC, and each can have a lock on their virtual or physical screen. What is going on with the physical console is irrelevant to other users. This is not like a Windows system where there is only one "user" at a time. So, this is not a state of the system, but only of a single UI, and Linux can have many concurrent users each with their own UI active.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...