<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Fabian Moser &#187; KDE</title>
	<atom:link href="http://fabianmoser.at/schlagwort/kde/feed/" rel="self" type="application/rss+xml" />
	<link>http://fabianmoser.at</link>
	<description>&#34;as simple as possible, but not simpler&#34;</description>
	<lastBuildDate>Thu, 26 Jan 2012 13:19:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/at/</creativeCommons:license>		<item>
		<title>xsession-errors</title>
		<link>http://fabianmoser.at/blog/2011/05/03/xsession-errors/</link>
		<comments>http://fabianmoser.at/blog/2011/05/03/xsession-errors/#comments</comments>
		<pubDate>Tue, 03 May 2011 07:34:11 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[KDM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[SSD]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://fabianmoser.at/?p=931</guid>
		<description><![CDATA[Ever since I upgraded my notebook with a SSD, I was looking for a way to minimise or avoid unnecessary write accesses. The tools of choice (on Linux at least) are iostat for a rough summary and pidstat for the &#8230; <a href="http://fabianmoser.at/blog/2011/05/03/xsession-errors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever since I upgraded my notebook with a SSD, I was looking for a way to minimise or avoid unnecessary write accesses. The tools of choice (on Linux at least) are <code>iostat</code> for a rough summary and <code>pidstat</code> for the details. With the help of those two one can easily figure out which processes are responsible for write accesses.</p>
<p>Once a writing process is identified, <code>lsof</code> can tell you which files are actually written. Depending on what you want to achieve, you can then continue to relocate that file to a different disk (e.g. if you have two disks and want one of them to sleep most of the time) or to memory (using tmpfs). The latter obviously means that the written data will be lost at the next reboot, but sometimes this is perfectly fine e.g. for the files inside <code>/tmp</code>. Therefore, it is generally a good idea to move that directory into volatile memory following <a href="http://en.opensuse.org/SDB:SSD_performance#create_TMPFS_filesystems">the instructions on the openSUSE Wiki</a>.</p>
<p>All good and well if you actually manage to relocate or move a file. Often file locations are a matter of configuration and otherwise you can help yourself with dynamic links. But there was one very special file on my openSUSE 11.4 installation that withstood all my assaults for quiet some time. I&#8217;m speaking of a beast called <code>.xsession-errors</code> residing in your <code>$HOME</code> directory. Created by KDM, one would expect to be able to configure the location of that file. Indeed, there is a <a href="http://docs.kde.org/stable/en/kdebase-workspace/kdm/kdm-files.html#option-clientlogfile">configuration option called <code>ClientLogFile</code></a> specifically for that purpose. Unfortunately this is only the first and easier of two necessary steps:</p>
<ol>
<li>As <code>root</code> open your <code>/usr/share/kde4/config/kdm/kdmrc</code>, go to a section labelled <code>[X-:0-Core]</code> (there may be multiple of those, but don&#8217;t worry and just pick the last one) and add the following line:

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000099;">ClientLogFile</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">../../tmp/xsession-errors-%u</span></pre></div></div>

<p>This will move the file into the <code>/tmp</code> directory. Mind the path relative to <code>$HOME</code>.</li>
<li>Now the hidden piece: again as <code>root</code> open your <code>/etc/X11/xdm/Xsession</code> and make the following changes (I deliberately use the <code>patch</code> syntax here i.e. remove lines with a minus sign and add those with a plus sign):

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;"><span style="color: #888822;">--- Xsession.old        2011-05-01 19:46:40.000000000 +0200</span>
<span style="color: #888822;">+++ Xsession    2011-05-02 22:18:39.000000000 +0200</span>
<span style="color: #440088;">@@ -123,8 +123,8 @@</span>
     # GDM seems to handle this its self
     test -z &quot;$GDMSESSION&quot; || break
&nbsp;
<span style="color: #991111;">-    # Once if KDM does handle this its self</span>
<span style="color: #991111;">-    #test -z &quot;$KDMSESSION&quot; || break</span>
<span style="color: #00b000;">+    # KDM handles this itself</span>
<span style="color: #00b000;">+    test -z &quot;$KDE_SESSION_VERSION&quot; || break</span>
&nbsp;
     # Avoid bad symbolic links
     case &quot;$errfile&quot; in</pre></div></div>

</li>
</ol>
<p>Done; logout, restart KDM, re-login and check if the <code>xsession-errors*</code> exists at the new location. If so, remove your old one and cheer to a long living SSD. Only, of course, if the new location is not on your SSD, but e.g. in memory. It doesn&#8217;t hurt to re-check with <code>pidstat</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2011/05/03/xsession-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling the suspend hotkey in KDE4</title>
		<link>http://fabianmoser.at/blog/2010/02/28/enabling-the-suspend-hotkey-in-kde4-2/</link>
		<comments>http://fabianmoser.at/blog/2010/02/28/enabling-the-suspend-hotkey-in-kde4-2/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 09:17:20 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Konfiguration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Thinkpad]]></category>

		<guid isPermaLink="false">http://fabianmoser.at/?p=576</guid>
		<description><![CDATA[There are several reports of problems with the suspend hotkey on KDE4 [1] [2]. And there is even a bug report on that issue. Naturally, I wouldn&#8217;t write about this if I hadn&#8217;t experienced the same problem myself. I solved &#8230; <a href="http://fabianmoser.at/blog/2010/02/28/enabling-the-suspend-hotkey-in-kde4-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are several reports of problems with the suspend hotkey on KDE4 <a title="Sleep Button in KDE 4 Workaround - Helpful Linux Tidbits" href="http://linuxtidbits.wordpress.com/2009/11/12/sleep-button-in-kde-4-workaround/">[1]</a> <a title="When PowerDevil does not recognize the suspend button in KDE 4.2" href="http://linuxbasement.com/content/when-powerdevil-does-not-recognize-suspend-button-kde-42">[2]</a>. And there is even a <a title="KDE Bug Tracking System" href="https://bugs.kde.org/show_bug.cgi?id=181444">bug report</a> on that issue. Naturally, I wouldn&#8217;t write about this if I hadn&#8217;t experienced the same problem myself. I solved it by slightly modifiying the approach described at <a href="http://linuxbasement.com/content/when-powerdevil-does-not-recognize-suspend-button-kde-42">Linux Basement</a>, avoiding the need to create a dedicated shell script somewhere.</p>
<p>This might not have been possible in KDE 4.2 (I haven&#8217;t verified), but it is in KDE SC 4.4. The Input Actions dialog (under System Settings) allows for the configuration of DBus calls from hotkeys. This was configured fast and works painless. I have exported the hotkey group and pasted the content below. To use it, save this as <code>PowerManagement.khotkeys</code> and import it in the Input Actions dialog.</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data<span style="">&#93;</span></span>
<span style="color: #000099;">DataCount</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data_1<span style="">&#93;</span></span>
<span style="color: #000099;">Comment</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">Power management mappings of XF86 events</span>
<span style="color: #000099;">DataCount</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1</span>
<span style="color: #000099;">Enabled</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">true</span>
<span style="color: #000099;">Name</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">Power Management</span>
<span style="color: #000099;">SystemGroup</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">0</span>
<span style="color: #000099;">Type</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">ACTION_DATA_GROUP</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data_1Conditions<span style="">&#93;</span></span>
<span style="color: #000099;">Comment</span><span style="color: #000066; font-weight:bold;">=</span>
<span style="color: #000099;">ConditionsCount</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">0</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data_1_1<span style="">&#93;</span></span>
<span style="color: #000099;">Comment</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">Enables suspend hotkey</span>
<span style="color: #000099;">Enabled</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">true</span>
<span style="color: #000099;">Name</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">Suspend</span>
<span style="color: #000099;">Type</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">SIMPLE_ACTION_DATA</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data_1_1Actions<span style="">&#93;</span></span>
<span style="color: #000099;">ActionsCount</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data_1_1Actions0<span style="">&#93;</span></span>
<span style="color: #000099;">Arguments</span><span style="color: #000066; font-weight:bold;">=</span>
<span style="color: #000099;">Call</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">org.freedesktop.PowerManagement.Suspend</span>
<span style="color: #000099;">RemoteApp</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">org.freedesktop.PowerManagement</span>
<span style="color: #000099;">RemoteObj</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/org/freedesktop/PowerManagement</span>
<span style="color: #000099;">Type</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">DBUS</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data_1_1Conditions<span style="">&#93;</span></span>
<span style="color: #000099;">Comment</span><span style="color: #000066; font-weight:bold;">=</span>
<span style="color: #000099;">ConditionsCount</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">0</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data_1_1Triggers<span style="">&#93;</span></span>
<span style="color: #000099;">Comment</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">Simple_action</span>
<span style="color: #000099;">TriggersCount</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">1</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Data_1_1Triggers0<span style="">&#93;</span></span>
<span style="color: #000099;">Key</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">Sleep</span>
<span style="color: #000099;">Type</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">SHORTCUT</span>
<span style="color: #000099;">Uuid</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"><span style="">&#123;</span>c1706a53-bde8-4364-b0af-71e9c1be6b3f<span style="">&#125;</span></span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Main<span style="">&#93;</span></span>
<span style="color: #000099;">AllowMerge</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">true</span>
<span style="color: #000099;">ImportId</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">Power Management</span>
<span style="color: #000099;">Version</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">2</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2010/02/28/enabling-the-suspend-hotkey-in-kde4-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

