<?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; Software</title>
	<atom:link href="http://fabianmoser.at/kategorie/technik/software/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>Umlaute von Zotero nach BibTeX exportieren</title>
		<link>http://fabianmoser.at/blog/2011/09/20/umlaute-von-zotero-in-bibtex-exportieren/</link>
		<comments>http://fabianmoser.at/blog/2011/09/20/umlaute-von-zotero-in-bibtex-exportieren/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 08:41:48 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Arbeit]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[BibTeX]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Umlaut]]></category>
		<category><![CDATA[UTF-8]]></category>
		<category><![CDATA[Zotero]]></category>

		<guid isPermaLink="false">http://fabianmoser.at/?p=1128</guid>
		<description><![CDATA[Mag sein, dass dieser Artikel eine beinahe inexistente (Wissens-) Lücke füllt. Für all jene, denen weder BibTeX noch Zotero etwas sagt, ist er mit Sicherheit nicht lesenswert, aber allein die Möglichkeit, dass ich selbst nochmal auf das geschilderte Problem treffe, &#8230; <a href="http://fabianmoser.at/blog/2011/09/20/umlaute-von-zotero-in-bibtex-exportieren/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Mag sein, dass dieser Artikel eine beinahe inexistente (Wissens-) Lücke füllt. Für all jene, denen weder BibTeX noch Zotero etwas sagt, ist er mit Sicherheit nicht lesenswert, aber allein die Möglichkeit, dass ich selbst nochmal auf das geschilderte Problem treffe, rechtfertigt ihn dennoch.</p>
<p>Das Problem von dem ich spreche ist der Dateiexport von <a href="http://www.zotero.org/" target="_blank">Zotero</a>, einem Programm das ich zur Verwaltung meiner Bibliographie verwende, nach <a href="http://de.wikipedia.org/wiki/BibTeX" target="_blank">BibTeX</a>, dem Dateiformat das ich zur automatischen Erstellung der Referenzen und des Quellenverzeichnisses in meiner Dissertation verwende. Wenn nun im Titel von verwendeten Quellen oder in Namen von deren Autoren deutsche Umlaute oder diakritische Zeichen (wie z.B. französische Akzente) vorkommen, werden diese in der exportierten Datei unverändert wiedergegeben, weil Zotero die ausgegebene Datei per Vorgabe als UTF-8 kodiert. Diese Kodierung wird aber von BibTeX nicht richtig verarbeitet.</p>
<p>Für diese Problem gibt es zwei Lösungswege, wobei ich leider viel Zeit mit dem ersten verloren habe:</p>
<ol>
<li>Man kann versuchen, BibTeX zur richtigen Verarbeitung der UTF-8 Datei zu bringen, bzw. einen dementsprechenden Ersatz für BibTeX einzusetzen. Diesbezüglich gibt es jede Menge Diskussionen im Internet, die die Hoffnung (leider) nicht schnell genug sterben lassen. Der Vollständigkeit halber sei hier beispielhaft auf <a href="http://ctan.org/tex-archive/biblio/bibtex/8-bit" target="_blank"><code>bibtex8</code></a> verwiesen.</li>
<li>Viel einfacher ist es jedoch, Zotero dazu zu bringen, die kritischen Zeichen entsprechend der LaTeX Syntax auszugeben. Das schafft man aber nicht, indem man selbst die Einträge entsprechend ändert, sondern indem man die Dateikodierung für den Export ändert.<br />
<em><br />
Dazu muss man lediglich in den Einstellungen von Zotero in der Kategorie Export ein Häkchen bei &#8220;Option für Zeichenkodierung beim Export anzeigen&#8221; setzen. Beim nächsten BibTeX Export ist dann einfach &#8220;Westlich (ISO-8859-1)&#8221; aus der Liste auszuwählen und schon erstellt Zotero eine problemlos verwendbare BibTeX Datei.</em></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2011/09/20/umlaute-von-zotero-in-bibtex-exportieren/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nur &#8220;echte&#8221; Benutzerkonten anzeigen</title>
		<link>http://fabianmoser.at/blog/2011/07/07/nur-echte-benutzerkonten-anzeigen/</link>
		<comments>http://fabianmoser.at/blog/2011/07/07/nur-echte-benutzerkonten-anzeigen/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 07:38:17 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[GDM]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://fabianmoser.at/?p=1098</guid>
		<description><![CDATA[Um am Login Bildschirm von Fedora nur jene Konten anzuzeigen, die sich in letzter Zeit eingeloggt haben, muss man nur eine kleine Änderung an der /etc/gdm/custom.conf Datei vornehmen: --- old/custom.conf 2011-07-07 09:35:01.462829111 +0200 +++ new/custom.conf 2011-07-07 09:30:27.146258540 +0200 @@ -7,6 &#8230; <a href="http://fabianmoser.at/blog/2011/07/07/nur-echte-benutzerkonten-anzeigen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Um am Login Bildschirm von Fedora nur jene Konten anzuzeigen, die sich in letzter Zeit eingeloggt haben, muss man nur eine kleine Änderung an der <code>/etc/gdm/custom.conf</code> Datei vornehmen:</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;"><span style="color: #888822;">--- old/custom.conf	2011-07-07 09:35:01.462829111 +0200</span>
<span style="color: #888822;">+++ new/custom.conf	2011-07-07 09:30:27.146258540 +0200</span>
<span style="color: #440088;">@@ -7,6 +7,7 @@</span>
 <span style="">&#91;</span>xdmcp<span style="">&#93;</span>
&nbsp;
 <span style="">&#91;</span>greeter<span style="">&#93;</span>
<span style="color: #00b000;">+IncludeAll=false</span>
&nbsp;
 <span style="">&#91;</span>chooser<span style="">&#93;</span></pre></div></div>

<p>Damit werden nicht oder zB nur per <code>scp</code> genutzte Benutzernamen ausgeblendet.</p>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2011/07/07/nur-echte-benutzerkonten-anzeigen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora 15 on NVIDIA NVS 3100M</title>
		<link>http://fabianmoser.at/blog/2011/07/04/fedora-15-on-nvidia-nvs-3100m/</link>
		<comments>http://fabianmoser.at/blog/2011/07/04/fedora-15-on-nvidia-nvs-3100m/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 09:11:16 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[HP 8440p]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NVIDIA]]></category>

		<guid isPermaLink="false">http://fabianmoser.at/?p=1023</guid>
		<description><![CDATA[In an earlier post, I already wrote about how to install the proprietary video driver on Fedora. In a brief update I suggested to change the acpi_sleep kernel option to accomplish proper display wake-up from standby. Unfortunately, that solution doesn&#8217;t &#8230; <a href="http://fabianmoser.at/blog/2011/07/04/fedora-15-on-nvidia-nvs-3100m/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In an <a title="Fedora 14 on HP 8440p" href="http://fabianmoser.at/blog/2010/11/03/fedora-14-on-hp-8440p/">earlier post</a>, I already wrote about how to install the proprietary video driver on Fedora. In a brief update I suggested to change the <code>acpi_sleep</code> kernel option to accomplish proper display wake-up from standby. Unfortunately, that solution doesn&#8217;t work reliably in my experience. Today I found a solution that seems to successfully work around the problem of the black screen by waking up the screen &#8220;manually&#8221;.</p>
<p><a href="http://www.nvnews.net/vbulletin/showthread.php?t=156382" target="_blank">Gernot Walzl wrote a &#8220;nasty workaround&#8221;</a> (quoting himself) in the form of the following script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># nvidia_dpms_fix.sh</span>
<span style="color: #666666; font-style: italic;"># 2011-06-12</span>
<span style="color: #666666; font-style: italic;"># by Gernot WALZL</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># nasty workaround for nvidia drivers to resume from dpms off/suspend</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">DISPLAY</span>=:<span style="color: #000000;">0</span>
&nbsp;
getXauthority <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">XAUTHORITY</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-C</span> X <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DISPLAY</span>&quot;</span> \
    <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">'s/.* -auth \([^ ]*\).*/\1/p'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
handle_line <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;(EE) NVIDIA.* DisplayPort link training failed&quot;</span> \
      <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null; <span style="color: #000000; font-weight: bold;">then</span>
    getXauthority
    <span style="color: #c20cb9; font-weight: bold;">xset</span> dpms force on
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">--follow</span>=name <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>Xorg.0.log <span style="color: #660033;">--retry</span> <span style="color: #660033;">--lines</span>=<span style="color: #000000;">1</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null \
  <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> line; <span style="color: #000000; font-weight: bold;">do</span>
    handle_line <span style="color: #ff0000;">&quot;<span style="color: #007800;">$line</span>&quot;</span>
  <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>To actually make this do its job, I copied it into <code>/usr/local/bin</code>, made it executable and created an autostart entry for GNOME 3 by saving the following lines under <code>~/.config/autostart/nvidia_dpms_fix.sh.desktop</code></p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">[Desktop Entry]
Type=Application
Exec=/usr/local/bin/nvidia_dpms_fix.sh
Hidden=false
X-GNOME-Autostart-enabled=true
Name=NVidia DPMS fix
Comment=Wakes up the display properly</pre></div></div>

<p>I believe the problem that is being worked around is indicated by a line in the <code>Xorg.0.log</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">(WW) NVIDIA(GPU-0): AUO (DFP-3): Failed to set DisplayPort power state</pre></div></div>

<p>Although I could only test this on my machine (HP EliteBook 8440p), with some luck this works for all cases where a similar log message is found.</p>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2011/07/04/fedora-15-on-nvidia-nvs-3100m/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Go C10k</title>
		<link>http://fabianmoser.at/blog/2011/05/22/go-c10k/</link>
		<comments>http://fabianmoser.at/blog/2011/05/22/go-c10k/#comments</comments>
		<pubDate>Sun, 22 May 2011 11:22:52 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Programmieren]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[App Engine]]></category>
		<category><![CDATA[Comet]]></category>
		<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Golang]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://fabianmoser.at/?p=956</guid>
		<description><![CDATA[Inspired by (admittedly &#8220;ancient&#8221;) part 1 of a very instructive post series by Richard Jones and while waiting for Channels API support in Google&#8217;s new Go App Engine, I decided to make a quick port of Richard&#8217;s mochiconntest_web Erlang module &#8230; <a href="http://fabianmoser.at/blog/2011/05/22/go-c10k/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Inspired by (admittedly &#8220;ancient&#8221;) <a href="http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1">part 1 of a very instructive post series by Richard Jones</a> and while <a href="http://groups.google.com/group/google-appengine-go/browse_thread/thread/dee6bf17eaf9d322/340d8c0a1c419097?lnk=gst&amp;q=channels&amp;fwc=1">waiting for Channels API support</a> in <a href="http://code.google.com/intl/de-DE/appengine/docs/go/overview.html">Google&#8217;s new Go App Engine</a>, I decided to make a quick port of Richard&#8217;s <code>mochiconntest_web</code> Erlang module to Go.</p>
<p>Source first, discussion later:</p>

<div class="wp_syntax"><div class="code"><pre class="golang" style="font-family:monospace;">package main
&nbsp;
import (
	&amp;quot;fmt&amp;quot;
	&amp;quot;http&amp;quot;
	&amp;quot;log&amp;quot;
	&amp;quot;time&amp;quot;
)
&nbsp;
func main() {
	http.HandleFunc(&amp;quot;/test/&amp;quot;, feed)
	if err := http.ListenAndServe(&amp;quot;127.0.0.1:8080&amp;quot;, nil); err != nil {
		log.Fatal(err)
	}
}
&nbsp;
func feed(w http.ResponseWriter, r *http.Request) {
	ch := time.Tick(1000000000)
	fmt.Fprintf(w, &amp;quot;Goconntest welcomes you! Your Id: %s\n&amp;quot;, r.URL.String())
	w.(http.Flusher).Flush()
	for N := 1; ; N++ {
		&amp;lt;-ch
		n, err := fmt.Fprintf(w, &amp;quot;Chunk %d for id %s\n&amp;quot;, N, r.URL.String())
		if err != nil {
			log.Print(err)
			break
		} else if n == 0 {
			log.Print(&amp;quot;Nothing written&amp;quot;)
			break
		}
		w.(http.Flusher).Flush()
	}
}</pre></div></div>

<p>Of course this could be stripped down by ignoring (i.e. not handling) errors, but IMHO this doesn&#8217;t fall behind the Erlang implementation in terms of beauty; well, my sense of &#8220;beauty&#8221; anyway.</p>
<p>You might have noted, that I&#8217;m not using the <code>time.Sleep</code> function, but instead a seemingly &#8220;artificial&#8221; construct with a <code>time.Ticker</code> channel. This internally allows for a multiplexing of the Goroutines spawned by the <code>http</code> module to only a few system threads, scheduling the network operations via <code>epoll</code>.</p>
<p><strong>Update 2011-05-23</strong>: Removed usage of ChunkedWriter from Go source according to a <a href="http://groups.google.com/group/google-appengine-go/t/f3ba11897b368653">hint from Brad Fitzpatrick</a>.</p>
<p><strong>Update 2011-05-25</strong>: The flushing by <code>w.(http.Flusher).Flush()</code> is necessary to make sure that the chunks get written in-time. Thanks to Brad Fitzpatrick for pointing this out.</p>
<p>For the client side, I used Richard&#8217;s <code>floodtest.erl</code> module, only removing the <code>{version, 1.1}</code> line from the <code>http:request</code>, because that option doesn&#8217;t seem to be supported by Erlang R14B.</p>
<p>The result from my <code>Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz</code>:<br />
<a href="http://fabianmoser.at/wp-content/blogs.dir/1/files/2011/05/goconntest-e1306061379106.png"><img class="alignleft size-large wp-image-966 colorbox-956" title="goconntest" src="http://fabianmoser.at/wp-content/blogs.dir/1/files/2011/05/goconntest-e1306061379106-1024x625.png" alt="" width="640" height="390" /></a></p>
<p>The RSS usage of <code>goconntest_web</code> converges at 321MB i.e. roughly 32KB per connection (13KB less than the ad-hoc Erlang implementation). Also note, that Go indeed spawned only 4 threads on this quad-core machine to handle the 10k open connections.</p>
<p>The only disappointment was the rather high CPU usage. Although I&#8217;m aware that the screen-shot is far from any acceptable benchmark measure, still 1.5h CPU time seems to be more than &#8220;practically nothing&#8221; Richard reported for the Erlang implementation.</p>
<p><strong>Update 2011-05-25</strong>: While testing the new code above, I logged the process statistics with <code>pidstat</code> and then made the following plot (<a href="http://fabianmoser.at/wp-content/blogs.dir/1/files/2011/05/goconntest_web_plotstats.py">Python script</a>, <a href="http://fabianmoser.at/wp-content/blogs.dir/1/files/2011/05/goconntest_web_stats.log_.gz">data file</a>):<br />
<a href="http://fabianmoser.at/wp-content/blogs.dir/1/files/2011/05/goconntest_web-pidstat-small.png"><img class="colorbox-manual" title="goconntest_web-pidstat-small" src="http://fabianmoser.at/wp-content/blogs.dir/1/files/2011/05/goconntest_web-pidstat-small.png" alt="" width="600" height="450" /></a><br />
Mind the logarithmic time scale! The dashed line indicates the ramp-up of opened connections to 10k (theoretical, not measured). The colorful background is a stacked plot of the per-thread CPU usage with one color per kernel thread-id. Obviously Go spawns more threads than there are cores. Finally, the thick black line is the resident memory usage, which seems to converge much later than the CPU usage.</p>
<p>Thanks for reading. Maybe, if the App Engine Channels API takes long enough, I will continue my investigations.</p>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2011/05/22/go-c10k/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>Eclipse CDT crash</title>
		<link>http://fabianmoser.at/blog/2011/04/25/eclipse-cdt-crash/</link>
		<comments>http://fabianmoser.at/blog/2011/04/25/eclipse-cdt-crash/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 20:28:00 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Programmieren]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[CDT]]></category>
		<category><![CDATA[Crash]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[HOWTO]]></category>

		<guid isPermaLink="false">http://fabianmoser.at/?p=927</guid>
		<description><![CDATA[If you&#8217;re using the Eclipse CDT for C++ development and experience crashes immediately after loading the workspace (during indexing) on Linux (I saw it on Fedora and openSUSE), you should use the workaround suggested in the corresponding Bugzilla entry. Essentially &#8230; <a href="http://fabianmoser.at/blog/2011/04/25/eclipse-cdt-crash/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using the Eclipse CDT for C++ development and experience crashes immediately after loading the workspace (during indexing) on Linux (I saw it on Fedora and openSUSE), you should use the workaround suggested in the <a href="https://bugzilla.redhat.com/show_bug.cgi?id=647737#c31" target="_blank">corresponding Bugzilla entry</a>. Essentially you have to add the line</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">-XX:-UseCompressedOops</pre></div></div>

<p> to your <code>eclipse.ini</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2011/04/25/eclipse-cdt-crash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora Live USB with GRUB</title>
		<link>http://fabianmoser.at/blog/2011/02/25/fedora-live-usb-with-grub/</link>
		<comments>http://fabianmoser.at/blog/2011/02/25/fedora-live-usb-with-grub/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 09:59:25 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[GRUB]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://www.fabianmoser.at/?p=870</guid>
		<description><![CDATA[As already mentioned in my last post, my laptop won&#8217;t boot from a USB stick prepared using a binary copy of an ISO (by means of dd). Here is the method I use to boot the Fedora Live images off &#8230; <a href="http://fabianmoser.at/blog/2011/02/25/fedora-live-usb-with-grub/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As already mentioned in my <a href="http://www.fabianmoser.at/blog/2011/02/24/fedora-15-live-usb-for-hp-8440p/">last post</a>, my laptop won&#8217;t boot from a USB stick prepared using a binary copy of an ISO (by means of <code>dd</code>). Here is the method I use to boot the Fedora Live images off my USB stick using GNU GRUB2. The device node of the USB driver is denoted <code>/dev/sdX</code> in the following and must be replaced with the actual device node (e.g. <code>/dev/sdc</code>).</p>
<ol>
<li>Prepare a partition on the USB stick and/or make sure there is enough space on it (it must be slightly larger than the ISO image).</li>
<li>Make sure it is flagged bootable. ( <code>fdisk -l /dev/sdX</code> is your friend)</li>
<li>Remember the name of the USB partition you&#8217;re going to use or if unlabelled, label it.</li>
<li>Loop-mount the ISO image using something like <code>mount -o loop /path/to/iso /mnt/loop</code></li>
<li>Copy the content of the ISO over to the USB</li>
<li>Install GRUB on the USB by issuing <code>grub-install --no-floppy --root-directory=/mnt/usb /dev/sdX</code></li>
<li>Create a <code>/mnt/usb/boot/grub/grub.cfg</code> with the following content

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">menuentry &quot;Fedora Live&quot; {
 linux /isolinux/vmlinuz0 root=live:LABEL=XYZ rootfstype=auto ro liveimg quiet  rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM
 initrd /isolinux/initrd0.img
}
&nbsp;
menuentry &quot;Fedora Live (Basic Video)&quot; {
 linux /isolinux/vmlinuz0 root=live:LABEL=XYZ rootfstype=auto ro liveimg quiet  rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM xdriver=vesa nomodeset
 initrd /isolinux/initrd0.img
}</pre></div></div>

<p>where <code>XYZ</code> must be replaced by the actual partition name of your USB partition.</li>
<li>Unmount and boot</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2011/02/25/fedora-live-usb-with-grub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora 15 Live USB for HP 8440p</title>
		<link>http://fabianmoser.at/blog/2011/02/24/fedora-15-live-usb-for-hp-8440p/</link>
		<comments>http://fabianmoser.at/blog/2011/02/24/fedora-15-live-usb-for-hp-8440p/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 09:28:01 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://www.fabianmoser.at/?p=864</guid>
		<description><![CDATA[Unfortunately, none of the &#8220;common methods&#8221; for creating a Live USB workes such that my HP EliteBook 8400p would boot them. The procedure described by Jordon Mears came closest. The only technical difference is, that for some obscure reason, the &#8230; <a href="http://fabianmoser.at/blog/2011/02/24/fedora-15-live-usb-for-hp-8440p/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Unfortunately, none of the &#8220;common methods&#8221; for creating a Live USB workes such that my HP EliteBook 8400p would boot them. The procedure described by <a href="http://www.finefrog.com/2009/07/11/putting-a-fedora-livecd-onto-a-usb-stick-from-ubuntu/">Jordon Mears</a> came closest. The only technical difference is, that for some obscure reason, the machine won&#8217;t boot from anything else than FAT when it comes to USB sticks.</p>
<p>Here are the slightly modified steps:</p>
<ol>
<li>Download the ISO image</li>
<li>Unmount USB</li>
<li>Delete partitions on the USB</li>
<li>Create one primary partition of type 0x0c (Win 95 FAT LBA) of size ??.</li>
<li>Make it bootable</li>
<li>Use <code>mkfs.vfat -n USB /dev/sdX1</code> to create the filesystem</li>
<li>Make sure syslinux, and isomd5sum are installed</li>
<li>Use <code>livecd-iso-to-disk --overlay-size-mb 512 /path/to/iso /dev/sdX1</code></li>
<li>Sync</li>
</ol>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2011/02/24/fedora-15-live-usb-for-hp-8440p/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fedora 14 and SSH port forwarding</title>
		<link>http://fabianmoser.at/blog/2010/11/11/fedora-14-and-ssh-port-forwarding/</link>
		<comments>http://fabianmoser.at/blog/2010/11/11/fedora-14-and-ssh-port-forwarding/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 08:30:26 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.fabianmoser.at/?p=848</guid>
		<description><![CDATA[Yesterday I upgraded also my workstation to Fedora 14 and soon ran into a rather unexpected problem that I couldn&#8217;t resolve due to an overwhelming amount of misleading reports and discussions on the web a.k.a. &#8220;noise&#8221;. The use-case was, that &#8230; <a href="http://fabianmoser.at/blog/2010/11/11/fedora-14-and-ssh-port-forwarding/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I upgraded also my workstation to Fedora 14 and soon ran into a rather unexpected problem that I couldn&#8217;t resolve due to an overwhelming amount of misleading reports and discussions on the web a.k.a. &#8220;noise&#8221;. The use-case was, that I tunnel from home to my workstation via SSH on a regular basis and for different purposes. After yesterdays upgrade I double-checked that all firewall settings are OK to permit the connection before I went home. Initialising the tunnel later that evening went without a problem, but using it issued a weird error:</p>

<div class="wp_syntax"><div class="code"><pre class="email" style="font-family:monospace;">channel 2: open failed: administratively prohibited: open failed</pre></div></div>

<p>A search on the web yielded all kinds of results, mostly referring to settings in the SSH daemon. All solutions either mentioned <code>AllowTcpForwarding</code>, which is anyway <code>yes</code> by default, or <code>PermitTunnel</code>, which has nothing to do with port forwarding. As was to be expected, these hints didn&#8217;t help in my case.</p>
<p>Desperate to find more useful keyword for a search, I ran <code>ssh</code> in verbose mode (with <code>-vvv</code>), which gave (global IP addresses are replaced by <code>X.X.X.X</code>):</p>

<div class="wp_syntax"><div class="code"><pre class="email" style="font-family:monospace;">debug1: Connection to port 11080 forwarding to socks port 0 requested.
debug2: fd 8 setting TCP_NODELAY
debug2: fd 8 setting O_NONBLOCK
debug3: fd 8 is O_NONBLOCK
debug1: channel 2: new [dynamic-tcpip]
debug2: channel 2: pre_dynamic: have 0
debug2: channel 2: pre_dynamic: have 3
debug2: channel 2: decode socks5
debug2: channel 2: socks5 auth done
debug2: channel 2: pre_dynamic: need more
debug2: channel 2: pre_dynamic: have 0
debug2: channel 2: pre_dynamic: have 10
debug2: channel 2: decode socks5
debug2: channel 2: socks5 post auth
debug2: channel 2: dynamic request: socks5 host X.X.X.X port 80 command 1
channel 2: open failed: administratively prohibited: open failed
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 11080 for X.X.X.X port 80, connect from 127.0.0.1 port 59418, nchannels 3
debug3: channel 2: status: The following connections are open:
  #1 client-session (t4 r0 i0/0 o0/0 fd 5/6 cc -1)
&nbsp;
debug3: channel 2: close_fds r 8 w 8 e -1</pre></div></div>

<p>No luck either.</p>
<p>Finally, I had the idea that SELinux could interfere here without giving the SSH daemon the possibility of a helpful error message. When I logged into my workstation this morning, the SELinux warning gave the appropriate solution in the form of a command (to be issued by <code>root</code>):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ setsebool <span style="color: #660033;">-P</span> sshd_forward_ports <span style="color: #000000;">1</span></pre></div></div>

<p>This fixed the problem and everything now works as before. \me = happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2010/11/11/fedora-14-and-ssh-port-forwarding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HP Ambient Light Sensor on Linux</title>
		<link>http://fabianmoser.at/blog/2010/10/27/hp-ambient-light-sensor-on-linux/</link>
		<comments>http://fabianmoser.at/blog/2010/10/27/hp-ambient-light-sensor-on-linux/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 10:06:08 +0000</pubDate>
		<dc:creator>Fabian Moser</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ambient Light Sensor]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[HP 8440p]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.fabianmoser.at/?p=824</guid>
		<description><![CDATA[Often, the simple answers are those you don&#8217;t find on the web. Here is one of them with hopefully enough keywords to make it findable: To activate the Ambient Light Sensor on my new HP EliteBook 8440p (article and pictures &#8230; <a href="http://fabianmoser.at/blog/2010/10/27/hp-ambient-light-sensor-on-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Often, the simple answers are those you don&#8217;t find on the web. Here is one of them with hopefully enough keywords to make it findable:<br />
To activate the Ambient Light Sensor on my new HP EliteBook 8440p (article and pictures will follow later) running Fedora 13, the following command (issued by root obviously) did the trick:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>platform<span style="color: #000000; font-weight: bold;">/</span>hp-wmi<span style="color: #000000; font-weight: bold;">/</span>als</pre></div></div>

<p>Also don&#8217;t forget to check if the ALS is enabled in the BIOS if this doesn&#8217;t work. It seems to be enabled by default though.</p>
]]></content:encoded>
			<wfw:commentRss>http://fabianmoser.at/blog/2010/10/27/hp-ambient-light-sensor-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

