<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=7820&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [HowTo] Use slimlock with xfce]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=7820</link>
		<description><![CDATA[The most recent posts in [HowTo] Use slimlock with xfce.]]></description>
		<lastBuildDate>Thu, 19 Feb 2026 18:10:02 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[[HowTo] Use slimlock with xfce]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=62303#p62303</link>
			<description><![CDATA[<p><span class="bbc">slimlock</span> is included with the <em>slim</em> login manager. If you already have <em>slim</em> installed, there is no need to get another screenlocker utility. However, <em>slimlock</em> has one major difference to all other screenlockers: When called, it does not return with a success code until <em>after</em> the screen is unlocked. Other screenlockers return immediately and keep the screen locked.</p><p>If <span class="bbc">slimlock</span> is set as the lock command in <em>xfce4</em>, it will not work correctly with sleep security. (Xfce Settings → Power Manager → System → Lock screen when system is going to sleep) Since <em>xfce4</em> waits for the screenlocker to return before putting the system to sleep, the user sees the lock screen but the system will not sleep. Once the user unlocks the screen, <em>then</em> the system will go to sleep. Obviously this is not what the user wants.</p><p>Here&#039;s how to fix it.</p><p>Create the file <span class="bbc">/usr/local/bin/aslimlock.sh</span> with these contents:</p><div class="codebox"><pre><code>#!/bin/sh
/usr/bin/slimlock &amp;
sleep 1
pgrep --parent ${$} --full --exact &quot;/usr/bin/slimlock&quot;</code></pre></div><p>This script runs <span class="bbc">slimlock</span> asynchronously, ensures that it is still running after one second, and returns a success or error code depending on the status.</p><p>Ensure this script is given execute permissions.</p><p>Now set <span class="bbc">aslimlock.sh</span> as <em>xfce4</em>&#039;s lock command. </p><p>You can use the GUI: Navigate to Xfce Settings → Settings Editor → Channel: xfce4-session → Property: LockCommand; and enter <span class="bbc">/usr/local/bin/aslimlock.sh</span> in the Value field.</p><p>Alternatively, you can use the command line:<br /><span class="bbc">xfconf-query --channel &#039;xfce4-session&#039; --property &#039;/general/LockCommand&#039; --set &#039;/usr/local/bin/aslimlock.sh&#039;</span></p><p>The system will now correctly respond to a suspend request. The screen will lock and the system will enter sleep mode. On wake, the screen will be locked and awaiting a password.</p>]]></description>
			<author><![CDATA[dummy@example.com (Mercury)]]></author>
			<pubDate>Thu, 19 Feb 2026 18:10:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=62303#p62303</guid>
		</item>
	</channel>
</rss>
