{"id":42284,"date":"2018-12-14T09:22:08","date_gmt":"2018-12-14T08:22:08","guid":{"rendered":"https:\/\/botland.com.pl\/blog\/how-to-lock-your-screen-on-raspberry-pi\/"},"modified":"2018-12-14T09:22:08","modified_gmt":"2018-12-14T08:22:08","slug":"how-to-lock-your-screen-on-raspberry-pi","status":"publish","type":"post","link":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/","title":{"rendered":"How to lock your screen on Raspberry Pi?"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading time:<\/span> <span class=\"rt-time\"> &lt; 1<\/span> <span class=\"rt-label rt-postfix\">min.<\/span><\/span>\nIf you\u2019ve ever used Windows, you already know their famous lock screen, found in almost all versions of the OS. Whenever you\u2019re leaving your computer for longer than a couple of minutes, it might be worth it to protect it from anyone who might access it while you\u2019re gone. On Windows, you can easily do that with a simple combination of Windows+L.\n\n\nHowever, here we\u2019re talking not about Windows, but about <a href=\"https:\/\/botland.store\/399-raspberry-pi\" data-wpel-link=\"internal\">Raspberry Pi<\/a>. If you\u2019re using the command line mode and are not logged in, anyone who has access to it needs to log in.\n\n\nBut what about the Desktop mode? It would be nice if the screen locked by itself whenever you leave it open without input. This is especially important when using Pi as a server in Desktop mode, which makes it easier to control.\n\n\n<figure><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0176\/3274\/files\/ybs_grande.png?v=1544005693\" alt=\" width=\"593\" height=\"333\" \/><figcaption><em>Desktop in Raspbian OS<\/em><\/figcaption><\/figure>\n\n\nThe \u201cscreensaver\u201d isn\u2019t installed by default, but there is a lock screen &#8211; however, you won\u2019t find it in the menu. What you can do is add a handy icon by editing the file that controls your menu and toolbar.\n\n\nOpen the terminal window and type:\n\n\n<pre><code>sudo nano \/etc\/xdg\/lxpanel\/LXDE-pi\/panels\/panel<\/code><\/pre>\n\n\n\nScroll down until you find the section starting with:\n\n\n<pre><code>Plugin {\n  type=menu<\/code><\/pre>\n\n\n\nFind the bottom of this section and paste in the following code:\n\n\n<pre><code>    item {\n      name=Lock\u2026\n      image=gnome-lockscreen\n      action=\/usr\/bin\/dm-tool lock\n    }<\/code><\/pre>\n\n\nIt should now look like this:\n\n\n\nSave the file using the key combination ctrl+x, and press \u201cy\u201d to confirm your choice. Finally, press Enter.\n\n\nAfter rebooting your Raspberry, you will find the \u201cLock\u201d option in your menu, looking like this:\n\n\n\nNow, whenever you move away from your <a href=\"https:\/\/botland.store\/399-raspberry-pi\" data-wpel-link=\"internal\">Raspberry Pi<\/a>, you can simply press Lock and nobody will be able to gain access to your personal files.\n\n\n\nIn order to get back into the desktop, simply put in your password.\n\n\n<em>*In the old Raspbian versions, you need to find the config file at \n~\/.config\/lxpanel\/LXDE-pi\/panels\/panel instead<\/em>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019ve ever used Windows, you already know their famous lock screen, found in almost all versions of the OS. Whenever you\u2019re leaving your computer for longer than a couple of minutes, it might be worth it to protect it from anyone who might access it while you\u2019re gone. On Windows, you can easily do [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":42285,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[343,341],"tags":[431,402],"class_list":["post-42284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi-en","category-tips","tag-lock","tag-raspberry-pi-en-tag"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to lock your screen on Raspberry Pi? - Botland<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to lock your screen on Raspberry Pi? - Botland\" \/>\n<meta property=\"og:description\" content=\"If you\u2019ve ever used Windows, you already know their famous lock screen, found in almost all versions of the OS. Whenever you\u2019re leaving your computer for longer than a couple of minutes, it might be worth it to protect it from anyone who might access it while you\u2019re gone. On Windows, you can easily do [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/\" \/>\n<meta property=\"og:site_name\" content=\"Botland\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/Botland\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-14T08:22:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/botland.store\/blog\/wp-content\/uploads\/2022\/07\/lockedpi_grande-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"599\" \/>\n\t<meta property=\"og:image:height\" content=\"347\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Maciej Chmiel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Maciej Chmiel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/\"},\"author\":{\"name\":\"Maciej Chmiel\",\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#\\\/schema\\\/person\\\/7dc2a9884b42767fa40ffc62d97e81a4\"},\"headline\":\"How to lock your screen on Raspberry Pi?\",\"datePublished\":\"2018-12-14T08:22:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/\"},\"wordCount\":151,\"publisher\":{\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/lockedpi_grande-1.jpg\",\"keywords\":[\"lock\",\"Raspberry Pi\"],\"articleSection\":[\"Raspberry Pi\",\"Tips\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/\",\"url\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/\",\"name\":\"How to lock your screen on Raspberry Pi? - Botland\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/lockedpi_grande-1.jpg\",\"datePublished\":\"2018-12-14T08:22:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/#primaryimage\",\"url\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/lockedpi_grande-1.jpg\",\"contentUrl\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/lockedpi_grande-1.jpg\",\"width\":599,\"height\":347},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/how-to-lock-your-screen-on-raspberry-pi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Strona g\u0142\u00f3wna\",\"item\":\"https:\\\/\\\/botland.store\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to lock your screen on Raspberry Pi?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/\",\"name\":\"Botland\",\"description\":\"Blog Raspberry Pi, Arduino, elektronika i robotyka - Botland\",\"publisher\":{\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#organization\",\"name\":\"Botland\",\"url\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/logo_kolor_WP_2-1.png\",\"contentUrl\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/logo_kolor_WP_2-1.png\",\"width\":250,\"height\":57,\"caption\":\"Botland\"},\"image\":{\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/Botland\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/botland.com.pl\\\/blog\\\/#\\\/schema\\\/person\\\/7dc2a9884b42767fa40ffc62d97e81a4\",\"name\":\"Maciej Chmiel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/logo_kolor_WP_3-1-150x150.png\",\"url\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/logo_kolor_WP_3-1-150x150.png\",\"contentUrl\":\"https:\\\/\\\/botland.store\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/logo_kolor_WP_3-1-150x150.png\",\"caption\":\"Maciej Chmiel\"},\"description\":\"Specjalista od Arduino i szeroko rozumianej elektroniki. Cz\u0142owiek-orkiestra, dy\u017curny od wszystkiego - nie ma dla niego rzeczy niemo\u017cliwych, a czas ich realizacji jest zwykle prawie natychmiastowy. Po pracy mi\u0142o\u015bnik kresk\u00f3wek z Pepe Panem Dziobakiem. Jego bezcenne memy wspomagaj\u0105 dzia\u0142 kreatywny.\",\"url\":\"https:\\\/\\\/botland.store\\\/blog\\\/author\\\/maciek\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to lock your screen on Raspberry Pi? - Botland","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/","og_locale":"en_US","og_type":"article","og_title":"How to lock your screen on Raspberry Pi? - Botland","og_description":"If you\u2019ve ever used Windows, you already know their famous lock screen, found in almost all versions of the OS. Whenever you\u2019re leaving your computer for longer than a couple of minutes, it might be worth it to protect it from anyone who might access it while you\u2019re gone. On Windows, you can easily do [&hellip;]","og_url":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/","og_site_name":"Botland","article_publisher":"https:\/\/facebook.com\/Botland\/","article_published_time":"2018-12-14T08:22:08+00:00","og_image":[{"width":599,"height":347,"url":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2022\/07\/lockedpi_grande-1.jpg","type":"image\/jpeg"}],"author":"Maciej Chmiel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Maciej Chmiel","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/#article","isPartOf":{"@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/"},"author":{"name":"Maciej Chmiel","@id":"https:\/\/botland.com.pl\/blog\/#\/schema\/person\/7dc2a9884b42767fa40ffc62d97e81a4"},"headline":"How to lock your screen on Raspberry Pi?","datePublished":"2018-12-14T08:22:08+00:00","mainEntityOfPage":{"@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/"},"wordCount":151,"publisher":{"@id":"https:\/\/botland.com.pl\/blog\/#organization"},"image":{"@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2022\/07\/lockedpi_grande-1.jpg","keywords":["lock","Raspberry Pi"],"articleSection":["Raspberry Pi","Tips"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/","url":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/","name":"How to lock your screen on Raspberry Pi? - Botland","isPartOf":{"@id":"https:\/\/botland.com.pl\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/#primaryimage"},"image":{"@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2022\/07\/lockedpi_grande-1.jpg","datePublished":"2018-12-14T08:22:08+00:00","breadcrumb":{"@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/#primaryimage","url":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2022\/07\/lockedpi_grande-1.jpg","contentUrl":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2022\/07\/lockedpi_grande-1.jpg","width":599,"height":347},{"@type":"BreadcrumbList","@id":"https:\/\/botland.store\/blog\/how-to-lock-your-screen-on-raspberry-pi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Strona g\u0142\u00f3wna","item":"https:\/\/botland.store\/blog\/"},{"@type":"ListItem","position":2,"name":"How to lock your screen on Raspberry Pi?"}]},{"@type":"WebSite","@id":"https:\/\/botland.com.pl\/blog\/#website","url":"https:\/\/botland.com.pl\/blog\/","name":"Botland","description":"Blog Raspberry Pi, Arduino, elektronika i robotyka - Botland","publisher":{"@id":"https:\/\/botland.com.pl\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/botland.com.pl\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/botland.com.pl\/blog\/#organization","name":"Botland","url":"https:\/\/botland.com.pl\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/botland.com.pl\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2018\/04\/logo_kolor_WP_2-1.png","contentUrl":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2018\/04\/logo_kolor_WP_2-1.png","width":250,"height":57,"caption":"Botland"},"image":{"@id":"https:\/\/botland.com.pl\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/Botland\/"]},{"@type":"Person","@id":"https:\/\/botland.com.pl\/blog\/#\/schema\/person\/7dc2a9884b42767fa40ffc62d97e81a4","name":"Maciej Chmiel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2019\/03\/logo_kolor_WP_3-1-150x150.png","url":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2019\/03\/logo_kolor_WP_3-1-150x150.png","contentUrl":"https:\/\/botland.store\/blog\/wp-content\/uploads\/2019\/03\/logo_kolor_WP_3-1-150x150.png","caption":"Maciej Chmiel"},"description":"Specjalista od Arduino i szeroko rozumianej elektroniki. Cz\u0142owiek-orkiestra, dy\u017curny od wszystkiego - nie ma dla niego rzeczy niemo\u017cliwych, a czas ich realizacji jest zwykle prawie natychmiastowy. Po pracy mi\u0142o\u015bnik kresk\u00f3wek z Pepe Panem Dziobakiem. Jego bezcenne memy wspomagaj\u0105 dzia\u0142 kreatywny.","url":"https:\/\/botland.store\/blog\/author\/maciek\/"}]}},"_links":{"self":[{"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/posts\/42284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/comments?post=42284"}],"version-history":[{"count":0,"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/posts\/42284\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/media\/42285"}],"wp:attachment":[{"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/media?parent=42284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/categories?post=42284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/botland.store\/blog\/wp-json\/wp\/v2\/tags?post=42284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}