Unix/Linux Go Back    

Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

command line tool to disable screen lock and/or screen saver

Red Hat

Thread Tools Search this Thread Display Modes
Old Unix and Linux 10-20-2011
albator1932 albator1932 is offline
Registered User
Join Date: Sep 2011
Last Activity: 18 June 2012, 4:58 AM EDT
Posts: 11
Thanks: 2
Thanked 1 Time in 1 Post
command line tool to disable screen lock and/or screen saver


I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ?
Sponsored Links
Old Unix and Linux 10-20-2011
cjcox cjcox is offline
Registered User
Join Date: May 2005
Last Activity: 27 June 2016, 2:12 PM EDT
Posts: 614
Thanks: 4
Thanked 109 Times in 106 Posts
There's no portable way to do this. You can target a particular screen locker and often times they will have an option or way to send a message to the screen locker to stop locking. Some desktop screen lockers will look for particular power mgmt profiling to determine if they should lock or not.

If you want to disable it permanently, you should be able to do this in System -> Preferences -> Screensaver. Then you could manually lock your screen when you feel it is needed.

Since you're saying RHEL 5.4, you can send the gnome-screensaver a dbus message to inhibit locking with:

dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.Inhibit string:"myshell" string:"I have no reason for doing this"

That command will return an integer string (cookie)... use that to UnInhibit

dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.UnInhibit uint32:<the-integer-returned-from-the-inhibit>

Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
screen saver seyiisq Solaris 1 03-19-2009 07:30 PM
How to disable the clearing of the first page when executing screen tool saad26 UNIX for Advanced & Expert Users 2 02-15-2009 11:30 PM
Screen Saver Resolution ambavaram Solaris 2 06-19-2008 12:48 PM
screen saver command line on solaris10-intel itik Solaris 0 05-28-2008 11:01 AM
Screen saver Hegazy Mahdy UNIX for Dummies Questions & Answers 3 10-30-2001 02:52 PM

All times are GMT -4. The time now is 12:05 AM.