{"id":110,"date":"2014-12-02T09:37:50","date_gmt":"2014-12-02T08:37:50","guid":{"rendered":"http:\/\/www.manuel-then.de\/?p=110"},"modified":"2014-12-02T09:37:50","modified_gmt":"2014-12-02T08:37:50","slug":"reliable-screen-lock-on-sleep-in-cinnamon","status":"publish","type":"post","link":"https:\/\/www.manuel-then.de\/?p=110","title":{"rendered":"Reliable screen lock on sleep in Cinnamon"},"content":{"rendered":"<p>I&#8217;ve been having some problems with Cinnamon&#8217;s default lock screen cinnamon-screensaver not reliably being active after resume. Sometimes my screen was still visible for a blink of an eye, sometimes it didn&#8217;t even activate at all (often coinciding with hangs of Cinnamon, e.g. caused by FUSE).<br \/>\nIn order to fix this I created a simple systemd service following the <a href=\"https:\/\/wiki.archlinux.org\/index.php\/Systemd\/Services\" target=\"_blank\">template in the Arch Wiki<\/a>.<\/p>\n<p>\/etc\/systemd\/system\/screenlock.service:<br \/>\n<code>[Unit]<br \/>\nDescription=Lock X session on sleep<br \/>\nBefore=sleep.target<\/code><\/p>\n<p>[Service]<br \/>\nUser=username<br \/>\nEnvironment=DISPLAY=:0<br \/>\nExecStart=\/usr\/bin\/cinnamon-screensaver-command -l<\/p>\n<p>[Install]<br \/>\nWantedBy=sleep.target<\/p>\n<p>After enabling the service (<code>systemctl enable screenlock.service<\/code>) I got a reliable lock screen. It takes my notebook about an extra second to go to sleep now, but I don&#8217;t mind that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been having some problems with Cinnamon&#8217;s default lock screen cinnamon-screensaver not reliably being active after resume. Sometimes my screen was still visible for a blink of an eye, sometimes it didn&#8217;t even activate at all (often coinciding with hangs of Cinnamon, e.g. caused by FUSE). In order to fix this I created a simple [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[15,12,14,16,11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=\/wp\/v2\/posts\/110"}],"collection":[{"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110"}],"version-history":[{"count":5,"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions"}],"predecessor-version":[{"id":131,"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions\/131"}],"wp:attachment":[{"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.manuel-then.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}