<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tolaris.com &#187; dell</title>
	<atom:link href="http://www.tolaris.com/tag/dell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tolaris.com</link>
	<description>When the going gets tough, the tough sniff packets.</description>
	<lastBuildDate>Tue, 24 Jan 2012 17:47:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Enabling the Sleep button on a Dell laptop in Kubuntu Karmic</title>
		<link>http://www.tolaris.com/2009/11/10/enabling-the-sleep-button-on-a-dell-laptop-in-kubuntu-karmic/</link>
		<comments>http://www.tolaris.com/2009/11/10/enabling-the-sleep-button-on-a-dell-laptop-in-kubuntu-karmic/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 19:35:40 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=609</guid>
		<description><![CDATA[Update 2010-05-02: See this comment. I read an article in the Dec 2009 issue of Linux Magazine, one of several Linux-focused magazines we get at the office. I&#8217;d like to link directly to it, but it the magazine&#8217;s own website doesn&#8217;t offer the article or even a reliable permanent link to the issue number. Hint: [...]]]></description>
			<content:encoded><![CDATA[<p><em>Update 2010-05-02: See <a href="http://www.tolaris.com/2009/11/10/enabling-the-sleep-button-on-a-dell-laptop-in-kubuntu-karmic/comment-page-1/#comment-179">this comment</a>.</em></p>
<p>I read an article in the Dec 2009 issue of <a href="http://www.linux-magazine.com">Linux Magazine</a>, one of several Linux-focused magazines we get at the office.  I&#8217;d like to link directly to it, but it the magazine&#8217;s own website doesn&#8217;t offer the article or even a reliable permanent link to the issue number.  Hint: hey guys, sort that out.</p>
<p>The article was about configuring ACPI hotkeys to support your specific laptop.  IE, the buttons for &#8220;sleep&#8221;, &#8220;brightness up&#8221;, etc.  For most laptops this already works on Ubuntu.  On my Dell Vostro 1500, every button except for &#8220;sleep&#8221; worked right after install.  This is Linux, so there is always some way to fix that.</p>
<p><span id="more-609"></span>Unfortunately, ACPI cannot even detect my keypress.  The instructions in the article suggest starting acpid with -d for debug mode, which will print any keypresses that reach it.  Pressing Fn+F1, the sleep button, prints nothing.  So we&#8217;re going to use KDE&#8217;s hotkey support instead.  Gnome users can use a similar method; only the menu instructions differ.</p>
<p>First, create a script somewhere your user can run.  I have $HOME/bin in my $PATH, so I created a file there:</p>
<p><code>touch ~/bin/sleep-kde-screen<br />
chmod 755 ~/bin/sleep-kde-screen</code></p>
<p>Then I edited it to contain the following:</p>
<pre>#!/bin/sh
qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock
sudo /usr/sbin/pm-suspend</pre>
<p>This calls DBUS to lock the screensaver, then asks power-manager to suspend.  This way you will be prompted for your password when you resume from suspend.  If you prefer to hibernate, change &#8220;pm-suspend&#8221; to &#8220;pm-hibernate&#8221;.</p>
<p>Second, you need to tell sudo to allow your user to run this /usr/bin/pm-suspend without prompting for a password.  Run <code>sudo visudo</code> to edit /etc/sudoers, and add this line at the bottom:</p>
<pre>%admin ALL=NOPASSWD: /usr/sbin/pm-suspend</pre>
<p>Finally, add this script to your K menu with a hotkey.  Right-click on the K menu and select &#8220;Menu Editor&#8221;.  Add a new item to the &#8220;System&#8221; menu, give it a name (I like &#8220;Sleep!&#8221; *), and tell it to call sleep-kde-screen (wherever you&#8217;ve put it).  On the Advanced tab, select &#8220;Current shortcut key&#8221; and press the sleep button.  Now save and close the menu editor.</p>
<p><small>*  I imagine saying &#8220;Sleeeeeep!&#8221; like a hypnotist bad guy from an old movie on <a href="http://en.wikipedia.org/wiki/Mystery_Science_Theater_3000">MST3K</a>.</small></p>
<p>Press the sleep button, and you&#8217;ll suspend!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/11/10/enabling-the-sleep-button-on-a-dell-laptop-in-kubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

