Temporarily disable Automatic Screen Lock?












0















What is the smartest way to temporarily disable the Automatic Screen Lock function?



Think of this usecase: The default setting of the machine is a very low blanking time to agressively save energy and automatic screen lock right after for security (in case one walks away from the machine and forgets to lock it).



Now sometimes the machine is supposed to be shared. Imagine for cooking. You want to be able to see the recipie right after touching one button without entering a password. (Maybe you have dirty hands or someone else is using the machine who does not know the password.)



The standard way to deal with this is to disable the automatic screen lock, either from GUI or from the CLI. The issue here is that reenabling it afterwards is a tedious task, that is easily forgotten.



The question now is, how to disable the Automatic Screen Lock only for a specified time (1 hour, 1 day) or until a specific event (shutdown).



My idea is to use anacron to set it to enabled every day. Yet I do not feel like this is very elegant. Any better solutions?










share|improve this question



























    0















    What is the smartest way to temporarily disable the Automatic Screen Lock function?



    Think of this usecase: The default setting of the machine is a very low blanking time to agressively save energy and automatic screen lock right after for security (in case one walks away from the machine and forgets to lock it).



    Now sometimes the machine is supposed to be shared. Imagine for cooking. You want to be able to see the recipie right after touching one button without entering a password. (Maybe you have dirty hands or someone else is using the machine who does not know the password.)



    The standard way to deal with this is to disable the automatic screen lock, either from GUI or from the CLI. The issue here is that reenabling it afterwards is a tedious task, that is easily forgotten.



    The question now is, how to disable the Automatic Screen Lock only for a specified time (1 hour, 1 day) or until a specific event (shutdown).



    My idea is to use anacron to set it to enabled every day. Yet I do not feel like this is very elegant. Any better solutions?










    share|improve this question

























      0












      0








      0








      What is the smartest way to temporarily disable the Automatic Screen Lock function?



      Think of this usecase: The default setting of the machine is a very low blanking time to agressively save energy and automatic screen lock right after for security (in case one walks away from the machine and forgets to lock it).



      Now sometimes the machine is supposed to be shared. Imagine for cooking. You want to be able to see the recipie right after touching one button without entering a password. (Maybe you have dirty hands or someone else is using the machine who does not know the password.)



      The standard way to deal with this is to disable the automatic screen lock, either from GUI or from the CLI. The issue here is that reenabling it afterwards is a tedious task, that is easily forgotten.



      The question now is, how to disable the Automatic Screen Lock only for a specified time (1 hour, 1 day) or until a specific event (shutdown).



      My idea is to use anacron to set it to enabled every day. Yet I do not feel like this is very elegant. Any better solutions?










      share|improve this question














      What is the smartest way to temporarily disable the Automatic Screen Lock function?



      Think of this usecase: The default setting of the machine is a very low blanking time to agressively save energy and automatic screen lock right after for security (in case one walks away from the machine and forgets to lock it).



      Now sometimes the machine is supposed to be shared. Imagine for cooking. You want to be able to see the recipie right after touching one button without entering a password. (Maybe you have dirty hands or someone else is using the machine who does not know the password.)



      The standard way to deal with this is to disable the automatic screen lock, either from GUI or from the CLI. The issue here is that reenabling it afterwards is a tedious task, that is easily forgotten.



      The question now is, how to disable the Automatic Screen Lock only for a specified time (1 hour, 1 day) or until a specific event (shutdown).



      My idea is to use anacron to set it to enabled every day. Yet I do not feel like this is very elegant. Any better solutions?







      18.04 lock-screen






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 5 at 14:14









      Anacron LockAnacron Lock

      11




      11






















          1 Answer
          1






          active

          oldest

          votes


















          0















          What is the smartest way to temporarily disable the Automatic Screen Lock function?




          Use the method from the link you used for the CLI way so ...



          gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
          gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'



          My idea is to use anacron to set it to enabled every day.




          The easiest method to me would be using the at command. at is set up such that you can words to explain when it should be executed and consists of 3 commands:



          at : execute commands at specified time.
          atq : lists the pending jobs of users.
          atrm : delete jobs by their job number.


          at can use words like:



          noon    
          midnight
          teatime
          tomorrow
          noon tomorrow
          next week
          next monday
          midnight
          now + 2 days
          4 PM + 2 days


          So



          echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'" | at 9:00 AM


          would lock the screen at 9 am.



           echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'" | at midnight


          would unlock it at midnight.



          You can put a whole array of these commands in a script and call that script from cron (/etc/crontab with the @reboot method), on boot (/etc/rc.d/rc.local) or on login (~.bash_profile) or from anacron.






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1115830%2ftemporarily-disable-automatic-screen-lock%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0















            What is the smartest way to temporarily disable the Automatic Screen Lock function?




            Use the method from the link you used for the CLI way so ...



            gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
            gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'



            My idea is to use anacron to set it to enabled every day.




            The easiest method to me would be using the at command. at is set up such that you can words to explain when it should be executed and consists of 3 commands:



            at : execute commands at specified time.
            atq : lists the pending jobs of users.
            atrm : delete jobs by their job number.


            at can use words like:



            noon    
            midnight
            teatime
            tomorrow
            noon tomorrow
            next week
            next monday
            midnight
            now + 2 days
            4 PM + 2 days


            So



            echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'" | at 9:00 AM


            would lock the screen at 9 am.



             echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'" | at midnight


            would unlock it at midnight.



            You can put a whole array of these commands in a script and call that script from cron (/etc/crontab with the @reboot method), on boot (/etc/rc.d/rc.local) or on login (~.bash_profile) or from anacron.






            share|improve this answer




























              0















              What is the smartest way to temporarily disable the Automatic Screen Lock function?




              Use the method from the link you used for the CLI way so ...



              gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
              gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'



              My idea is to use anacron to set it to enabled every day.




              The easiest method to me would be using the at command. at is set up such that you can words to explain when it should be executed and consists of 3 commands:



              at : execute commands at specified time.
              atq : lists the pending jobs of users.
              atrm : delete jobs by their job number.


              at can use words like:



              noon    
              midnight
              teatime
              tomorrow
              noon tomorrow
              next week
              next monday
              midnight
              now + 2 days
              4 PM + 2 days


              So



              echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'" | at 9:00 AM


              would lock the screen at 9 am.



               echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'" | at midnight


              would unlock it at midnight.



              You can put a whole array of these commands in a script and call that script from cron (/etc/crontab with the @reboot method), on boot (/etc/rc.d/rc.local) or on login (~.bash_profile) or from anacron.






              share|improve this answer


























                0












                0








                0








                What is the smartest way to temporarily disable the Automatic Screen Lock function?




                Use the method from the link you used for the CLI way so ...



                gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
                gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'



                My idea is to use anacron to set it to enabled every day.




                The easiest method to me would be using the at command. at is set up such that you can words to explain when it should be executed and consists of 3 commands:



                at : execute commands at specified time.
                atq : lists the pending jobs of users.
                atrm : delete jobs by their job number.


                at can use words like:



                noon    
                midnight
                teatime
                tomorrow
                noon tomorrow
                next week
                next monday
                midnight
                now + 2 days
                4 PM + 2 days


                So



                echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'" | at 9:00 AM


                would lock the screen at 9 am.



                 echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'" | at midnight


                would unlock it at midnight.



                You can put a whole array of these commands in a script and call that script from cron (/etc/crontab with the @reboot method), on boot (/etc/rc.d/rc.local) or on login (~.bash_profile) or from anacron.






                share|improve this answer














                What is the smartest way to temporarily disable the Automatic Screen Lock function?




                Use the method from the link you used for the CLI way so ...



                gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
                gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'



                My idea is to use anacron to set it to enabled every day.




                The easiest method to me would be using the at command. at is set up such that you can words to explain when it should be executed and consists of 3 commands:



                at : execute commands at specified time.
                atq : lists the pending jobs of users.
                atrm : delete jobs by their job number.


                at can use words like:



                noon    
                midnight
                teatime
                tomorrow
                noon tomorrow
                next week
                next monday
                midnight
                now + 2 days
                4 PM + 2 days


                So



                echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'" | at 9:00 AM


                would lock the screen at 9 am.



                 echo "gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'" | at midnight


                would unlock it at midnight.



                You can put a whole array of these commands in a script and call that script from cron (/etc/crontab with the @reboot method), on boot (/etc/rc.d/rc.local) or on login (~.bash_profile) or from anacron.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 5 at 14:36









                RinzwindRinzwind

                209k28402537




                209k28402537






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1115830%2ftemporarily-disable-automatic-screen-lock%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to send String Array data to Server using php in android

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                    Is anime1.com a legal site for watching anime?