Temporarily disable Automatic Screen Lock?
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
add a comment |
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
add a comment |
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
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
18.04 lock-screen
asked Feb 5 at 14:14
Anacron LockAnacron Lock
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Feb 5 at 14:36
RinzwindRinzwind
209k28402537
209k28402537
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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