Login on waking from sleep, but not screensaver / sleep display

Hi all, been trying to get rid of the login from screen saver / sleep display, while keeping the login on waking the computer from sleep. The reason I want to do this is because I frequently use a Hot Corner to sleep the display while listening to music etc, and having to enter a password just to change tracks etc is a pain But obviously I want to keep the password protection when the computer is put to sleep, as it always is when left unattended.
Anyway, based on initial Googling, I first tackled the problem by installing SleepWatcher from http://www.bernhard-baehr.de/, and adding this line to the global /etc/rc.wake script:
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
However, this wasn't very satisfactory, because after waking the computer up from sleep, you initially get a normal session, which then suspends after 3 or 4 seconds. During this time you can interact with the session as normal and move windows etc, so it kind of gives you the impression that you don't have to log in, and then you do, so it's a bit clunky, and also doesn't feel very secure.
I thought I managed to improve the situation by moving the 'suspend' command to SleepWatcher's /etc/rc.sleep script instead of the /etc/rc.wake script - meaning that your session is suspended just before sleep, so it's already suspended when you wake the computer up. But then I noticed an even worse problem - my "Sleep Display" Hot Corner stopped working after SleepWatcher suspended my session!
Yes that's right, every time the 'suspend' command ran in conjunction with SleepWatcher, my "Sleep Display" Hot Corner got disabled, and didn't get re-enabled until I completely logged out and back in (or rebooted). So I stopped using SleepWatcher, by removing the 'suspend' command from any SleepWatcher scripts, and now Hot Corners work as normal again following successive sleeps.
So next I thought, maybe I could write an AppleScript that toggles the "Require password..." checkbox in System Preferences, perhaps to use in conjunction with SleepWatcher, so that the checkbox is disabled when the display is put to sleep, and enabled when the computer is put to sleep. I actually got as far as writing an AppleScript that toggled the checkbox, and was about to attempt to integrate it with SleepWatcher...
...then I stumbled across an old thread, where they talk about updating plists under com.apple.screensaver, in order to solve a slightly different problem:
http://forums.macosxhints.com/showthread.php?t=14085
Despite the thread being a few years old and trying to solve a different problem, the following command sounded hopeful so I thought I'd try it:
defaults -currentHost write com.apple.screensaver askForPassword -int 0
...and lo and behold, it works!
My mac is now behaving exactly as I want it - prompting for password on wake from sleep in the normal way as it did before, and not prompting when I merely wake the display (or screensaver)!
This is in conjunction with having the "Require password to wake this computer from sleep or screen saver" checkbox turned ON in System Preferences.
But the puzzling thing is, why does it work? Is it safe? Are there any side-effects and am I likely to need to re-enable it following software updates? Does it work for anyone else?
When I query the values under com.apple.screensaver, I get the following... I have no way of telling what the askForPassword value was before I changed it:
$ defaults -currentHost read com.apple.screensaver
askForPassword = 0;
idleTime = 0;
moduleName = Flurry;
modulePath = "/System/Library/Screen Savers/Flurry.saver";
tokenRemovalAction = 0;
Basically I'm very surprised that a simple one-line command seems to solve the problem, when there are so many threads where people have asked the same question, and either been told it's not possible, or told you need to do weird stuff with SleepWatcher and/or Applescript, which is often incompletely explained, more complex and less effective.
So, is the one-line askForPassword solution too good to be true?

Thanks. I think for an office-type environment, it is an unusual requirement.
But let's not forget, more and more people use their computers in living-room type environments, for tasks such as playing music or watching films on a remote display. You're typically in a much darker ambience, which you don't want that to be shattered by the bright, white glare of a computer screen all the time!
So you need total control over whether the display is on or off. This has nothing to do with leaving the computer unattended. You're still there, "using" the computer, you're just not necessarily using the display.
Anyway... you are right, I toggled the "Require password..." setting in System Preferences off and then on again, and the "askForPassword" plist value changed itself to 1.
However... the behaviour of my mac has not changed. It behaves the way I want it (prompt for password on waking the compuer, but not on waking only the display), regardless whether the value of askForPassword is 0 or 1.
Even after rebooting.
Strange... what have I done?

Similar Messages

  • I am not able to login to Gmail past 2 weeks, before that I am, But still i can able to login gmail from chrome but not from Firefox

    I am not able to login to Gmail past 2 weeks, before that I am, But still i can able to login gmail from chrome but not from Firefox
    getting following error
    "Oops! Your browser seems to have cookies disabled. Make sure cookies are enabled or try opening a new browser window. [?] "
    Please help me

    The support article http://mzl.la/1BAQKUb might help you.

  • Delete contacts from icloud, but not from iphone

    I want to delete all my contacts and calendar appointments from iCloud, but not from my iphone, and i still want to have iCloud turned on in the future.
    I have tried to delete the iCloud account from my iphone but when i log in to iCloud.com from a computer the contacts are still there even though i deleted the iCloud account.
    How do i remove these things only from iCloud?

    I fixed it, i had to turn off the syncing of the contacts and the calendar on the phone and then delete them from iCloud. Obviously if i turn on the syncing of these items again the contacts and calendar appointments will reappear in iCloud.
    So problem solved.

  • Want to delete mails from Thunderbird but not from the server?

    Hi,
    Please tell me how to configure the settings of Thunderbird so that if i delete any mail from Thunderbird that mail would be delete only from Thunderbird not from server. I'm using IMAP configuration for all my mail accounts and I'm using Thunderbird in my laptop and tablet both.
    Currently i'm using Thunderbird 24.4.0 and i just want to delete my useless mails from Thunderbird but not from the server without using pop-3 settings.
    Actually the reason for this Question arises because whenever i use to uninstall and reinstatement Thunderbird, i use to take "profiles" as a back up and its size is increasing day by day that is making a big issue to me as i cant take a back up of such a big size file.

    Imap mail accounts keep the emails on the server and you see a remote view of those emails and folders.
    When you subscribe to see a folder, the headers are downloaded, when you select an email to read, the entire folder is downloaded to a temp cache facilitating quicker access. If you synchronize folders, then a copy of that folder is downloaded to an mbox file in your profile, so that you have a copy of the server folder. When you make any changes to a synchronized folder, read an email, delete or move etc, then Thunderbird will resynchronize with the server to update the server. A synchronized folder allows you to work in 'offline' mode and this is the best time to perform a backup as you know there is a temporary stop on synchronizing as you are offline. They will resynchronize when you go back into 'online' mode.
    So, with IMAP mail accounts, the folders you see in Thunderbird are the same folders on the webmail server. If you make any changes via Thunderbird or webmail then you are changing the same folder. You cannot delete an email without deleting it from the server, they are one and the same.
    What you can do is move/copy an email into Local Folders and delete the one on the server. The Local Folders emails are kept in your Profile on your computer, these folders/emails are not on the server, unless you chose to keep a copy of them on the server.
    Pop mail accounts cannot see the folders on the server. They only access the server Inbox folder and download emails not previously downloaded to the mail account Inbox in Thunderbird. These emails are kept on your computer in your profile folder. You can select to keep a copy on the server or not. You can choose to delete emails off your computer and off the server or not.
    If the mail account is gmail , have you subscribed or even synchronized to see the 'All Mail' folder ? Gmail's all Mail folder is their Archive folder, it keeps a copy of all of your non-deleted emails. So, you do not need to subscribe to see this folder as it only shows you what you can already see in other folders. It doubles the disc space.
    Please read section on 'All Mail' at this link.
    * http://kb.mozillazine.org/Using_Gmail_with_Thunderbird_and_Mozilla_Suite
    You do not have to download/synchronize the entire folder. You could select to only synchronize the most recent xx days of emails.
    see info here:
    * https://support.mozilla.org/en-US/kb/imap-synchronization#w_configuring-synchronization-and-disk-space-usage

  • Full page prints from iPhone but not from iPad using photo app with AirPrint ?

    Full page prints from iPhone but not from iPad using photo app with AirPrint ? iPad only prints 4x6 on full size paper. It's an HP 8600.

    I also have this problem printing photos from an iPad to an Epson WF-2540 printer. It prints only 4x6 and without border (so print starts at extreme top left corner of paper). Borderless printing is not selected on printer. Printing a square photo just crops to 4x6 size.

  • Delete Apps from MacBook but not from iPhone

    How can I delete Apps from iTunes but not from iPhone 3GS when I Sync them? The moment I delete the Apps from iTunes and then sync iPhone, iPhone deletes them as well.
    Please assist.

    If you intend to ever sync your phone with your Macbook then you can't delete the app from your Macbook, otherwise the apps will also delete from your iPhone (as you've discovered).

  • Can I use the same plan that I have for my iphone 4s with my new ipad? or do I have to buy a new data plan for my new ipad?  I would love to use my new ipad away from home but not sure how to use it?

    Can I use the same plan that I have for my iphone 4s with my new ipad? or do I have to buy a new data plan for my new ipad?  I would love to use my new ipad away from home but not sure how to use it?  I am on Telus mobility with my iphone 4s.

    See the answer on the same question you asked a few minutes ago.

  • Since upgrading Firefox, it no longer accepts URLs in the URL bar - it works if I have a bookmark, a link or from History, but not if I enter or paste a URL.

    Firefox 33.0.2 on Windows 8.1 64 bit. Since upgrading Firefox, it no longer accepts URLs in the URL bar - it works if I have a bookmark, a link or from History, but not if I enter or paste a URL and hit <enter>, in which case nothing happens at all.
    I have found that issue reported for Ubuntu (https://support.mozilla.org/en-US/questions/1011935?esab=a&as=aaq) but not for Windows. The solution there to change the keyboard is not feasible since it's a laptop with a built-in keyboard.
    I did not have this issue with FF 28 (I finally upgraded because I was getting BSODs) and I don't have this issue with any other Browser on same platform.
    Any help appreciated.
    Thanks.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before.

    I have develop a custom solution for SharePoint Foundation 2010 that provide PDF documents filled with lists data and attachemnts.
    If the Customer run the solution to get the PDF we found in the ULS log following entry:
    03/07/2014 12:07:20.69  w3wp.exe (0x0B10) 0x18EC 
    SharePoint Foundation General                        90hv Unexpected 
    Detected use of SPRequest for previously closed SPWeb object.  Please close SPWeb objects when you are done with all objects obtained from them, but not before.  Stack trace:    at Microsoft.SharePoint.Utilities.SPUtility.GetLocalizedString(String
    source, String defaultResourceFile, UInt32 language)     at Microsoft.SharePoint.SPFieldCollection.get_DisplayNameDict()     at Microsoft.SharePoint.SPFieldCollection.GetFieldByDisplayName(String strDisplayName, Boolean
    bThrowException)     at Microsoft.SharePoint.SPFieldCollection.GetField(String strName, Boolean bThrowException)     at Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException)    
    at Microsoft.SharePoint.SPListItem.get_Item(String fieldName)    
    at ECM_PDF_Excel.ListClicked.GetECOs(Dictionary`2 searchedEC... e918ecd4-7ed6-44bb-9e4f-d764586a2f79 ...RECONumber)    
    at ECM_PDF_Excel.PDF.Create()     at ECM_PDF_Excel.Layouts.ECM_PDF_Excel.ECMPDFExcel.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext
    context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
    managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 f... e918ecd4-7ed6-44bb-9e4f-d764586a2f79
    03/07/2014 12:07:20.69* w3wp.exe (0x0B10)                        0x18EC SharePoint Foundation        
     General                        90hv Unexpected ...lags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr
    managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32
    flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   e918ecd4-7ed6-44bb-9e4f-d764586a2f79
    We check the method
            /// <summary>
            /// Returns the ECOs in a Dictionary: ECO Number, Suffix
            /// </summary>
            /// <param name="searchedECRECONumber">Dictionary, with the search ECR/ECO Number</param>
            /// <returns>Dictionary ECO Number, Suffix</returns>
            public static Dictionary<string, string> GetECOs(Dictionary<String, String> searchedECRECONumber)
                SPSite siteContx = SPContext.Current.Site;
                SPWeb webContx = siteContx.RootWeb;
                Dictionary<string, string> listECOs = new Dictionary<string, string>();
                string ecoNumber = string.Empty;
                string ecoSuffix = string.Empty;
                if (searchedECRECONumber.ContainsKey(ConstantData.listClickedECONumberDictionary))
                    ecoNumber = searchedECRECONumber[ConstantData.listClickedECONumberDictionary];
                else
                    return listECOs;
                // Ich suche die ECO Nummber bei gegebener ECR Nummer
                // Ich brauche den Listen Namen der in den Spalten Realtion ECR Number & Realtion ECO Number einen Wert hat
                SPList dataList = webContx.Lists.TryGetList(ConstantData.listName_ECMExcelTemplateDataLists);
                if (dataList != null)
                    SPListItemCollection dataListItems = webContx.Lists.TryGetList(ConstantData.listName_ECMExcelTemplateDataLists).Items;
                    foreach (SPItem dataListItem in dataListItems)
                        Object relationECRColumnName = (String)dataListItem[ConstantData.listFieldName_ECMExcelTemplateDataLists_RelationECRNumber];
                        Object relationECOColumnName = (String)dataListItem[ConstantData.listFieldName_ECMExcelTemplateDataLists_RelationECONumber];
                        if (relationECRColumnName != null && relationECOColumnName != null)
                            // Ich habe den Listennamen gefunden in dem Spalten Realtion ECR Number & Realtion ECO Number einen Wert haben
                            string searchedListName = (String)dataListItem[ConstantData.listFieldName_ECMExcelTemplateDataLists_Title];
                            string searchedECOSuffixColumnName = (String)dataListItem[ConstantData.listFieldName_ECMExcelTemplateDataLists_RelationECONumber];
                            // Get the List from variable listName
                            listECOs = GetECOsDictionary(searchedListName, searchedECOSuffixColumnName, ecoNumber, relationECOColumnName);
                return listECOs;
    - What take we wrong?
    - How can we avoid this message?
    Regards
    Jonnyenglisch
    Ralf Happe - Christobal Colón N° 1 ES 07670 Portocolom Tel.: +34 6961 0375 7 @: [email protected] Skype: ralfhappe msm: [email protected] www.ralfhappe.com ralfhappe | soluciónes

    Here the code of GetECOsDictionary:
             /// <summary>
            /// Fill the dicionary with related ECO Numbers/Suffix
            /// </summary>
            /// <param name="searchedListName">String: the name of the list</param>
            /// <param name="ecoNumber">String: the ECO Number</param>
            /// <param name="relationECOColumnName"></param>
            /// <returns>Dictionary</returns>
            private static Dictionary<string, string> GetECOsDictionary(string searchedListName, string ecoNumber, Object relationECOColumnName)
                SPSite siteContx = SPContext.Current.Site;
                SPWeb webContx = siteContx.RootWeb;
                Dictionary<string, string> listECOs = new Dictionary<string, string>();
                SPQuery oQuery = new SPQuery();
                oQuery.Query = "<OrderBy>" +
                                    "<FieldRef Name='" + "Title" + "' Ascending='TRUE'></FieldRef>"
    +
                                "</OrderBy>" +
                                "<Where><BeginsWith>" +
                                    "<FieldRef Name='" + "Title" + "'/>" +
                                    "<Value Type='Text'>" + ecoNumber + "</Value>" +
                                "</BeginsWith></Where>";
                SPListItemCollection searchedListItems = webContx.Lists.TryGetList(searchedListName).GetItems(oQuery);
                foreach (SPItem searchedListItem in searchedListItems)
                    // Wenn die geclickte ECO Nummer gleich der Listen ECO Nummer ist dann setze die gefundene ECO Nummer
                    string foundECONumber = (String)searchedListItem[relationECOColumnName.ToString()];
                    string[] splitECONumber = foundECONumber.Split(ConstantData.splitBy_Slash);
                    if (ecoNumber == splitECONumber[0])
                        ecoNumber = splitECONumber[0];
                        if (splitECONumber.Count() == 1)
                            listECOs.Add(foundECONumber, "0");
                        if (splitECONumber.Count() > 1)
                            listECOs.Add(foundECONumber, splitECONumber[1]);
                return listECOs;
    Ralf Happe - Christobal Colón N° 1 ES 07670 Portocolom Tel.: +34 6961 0375 7 @: [email protected] Skype: ralfhappe msm: [email protected] www.ralfhappe.com ralfhappe | soluciónes

  • Printer will print from ipad but not from laptop.

    Printer will print from ipad but not from laptop. No previous problems printing from laptop. HP ENVY 110 series;

    Hi Wpbpatfl,
    Have you tried running the HP Print and Scan Doctor? It is a quick and easy tool that diagnoses and resolves many printing, scanning, and connectivity problems. Check out the link below for details on downloading and running the tool:
    http://goo.gl/8NZ0e
    If I have helped in any way, just click the Kudos star on the left. Also, if your issue has been resolved, don't forget to select Accept as Solution

  • Will print from IPaD but not laptop- HP Deskjet 3050A J611series Windows7

    will print from IPaD but not laptop-  HP Deskjet 3050A J611series Windows7

    Hi 147, 
    Run the following utility.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02114788&cc=us&dlc=en&lang=en&lc=en&product=506...
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • TS2621 I can access yahoo mail from safari but not from the iphone ipad mail icon after changing password

    I can access yahoo mail from safari but not from the iphone ipad mail app after changing my password

    Go into your settings and remove the account. Add the account again with your new password.
    Best of luck- K.

  • I bought Mountain LIon but no dmg is downloaded. I can see the invoice from Apple but not the OS I supposed to receive. Is it a bugg?? I have a mac book air. Thanks

    xI bought Mountain LIon but no dmg is downloaded. I can see the invoice from Apple but not the OS I supposed to receive. Is it a bugg?? I have a mac book air. Thanks

    Thanks for the reply.
    However the trick is that it cannot download at all.I m asked to download the application. Then I put my Apple ID, then it start to download but just 1s... Then ....Nothing. No application, no error message... Just a nice invoice....

  • I'm working on DC Motor control using DAQ. There is sufficient voltage output from DAQ but not current. What should i do so as to drive the motor

    I'm working on DC Motor control using DAQ. There is sufficient voltage output from DAQ but not current. What should i do so as to drive the motor. Could you suggest me appropriate driver IC using which this problem can be solved.
    Saravanan.T

    You really should use a DC motor controller to control a DC motor, look at the 754410 IC for a good example. You should be able to interface these to most DAQ devices.
    Alan

  • I have multiple calendars set up but not all are displaying in iOS 7 notification center.  I just get a heading stating "there is one all-day event scheduled" in the tomorrow summary.  Can't get it to show the details of the event.  any ideas?

    I have multiple calendars set up but not all are displaying in iOS 7 notification center.  I just get a heading stating "there is one all-day event scheduled" in the tomorrow summary.  Can't get it to show the details of the event.  any ideas?

    have you tried rebooting your computer?

Maybe you are looking for