1<page xmlns="http://projectmallard.org/1.0/" 2 xmlns:its="http://www.w3.org/2005/11/its" 3 type="topic" style="task" 4 id="desktop-lockscreen"> 5 6 <info> 7 <link type="guide" xref="appearance" /> 8 <link type="seealso" xref="dconf-profiles" /> 9 <link type="seealso" xref="dconf-lockdown" /> 10 <revision pkgversion="3.30" date="2019-02-08" status="review"/> 11 12 <credit type="author copyright"> 13 <name>Jana Svarova</name> 14 <email>jana.svarova@gmail.com</email> 15 <years>2013</years> 16 </credit> 17 <credit type="editor"> 18 <name>Shaun McCance</name> 19 <email>shaunm@gnome.org</email> 20 <years>2014</years> 21 </credit> 22 <credit type="editor"> 23 <name>Petr Kovar</name> 24 <email>pknbe@volny.cz</email> 25 <years>2019</years> 26 </credit> 27 28 <desc>Make the screen automatically lock, so the user must 29 enter a password after being idle.</desc> 30 </info> 31 32 <title>Lock the screen when the user is idle</title> 33 34 <p>You can make the screen lock automatically whenever the user 35 is idle for some amount of time. This is useful if users 36 may leave their computers unattended in public or unsecure 37 locations.</p> 38 39 <steps> 40 <title>Enable automatic screen lock</title> 41 <include href="dconf-snippets.xml" 42 xpointer="xpointer(/*/*[@xml:id='dconf-profile-user'])" 43 xmlns="http://www.w3.org/2001/XInclude"/> 44 <include href="dconf-snippets.xml" 45 xpointer="xpointer(/*/*[@xml:id='dconf-profile-user-dir'])" 46 xmlns="http://www.w3.org/2001/XInclude"/> 47 <item> 48 <p>Create the key file 49 <file>/etc/dconf/db/local.d/00-screensaver</file> to provide 50 information for the <sys>local</sys> database.</p> 51 <listing> 52 <title><file>/etc/dconf/db/local.d/00-screensaver</file></title> 53<code> 54# Specify the dconf path 55[org/gnome/desktop/session] 56 57# Number of seconds of inactivity before the screen goes blank 58# Set to 0 seconds if you want to deactivate the screensaver. 59idle-delay=uint32 180 60 61# Specify the dconf path 62[org/gnome/desktop/screensaver] 63 64# Number of seconds after the screen is blank before locking the screen 65lock-delay=uint32 0 66</code> 67 </listing> 68 <p>You must include the <code>uint32</code> along with the 69 integer key values as shown.</p> 70 </item> 71 <item> 72 <p>To prevent the user from overriding these settings, create the file 73 <file>/etc/dconf/db/local.d/locks/screensaver</file> with the following 74 content:</p> 75 <listing> 76 <title><file>/etc/dconf/db/local.db/locks/screensaver</file></title> 77<code> 78# Lock desktop screensaver settings 79/org/gnome/desktop/session/idle-delay 80/org/gnome/desktop/screensaver/lock-delay 81</code> 82 </listing> 83 </item> 84 <include href="dconf-snippets.xml" 85 xpointer="xpointer(/*/*[@xml:id='dconf-update'])" 86 xmlns="http://www.w3.org/2001/XInclude"/> 87 <include href="dconf-snippets.xml" 88 xpointer="xpointer(/*/*[@xml:id='dconf-logoutin'])" 89 xmlns="http://www.w3.org/2001/XInclude"/> 90 </steps> 91 92</page> 93