<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>deKonvoluted</title>
	<atom:link href="http://karper.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://karper.wordpress.com</link>
	<description>simple doKumentation of things I learn</description>
	<lastBuildDate>Fri, 27 Jan 2012 10:45:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='karper.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>deKonvoluted</title>
		<link>http://karper.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://karper.wordpress.com/osd.xml" title="deKonvoluted" />
	<atom:link rel='hub' href='http://karper.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Manipulating the colors of a vobsub subtitle stream</title>
		<link>http://karper.wordpress.com/2011/01/22/manipulating-the-colors-of-a-vobsub-subtitle-stream/</link>
		<comments>http://karper.wordpress.com/2011/01/22/manipulating-the-colors-of-a-vobsub-subtitle-stream/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 12:43:45 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mkv]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[vlc]]></category>
		<category><![CDATA[vobsub]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/2011/01/22/manipulating-the-colors-of-a-vobsub-subtitle-stream/</guid>
		<description><![CDATA[... in which KarPer manages to get vobsub subtitles to look just right.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=196&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Problem Background</h2>
<p>I’d like to standardize the color palette of vobsub subtitles of all video files in my collection. Further, I’d like to have consistent colors between mplayer and vlc.</p>
<h2>Solution</h2>
<p>First, mplayer cannot play colored vobsub subtitles. This immediately narrows down our color palette to white text with a black outline/shadow.</p>
<p>A typical vobsub file pair would consist of an index file (subtitle.idx) and the vobsub file (subtitle.sub). The index file is a plain text file with a preamble section and a list of time stamps and matching subtitles indicating when the subtitles should be shown. It’s the preamble section we are interested in.</p>
<p>A typical preamble section might look like this:</p>
<pre>
# VobSub index file, v7 (do not modify this line!)
size: 720x480
# The original palette of the DVD
palette: 000000, 828282, 828282, 828282, 828282, 828282, 828282, ffffff, 828282, bababa, 828282, 828282, 828282, 828282, 828282, 828282
# Custom colors (transp idxs and the four colors)
custom colors: OFF, tridx: 1000, colors: 000000, bababa, 828282, 000000
</pre>
<p>The original DVD color palette is of no use to us. We can throw those lines out. The way to control the color of the subtitles on-screen is through the custom colors. Now, our preamble looks like this:</p>
<pre>
# VobSub index file, v7 (do not modify this line!)
size: 720x480
custom colors: OFF, tridx: 1000, colors: 000000, bababa, 828282, 000000
</pre>
<p>First, set the custom colors to ON to activate this line. There are four colors that you can prescribe for a vobsub subtitle stream. The first is the background color of the subtitle. The second is the color of the subtitle text. The third and fourth represent the inner, thick outline/shadow and outer, thin outline/shadow around the subtitle font respectively.</p>
<p>The tridx parameter allows one to set one of more of these fields to be transparent. Typically, the background to the subtitle font is set to be fully transparent(1). The rest are opaque(0). This is then followed by a set of four rgb colors for each of the aspects of the subtitle mentioned earlier. I’ve chosen to go with this:</p>
<pre>
custom colors: ON, tridx: 1000, colors: 000000, ffffff, 000000, 000000
</pre>
<p>In the above example, the background and outlines are set to be black (000000). The font color is set to be white (ffffff). The background is set to be fully transparent, but the font and its outlines are set to be opaque (tridx: 1000). This produces clear, legible subtitles that follow the same color scheme regardless of whether the file is played in mplayer or vlc.</p>
<p>Now, merge this back into the matroska file or select this file as the subtitle while playing your video file. Enjoy your nice looking subtitles!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=196&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2011/01/22/manipulating-the-colors-of-a-vobsub-subtitle-stream/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Manipulating tracks in matroska (mkv) files</title>
		<link>http://karper.wordpress.com/2011/01/11/manipulating-tracks-in-mkv-files/</link>
		<comments>http://karper.wordpress.com/2011/01/11/manipulating-tracks-in-mkv-files/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 16:40:25 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[matroska]]></category>
		<category><![CDATA[mkv]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/2011/01/11/manipulating-tracks-in-mkv-files/</guid>
		<description><![CDATA[...in which KarPer manages to split and rejoin a matroska file.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=174&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Problem Background</h2>
<p>Matroska files are a great format to build a video collection in. One of the most interesting aspects of the format is the ease of adding, removing, extracting or replacing streams (video, audio, subtitle) in the file. An example would be if you found a better subtitle file for one of the movies and would like it to replace the current one in the file. So, it’d be useful to be able to split a file into its individual tracks and reconstitute it back.</p>
<h2>Solution</h2>
<p>Use mkvinfo, mkvextract and mkvmerge. All are part of the mkvtoolnix package.</p>
<h3>Identification</h3>
<p>For this example, I have a matroska file called test.mkv. It consists of a video stream encoded using x264 at 29.97 fps. It contains one Japanese audio track and one english subtitle track in the vobsub format. I have recently come across a new subtitle track in the srt format that I’d like to use instead of the original subtitles.</p>
<p>Although I already know the make up of my mkv file, I’ll pretend I don’t. I’ll start by identifying the tracks in the matroska file.</p>
<pre>
MKVFILE=test.mkv
mkvinfo $MKVFILE | grep Track
</pre>
<p>Your output will look similar to this:</p>
<pre>
| + Track number: 1
| + Track UID: 631176983
| + Track type: video
| + Track number: 2
| + Track UID: 1164692611
| + Track type: audio
| + Track number: 3
| + Track UID: 1596684428
| + Track type: subtitles
</pre>
<p>This shows the makeup of the matroska file. It contains three tracks. The first is the video track, the second is the audio track and the third is the subtitle track.</p>
<h3>Extraction</h3>
<p>The tracks can be extracted one at a time or all at once. While extracting the video track, be sure to note down the the fps (frames per second) and the display dimension (which can be different from the actual dimensions of the video stream). To get the fps, use mkvinfo:</p>
<pre>
mkvinfo $MKVFILE | grep duration
</pre>
<p>This might produce an output similar to this:</p>
<pre>
| + Default duration: 33.367ms (29.970 fps for a video track)
| + Default duration: 32.000ms (31.250 fps for a video track)
</pre>
<p>Since the video track is the first track, the fps value to note is 29.970. Similarly, to get the display dimensions,</p>
<pre>
mkvinfo $MKVFILE | grep Display
</pre>
<p>And this might yield something like this:</p>
<pre>
| + Display width: 835
| + Display height: 480
</pre>
<p>Now, extract the tracks. I’ll extract all three tracks at once and dump them in appropriately named files:</p>
<pre>
mkvextract tracks $MKVFILE 1:video.264 2:audio.ac3 3:subtitle
</pre>
<p>This will create a raw video stream (video.264), a raw audio stream (audio.ac3) and a subtitle set with an index file (subtitle.idx) and a vobsub file (subtitle.sub). The subtitle files are useless to me.</p>
<h3>Reconstruction</h3>
<p>Now, I’ll reconstruct the video and audio streams along with my new subtitle file called newsubs.srt. To reconstitute this set back together, use the mkvmerge command like this:</p>
<pre>
TITLE="My Title"
AUDIOLANGUAGE=jpn
SUBLANGUAGE=eng
OUTFILE=output.mkv
mkvmerge --title "$TITLE" -o $OUTFILE --default-duration 0:29.970fps --display-dimensions 0:835x480 video.264 --language 0:$AUDIOLANGUAGE audio.ac3 --language 0:$SUBLANGUAGE newsubs.srt
</pre>
<p>The fps value can also be given in terms of fractions (29.970 = 30000/1001). Note that you need to specify a three-letter code to designate the language of the audio and subtitle stream. These language codes can be easily got from the mkvmerge command like this:</p>
<pre>
mkvmerge --list-languages
</pre>
<p>You can pipe this to a grep command to search for the language code for the specific language you’re using. For instance,</p>
<pre>
mkvmerge --list-languages | grep "Japanese"
</pre>
<h3>GUI alternative</h3>
<p>As an alternative to all this CLI work, you could just launch the mkvinfo and mkvmerge GUI programs and drag and drop the streams to create the new file. You’d then fill in the fps and display dimensions in the appropriate text fields and pick the languages from the drop-down menus. I feel that GUIs tend to slow you down, so I prefer the CLI route.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=174&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2011/01/11/manipulating-tracks-in-mkv-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Seamless roaming wireless connections in Arch linux with netcfg</title>
		<link>http://karper.wordpress.com/2010/12/04/seamless-roaming-wireless-connections-in-arch-linux-with-netcfg/</link>
		<comments>http://karper.wordpress.com/2010/12/04/seamless-roaming-wireless-connections-in-arch-linux-with-netcfg/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 12:38:13 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arch linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netcfg]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wired]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/2010/12/04/seamless-roaming-wireless-connections-in-arch-linux-with-netcfg/</guid>
		<description><![CDATA[...in which KarPer manages to connect automatically to wifi networks using netcfg<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=161&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p>
  <i>This article refers to deprecated methods/software. It&#8217;s presented here for archival purposes only.</i>
</p></blockquote>
<blockquote><p>
  While much of this article is deprecated now, I&#8217;m starting to believe that this is in fact, quite impossible. I can&#8217;t seem to automatically switch wireless networks without restarting the net-auto-wireless daemon. The only time this works as it should is when the computer is freshly booted up. Being a linux user, reboots are rather rare for me. That makes net-auto-wireless perfectly useless to me.
</p></blockquote>
<h2>Problem Background</h2>
<p>I need to seamlessly connect to the wireless networks at two (or more) locations. I have the essid and passkey along with authentication type. As an additional constraint, I need it to connect without me needing to log in. This is a requirement because I often just need to transfer some files from one computer to another. All my machines have an ssh server running and I’d like to be able to just turn it on and connect to it.</p>
<h2>Solution</h2>
<p>This is expected behavior from your wireless setup and is actually fairly simple to do. It didn’t come straightforward to me. The solution requires you to install the following packages:</p>
<ul>
<li>wireless_tools (tools like iwlist, iwconfig etc. Handy while troubleshooting)</li>
<li>drivers for your wireless card</li>
<li>netcfg (to manage your wireless networks)</li>
<li>wpa_supplicant (for WPA secured networks)</li>
<li>wpa_actiond (for enabling roaming)</li>
</ul>
<p>For each of the networks that you need to connect to, go to /etc/network.d/ and copy over the example file wireless-wpa-configsection and rename it as you see fit. Use one file per network and enter your network information in these files. Since these files now contain password information, it will be a good idea to restrict access privileges to these files. Use chmod to accomplish this:</p>
<pre>
# chmod 600 &lt;files&gt;
</pre>
<p>Now, enter these file names in /etc/rc.conf in the NETWORKS array, separating each name with a space. I called my files Home and School:</p>
<pre>
...
NETWORKS=(Home School)
...
</pre>
<p>Now, scroll up and state your wireless interface. Mine’s eth1.</p>
<pre>
...
WIRELESS_INTERFACE="eth1"
...
</pre>
<p>Finally, just add net-auto-wireless to the list of daemons to start.</p>
<pre>
DAEMONS=(... net-auto-wireless ...)
</pre>
<p>That’s all. Now, when you reboot, the net-auto-wireless daemon will automatically take care of your wireless networks. You can stay connected as long as any of the networks is within reach.</p>
<h3>Bonus</h3>
<p>If you have a ethernet port and would like to have that activate if you plug in an ethernet connector (again, standard expected behavior), you’ll need to install the ifplugd package. Then, declare your WIRED_INTERFACE and add the net-auto-wired daemon to the list of daemons in /etc/rc.conf:</p>
<pre>
...
WIRED_INTERFACE="eth0"
...
</pre>
<pre>
...
DAEMONS=(... net-auto-wired ...)
...
</pre>
<p>This should take care of your wired connection as well.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=161&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2010/12/04/seamless-roaming-wireless-connections-in-arch-linux-with-netcfg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting replay gain values for all mp3 files in your collection</title>
		<link>http://karper.wordpress.com/2010/11/21/setting-replay-gain-values-for-all-mp3-files-in-your-collection/</link>
		<comments>http://karper.wordpress.com/2010/11/21/setting-replay-gain-values-for-all-mp3-files-in-your-collection/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 01:24:41 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[dragon player]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[mp3gain]]></category>
		<category><![CDATA[phonon]]></category>
		<category><![CDATA[replay gain]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/2010/11/21/setting-replay-gain-values-for-all-mp3-files-in-your-collection/</guid>
		<description><![CDATA[... in which karper tags his entire mp3 music collection with per-track and per-album replay gain data using find and mp3gain.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=135&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Problem Background</h2>
<p>I have all my files stored in my music directory in this structure:<br />
<code>Artist/Album/Song.mp3</code></p>
<p>I need them to be normalized by embedding replay gain values into their ID3 tags. The replay gain values tell the music player to increase or decrease the loudness of a song. The net effect is that all the songs in the collection sound about the same volume. So, I don’t need to fiddle with my system volume setting when a loud song comes up next.</p>
<h2>Solution</h2>
<p>I can locate all the mp3 files using the find command. To apply normalization, I’ll use the mp3gain package.</p>
<h3>find</h3>
<p>First, I switch to the Music directory to limit my searches to my music collection only. I’ll use find to give me a list of the album directories. I’ll use this list in a script later.</p>
<pre>
cd Music/
find . -mindepth 2 -type d -execdir /path/to/applyreplaygain.sh {} \;
</pre>
<ul>
<li><code>-mindepth 2</code> looks two levels deep into the directory structure.</li>
<li><code>-type d</code> finds directories.</li>
<li><code>-execdir</code> executes the following command from the directory containing the album directory (instead of from the top level directory).</li>
<li><code>{}</code> is a stand in for the name of the album directory.</li>
</ul>
<p>At first, I tried using the following command:</p>
<pre>
find . -mindepth 2 -type d -execdir mp3gain -p -a -k -s i -o {}/*.mp3 \;
</pre>
<p>But, it didn’t work because it wouldn’t let me use the * wild card to match all mp3 files in that directory. Further, it would cause havoc every time it encountered a directory name with spaces in it. So, I decided to wrap the mp3gain command in a script.</p>
<h3>mp3gain</h3>
<p>Using mp3gain is relatively simple. The command, with the options I want is as follows:</p>
<pre>
mp3gain -p -a -k -s i -o *.mp3
</pre>
<ul>
<li><code>-p</code> preserves the original time stamp of the file.</li>
<li><code>-a</code> applies album gain so that all songs in an album sound relatively the same with respect to each other. The album on average sounds the same as the rest of the collection.</li>
<li><code>-k</code> prevents clipping by lowering the gain value.</li>
<li><code>-s i</code> writes the tags to the file in the form of ID3v2 tags.</li>
<li><code>-o</code> shows the output in a tab delimited list</li>
</ul>
<p>Wrapping this in a simple script, called applyreplaygain.sh, I get</p>
<pre>
#!/bin/bash
mp3gain -p -a -k -s i -o "$1"/*.mp3
</pre>
<p>The quotes around the first argument ($1) protect spaces in the name of the directory.</p>
<h3>Results</h3>
<p>Now, to put it all together,</p>
<pre>
cd Music/
find . -mindepth 2 -type d -execdir /path/to/applyreplaygain.sh {} \;
</pre>
<p>This will trawl through each album directory and normalize all the mp3 files found within. Each album is treated as a separate unit and the replay gain values will keep the relative loudness of the album intact. The procedure will take several hours to complete (depending on the size of your collection).</p>
<p>Almost all music players respect replay gain and therefore, this will be instantaneously noticeable once the tags are written — I’ve noticed the loudness change in mid-play if the song is being played on any of the phonon-based music players in KDE (Dragon Player, Amarok, etc).</p>
<p>Since no changes have been made to the music file itself, it’s technically possible to undo all this. mp3gain provides the <code>-s d</code> option to delete the embedded normalization tags. I’ve not seen it work too well, though. So, I would suggesting using kid3 to manually delete the volume normalization tags from the mp3 files. It’s not an automated solution and will take time to delete the tags manually from every file in your collection. However, I don’t see why you would want to undo this in the first place!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=135&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2010/11/21/setting-replay-gain-values-for-all-mp3-files-in-your-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Deleting all files in a directory with exceptions</title>
		<link>http://karper.wordpress.com/2010/11/17/deleting-all-files-in-a-directory-with-exceptions/</link>
		<comments>http://karper.wordpress.com/2010/11/17/deleting-all-files-in-a-directory-with-exceptions/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 01:26:09 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[globs]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/2010/11/17/deleting-all-files-in-a-directory-with-exceptions/</guid>
		<description><![CDATA[...in which KarPer deletes all files in a directory, excepting some.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=119&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Problem Background</h2>
<p>It’s easy to delete all files in a directory:</p>
<pre>
$ rm *
</pre>
<p>However, making exceptions to this command is a little tricky. Suppose I have a LaTeX file (report.tex) in a directory and have a accompanying shell script (createreport.sh) that processes this file to produce a pdf (report.pdf) and/or dvi (report.dvi) file. The LaTeX compilers often produce lots of extra files (log, aux, etc.) that I want to delete. A typical example for createreport.sh would probably look like this:</p>
<pre>
#!/bin/bash
latex report || exit 1
pdflatex report
rm -f *.{aux,log,out}
</pre>
<p>The last line of the above script would delete all the auxiliary files created by LaTeX. However, this requires that I know before hand what I want to delete. it would be great if I could tell rm to delete all files, except the files I want to retain.</p>
<h2>Solution</h2>
<p>Use rm like so:</p>
<pre>
shopt -s extglob
rm -f !(*.+(tex|sh|pdf|dvi))
</pre>
<p>This is an example of nesting two extended <a href="http://en.wikipedia.org/wiki/Glob_(programming)">globs</a>. The explanation is found about a thousand lines into the bash manpage:</p>
<pre>
If the extglob shell option is enabled using the shopt builtin, several extended pattern matching operators are recognized.
In the following description, a pattern-list is a list of one or more patterns separated by a |. Composite patterns may be formed using one or more of the following sub-patterns:

?(pattern-list)
Matches zero or one occurrence of the given patterns

*(pattern-list)
Matches zero or more occurrences of the given patterns

+(pattern-list)
Matches one or more occurrences of the given patterns

@(pattern-list)
Matches one of the given patterns

!(pattern-list)
Matches anything except one of the given patterns
</pre>
<p>In my example, the first line enables the use of extended globs. Then, I used the +() glob to present a list of valid extensions and used a !() glob around that to exempt such files from deletion. So, rm will delete all files except .tex, .sh, .pdf or .dvi.</p>
<h3>Tips</h3>
<p>Since rm is a dangerous command to use, you can test out the test with ls or echo like this:</p>
<pre>
$ shopt -s extglob
$ ls !(*.+(tex|sh))
$ echo !(*.+(pdf|dvi))
</pre>
<p>This should print out the names of all files that are not .tex, .sh for the first example and not .pdf or .dvi files for the second example.</p>
<p>You can concoct similar negating tests for your needs:</p>
<p>Match files that don’t have a .xyz extension<br />
<code>!(*.xyz)</code></p>
<p>Match files that don’t begin with abc<br />
<code>!(abc*)</code></p>
<p>Match all files that don’t start with a, b, c, d or e<br />
<code>!([a-e]*)</code></p>
<p>Match all files that don’t start with a or b and don’t end with c or d<br />
<code>!(+(a|b)*+(c|d))</code></p>
<p><a href="http://www.linuxjournal.com/content/bash-extended-globbing">Here</a>’s a good explanation of extended globs for further reading.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=119&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2010/11/17/deleting-all-files-in-a-directory-with-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Manipulating PDF files</title>
		<link>http://karper.wordpress.com/2010/11/11/manipulating-pdf-files/</link>
		<comments>http://karper.wordpress.com/2010/11/11/manipulating-pdf-files/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 17:24:17 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[ghostscript]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[xpdf]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/?p=98</guid>
		<description><![CDATA[...in which KarPer plays around with pages inside PDF files<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=98&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>From time to time, I&#8217;ve needed to manipulate PDF files. Typically, these operations can be broken down into the following basic operations&#8221;</p>
<ul>
<li>Merge two or more PDF files together</li>
<li>Extract a portion of a PDF file</li>
<li>Modify metadata in a PDF file</li>
</ul>
<p>These three basic operations enable a user to manipulate a PDF file at the page level. A command line approach is preferable as it allows scripting.</p>
<p>The solution is to use ghostscript and other basic utilities.</p>
<h3>Merging PDF files</h3>
<pre>
INPUT=part*.pdf
OUTPUT=final.pdf
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$OUTPUT $INPUT
</pre>
<p>The option <code>-dBATCH</code> tells ghostscript to exit after the last file has been processed. <code>-dNOPAUSE</code> prevents it from pausing after each page.</p>
<p>Other options of interest include <code>-q</code> to suppress output messages and <code>-dPDFSETTINGS=/prepress</code> to include higher quality (300 dpi, rather than the default 72 dpi) images.</p>
<h3>Extracting a section from a PDF file</h3>
<pre>
INPUT=bigfile.pdf
OUTPUT=partofbigfile.pdf
FIRSTPAGE=1
LASTPAGE=5
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$OUTPUT -dFirstPage=$FIRSTPAGE -dLastPage=$LASTPAGE $INPUT
</pre>
<h3>Modify metadata in a PDF file</h3>
<p>There are two categories of metadata included in a PDF file. The first includes fields such as Title, Author, Subject and Keywords. The second is the file outline, consisting of a table of contents pointing to various pages in the file</p>
<p>All of this can be specified in a plain text file and passed as part of the input to ghostscript. A simple example of adding such metadata is shown below.</p>
<pre>
% This is an simple pdfmark file adding metadata and Chapter outlines to a PDF file
% Comments are preceded with a % sign.

% Metadata

[ /Title (The Title of the PDF file) /Author (Karthik Periagaram) /Subject (PDF metadata) /Keywords (PDF, metadata) /DOCINFO pdfmark

% Outline

% A simple bookmark

[ /Page 1 /Title (Title Page) /OUT pdfmark

% A set of nested bookmarks

[ /Count 2 /Title (Nested List) /OUT pdfmark
[ /Page 2 /Title (Part 1) /OUT pdfmark
[ /Page 3 /Title (Part 2) /OUT pdfmark

% This final line makes the PDF open with the Outline view shown

[ /PageMode /UseOutlines /DOCVIEW pdfmark
</pre>
<p>It is customary to save this in a file called pdfmarks. Pass it along with the input files to gs like this:</p>
<pre>
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=final.pdf input.pdf pdfmarks
</pre>
<h3>Tips</h3>
<p>While scripting, you may come across the need to find the number of pages in a PDF file. The best option for that is to use <code>pdfinfo</code>. This requires the xpdf package. The output consists of various properties pertaining to the PDF file, including its number of pages.</p>
<pre>
$ pdfinfo file.pdf | grep Pages
Pages: 3
</pre>
<p>You can use awk or cut as part of your script to do the rest.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=98&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2010/11/11/manipulating-pdf-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Regenerating configuration files for the kdm greeter/login screen</title>
		<link>http://karper.wordpress.com/2010/08/08/regenerating-configuration-files-for-the-kdm-greeterlogin-screen/</link>
		<comments>http://karper.wordpress.com/2010/08/08/regenerating-configuration-files-for-the-kdm-greeterlogin-screen/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 01:16:25 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[kdm]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[x]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/?p=96</guid>
		<description><![CDATA[,,,in which KarPer fixes a messed up KDM greeter screen<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=96&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p>
Most people will not encounter any issues with the login screen. However, if you do set out to customize it and run into trouble, you can use the following procedure to reset kdm to &#8220;factory default&#8221; condition.
</p></blockquote>
<p>At some point, I downgraded from an unstable beta release to the older, stable release of KDE. Rather unsurprisingly, the downgrade didn’t go smooth. One of the things that broke was the login screen. I understand this happened because the <code>kdmrc</code> file was referencing the new greeter screen, which no longer existed after the downgrade.</p>
<p>Ideally, the way to fix this would be to fire up System Settings and head to the login theme control module and set things right. For whatever reason, it didn’t work for me. So, I had to manually edit the <code>kdmrc</code>file, found at <code>/usr/share/config/kdm/kdmrc</code>. It is a very convoluted file and I don’t recommend trying to edit it by hand. I tried deleting it, but turned out it doesn’t get automatically regenerated — I was shown a very basic fallback login screen instead.</p>
<p>The command that saved the day is <code>genkdmconf</code>. This command regenerates the contents of the <code>/usr/share/config/kdm</code> directory. Navigate to the location of your kdm configuration files (<code>locate kdmrc</code> should do it) and issue the following command as root in that folder:</p>
<pre>
# genkdmconf --no-old
</pre>
<p>The <code>–no-old</code> option tells genkdmconf to not bother reading the old config files and start fresh. Now, you should have a brand new set of configuration dialogs. The old versions of the configuration files will be saved with a .bak extension. It’s entirely safe to delete them when you’re done.</p>
<pre>
# rm *.bak
</pre>
<p>Now, you can restart X and enjoy your fresh new login screen.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=96&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2010/08/08/regenerating-configuration-files-for-the-kdm-greeterlogin-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Using accented or special characters and unicode symbols in linux</title>
		<link>http://karper.wordpress.com/2010/06/28/using-accented-or-special-characters-and-unicode-symbols-in-linux/</link>
		<comments>http://karper.wordpress.com/2010/06/28/using-accented-or-special-characters-and-unicode-symbols-in-linux/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 08:56:47 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[accents]]></category>
		<category><![CDATA[compose]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[symbols]]></category>
		<category><![CDATA[unicode]]></category>
		<category><![CDATA[x]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/?p=90</guid>
		<description><![CDATA[Before we begin, I need to mention that much of this applies to X-based GUI’s. I have not yet found an easy or simple way (or need) to type in special characters in the console, that is, when X is not running. A partial solution is offered to vim users – you can press Ctrl+V, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=90&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote>
<p>Before we begin, I need to mention that much of this applies to X-based GUI’s. I have not yet found an easy or simple way (or need) to type in special characters in the console, that is, when X is not running. A partial solution is offered to vim users – you can press Ctrl+V, type u, followed by the hexadecimal code of the unicode character (say, 00e0) and voilà! Similar solutions exist for emacs users, too, I’m sure. As you’ll see, it’s more elegant in X.</p>
<p>I also want to point out that this is not a good replacement for keyboard layouts. If you find yourself typing in another languages for longer than a few characters at a time, you really should look into using multiple keyboard layouts.</p>
</blockquote>
<h2>Problem Background</h2>
<p>I often found the need to use accented characters, such as é, Å or Greek characters such α, Φ etc., but lacked the means to type it easily and quickly. I found several kludgy, but somewhat usable ways to get around this:</p>
<ul>
<li>Use a character-picker, an app that will let you choose special characters from a table.</li>
<li>Use an office app and copy the special character from there.</li>
<li>Use krunner. Typing a # followed by the hexadecimal character code will let you select and paste a special character. #00e0, for instance will let you pick à.</li>
<li>Use a keyboard layout that supports the accented characters and switch back to your default one after typing the character in.</li>
</ul>
<p>Such solutions are not elegant and lack customizability. So, I looked to AltGr and Compose keys for a better solution. These are two techniques to enter special characters in X. Since neither AltGr, not Compose are found ubiquitously on keyboards anymore, it’s up to the user to designate keys you don’t use to assume their behavior. AltGr works a bit like the shift key, entering special characters when pressed along with other keys. However, the AltGr key combinations do not exist for Greek characters. Further, the AltGr behavior is really just a subset of what the Compose key is capable of.</p>
<p>Pressing the Compose key tells the computer that the next few keys are part of a sequence. The computer will search through a pre-defined list of sequences and when it finds a match, it will display the corresponding special character. Till then, no characters will be displayed on the screen. If no sequences match, it’ll drop out of compose mode at the next character.</p>
<h3>Designating and Enabling the Compose Key</h3>
<p>In what follows, we’ll set up a Compose key and customize compose key sequences to suit our needs. To know which keys can be designated as the compose key, pull up the following file: <code>/usr/share/X11/xkb/rules/xorg.lst</code>. Scroll down to the Compose key section and pick an option that works for you. I picked <code>compose:caps</code>, but I understand that <code>compose:rwin</code> and <code>compose:menu</code> are popular choices as well.</p>
<p>Now, we need to set this as an option for our X server. What I describe will work for xorg-server 1.8 and up (or any set up that doesn’t use hal for input hot-plugging — if you use hal, you probably need to enter this in an fdi file). You also need to have root privileges to edit system files. In the keyboard section of /etc/X11/xorg.conf, or in the appropriate .conf file in /etc/X11/xorg.conf.d/, add the XkbOptions line. If you use multiple options, separate them using commas.</p>
<pre>
Section "InputClass"
  Identifier "Keyboard"
  MatchIsKeyboard "yes"
  ...
  Option "XkbOptions" "...,compose:caps,..."
  ...
EndSection
</pre>
<p>Now, restart X to have your designated Compose key active.</p>
<p>If you don’t have root privileges, you could still designate a Compose key using the keyboard settings control module in your DE. And you shouldn’t even require to restart X to enable it! However, this is still less preferable as it will only work in your login and is tied to your choice of DE.</p>
<p>If you are curious to explore available compose key sequences, check out the so-called Compose file: <code>/usr/share/X11/locale/en_US.UTF-8/Compose</code>.</p>
<p>My locale in en_US.UTF-8, but replace it by your locale if it’s different (use locale | grep &#8220;LANG&#8221; to find your locale). This is a huge, 5000+ line text file listing enough key combinations to type in multiple languages. If you balk at reading such a huge file, trial-and-error is often a good way to find key sequences as most of them are quite logical (e.g., multi-key + t + m = ™).</p>
<h3>Editing the Compose file</h3>
<p>I felt that the default Compose file could use a cleanup for two reasons. First, as I’ve stated earlier, I don’t see the Compose file as a replacement for switching keyboard layouts. The default compose file spends far too much time setting up various European and Asian language characters. Second, while most shortcuts are well thought out, it’s a bit overwhelming and badly organized. Similar keyboard shortcuts are not found together (much like the Unicode character blocks, unfortunately).</p>
<p>Hence, I decided to cut down the number of key sequences to just the characters that I can see myself using and bring some organization to the list. As you can see, the syntax is quite easy to understand:</p>
<pre>
&lt;Multi_key&gt; [KEY SEQUENCE] : "[SYMBOL]" [UNICODE HEX OR OPTIONAL NAME OF SYMBOL] # [OPTIONAL COMMENT, USUALLY THE UNICODE DESCRIPTION]
</pre>
<p>For instance, to use ‘ + a to type á, the line will look like this:</p>
<pre>
&lt;Multi_key&gt; &lt;apostrophe&gt; &lt;a&gt; : "á" U00E1 # LATIN SMALL LETTER A WITH ACUTE
</pre>
<p>Compose key sequences are case-sensitive. So you can define another sequence to use ‘ + A to get Á. Further, apart from alphabets and numbers, all other keys are referred to by their description: asciitilde (~), grave (`), apostrophe (‘), asciicircum (^), exclaim (!), asterisk (*), leftparens (() etc. Read the original Compose file for more such names.</p>
<p>While defining your own sequences, be careful not to overload sequences or define two sequences in a way that you can’t get to the second one. The computer will enter the first matching sequence, so if you define two sequences like this;</p>
<pre>
&lt;Multi_key&gt; &lt;minus&gt; &lt;minus&gt; : "–" U2013 # EN DASH
&lt;Multi_key&gt; &lt;minus&gt; &lt;minus&gt; &lt;minus&gt; : "—" U2014 # EM DASH
</pre>
<p>you will never be able to enter the EM DASH as by the time you hit the second minus, you’ll drop out of Compose mode with an EN DASH. Incidentally, the default Compose file solves the above problem by using the following sequences:</p>
<pre>
&lt;Multi_key&gt; &lt;minus&gt; &lt;minus&gt; &lt;period&gt; : "–" U2013 # EN DASH
&lt;Multi_key&gt; &lt;minus&gt; &lt;minus&gt; &lt;minus&gt; : "—" U2014 # EM DASH
</pre>
<p>I set out to organize my Compose file into two broad sections with subsections as follows:</p>
<ul>
<li>Part A: Punctuation</li>
<ol>
<li>Accented Capital Latin Characters</li>
<li>Accented Small Latin Characters</li>
<li>Punctuation Marks</li>
<li>Currency</li>
<li>Emoticons, Miscellaneous</li>
</ol>
<li>Part B: Mathematics</li>
<ol>
<li>Capital Greek Characters</li>
<li>Small Greek Characters</li>
<li>Operators</li>
<li>Fractions</li>
<li>Superscripts</li>
<li>Subscripts</li>
</ol>
</ul>
<p>Most of the compose key sequences in my file are the same as the original, but I invented some for new characters not in the original file. For instance, compose sequences for Greek letters start with a g, while some mathematical symbols sequences start with an m:</p>
<pre>
&lt;Multi_key&gt; &lt;g&gt; &lt;a&gt; : "α" U03B1 # GREEK SMALL LETTER ALPHA
&lt;Multi_key&gt; &lt;g&gt; &lt;b&gt; : "β" U03B2 # GREEK SMALL LETTER BETA
&lt;Multi_key&gt; &lt;g&gt; &lt;g&gt; : "γ" U03B3 # GREEK SMALL LETTER GAMMA
...
&lt;Multi_key&gt; &lt;m&gt; &lt;d&gt; : "∂" U2202 # PARTIAL DIFFERENTIAL
&lt;Multi_key&gt; &lt;m&gt; &lt;I&gt; : "∫" U222B # INTEGRAL
&lt;Multi_key&gt; &lt;m&gt; &lt;i&gt; : "∞" U221E # INFINITY
</pre>
<p>In other places, I changed the default sequences to type characters that were more important to my usage. For instance, in the original Compose file, &lt; + &lt; produces the left guillemet («). I find that the much less-than character (≪) is much more useful. So, I defined it like so:</p>
<pre>
&lt;Multi_key&gt; &lt;less&gt; &lt;less&gt; : "≪" U226A # MUCH LESS-THAN
</pre>
<p>Finally, in the emoticons and miscellaneous section, I added some whimsical characters that struck my fancy: ☢ (r + a), ☣ (b + h), ☯ (y + y), ಠ (l + o + d)… while retaining some equally interesting characters from the original Compose file: ☭ (C + C + C + P), ♥ (&lt; + 3), ☺ (: + )) … </p>
<p>The new Compose file took a day to put together and came in at 250 lines and packed a lot more useful characters for me.</p>
<p>I could save my Compose file as ~/.XCompose and have it active just for myself after I log in, or I could replace the original file so that it is active for all users and available as soon as X starts — although I don’t recommend using Unicode characters in usernames or passwords… it can make console-based recovery options virtually impossible.</p>
<p>My compose file is now hosted on a git repository and from time to time, I make edits to it. You can find it <a href="http://gitorious.org/compose-key-sequences/">here</a>.</p>
<p>Feel free to edit and hence or otherwise, customize the compose key sequences I put together!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=90&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2010/06/28/using-accented-or-special-characters-and-unicode-symbols-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Using vnc between two linux computers</title>
		<link>http://karper.wordpress.com/2009/09/28/using-vnc-between-two-linux-computers/</link>
		<comments>http://karper.wordpress.com/2009/09/28/using-vnc-between-two-linux-computers/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 09:39:54 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[vnc]]></category>
		<category><![CDATA[x11vnc]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/2009/09/29/using-vnc-between-two-linux-computers/</guid>
		<description><![CDATA[...in which KarPer manages to connect to a vnc server through an ssh tunnel.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=82&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Problem Background</h2>
<p>I want to connect to my work computer from home, to the primary X session and continue working remotely. My work computer is the vnc server. My home computer (the client) is to use a vnc viewer such as krdc (KDE Remote Desktop Client) to allow me to control the remote machine. An added layer of complexity arises from the firewall that I need to tunnel through to reach my machine at work.</p>
<h2>Solution</h2>
<p>Server side, I’ll use x11vnc to accomplish this. This is because x11vnc allows me to connect to the primary X session — I need this since I might already have applications running at work and would like to continue where I left off. If this is not a concern, you can use tightvnc or other vnc servers, but you will need to start a separate X session to connect to.</p>
<p>As an aside, for working with GUI programs, vnc works out better than ssh with X11 forwarding. This is because if the connection gets dropped, an application forwarded through ssh will terminate, sometimes uncleanly, leading to potential data loss or corruption. vnc, on the other hand, leaves the application running on the server and you have the possibility of resuming after you reconnect. Further, if the application was already running on the server to start with, ssh forwarding doesn&#8217;t really help.</p>
<blockquote><p>
<i>Tunneling all vnc communication through an ssh tunnel, though optional, is highly recommended.</i>
</p></blockquote>
<ol>
<li>Install the <code>x11vnc</code> package on the server.</li>
<pre>
# pacman -S x11vnc
</pre>
<li>Set up a vnc password for authentication.</li>
<p>This step is optional, but recommended as without a password, anyone can connect to the vnc server. The following command will store a vnc password in ~/.vnc/passwd.</p>
<pre>
$ x11vnc -storepasswd
</pre>
<li>Open the first of two tunnels.</li>
<p>The first tunnel is for ssh. The following command will open a tunnel from local port 2222 (or any other port of your choice) to remote port 22.</p>
<pre>
$ ssh -fNL 2222:REMOTE:22 USERNAME@GATEWAY
</pre>
<li>Connect to the remote server and start the x11vnc server.</li>
<pre>
$ ssh -p 2222 localhost
REMOTE $ x11vnc -create -usepw -noxdamage
</pre>
<p>The <code>-create</code> flag for x11vnc will scan for X sessions you&#8217;re logged into and connect to it if it finds one. If you&#8217;re not logged in, or if someone else is logged in at the remote machine, it will create a new session for you. This new session cannot be viewed by someone at the remote server console.</p>
<p>The <code>-usepw</code> flag tells the server to use an authentication password. The first place this looks for a stored password is in ~/.vnc/passwd.</p>
<p>The <code>-noxdamage</code> flag is a performance option that worked well for me.</p>
<p>When starting the x11vnc server, make a note of the port number the x11vnc server is listening on. Usually, this will be port 5900.</p>
<li>Open the second tunnel to the port vnc is listening on</li>
<pre>
$ ssh -fNL 5959:REMOTE:5900 USERNAME@GATEWAY
</pre>
<p>Replace 5900 with the appropriate port number, if necessary.</p>
<li>Start a vncviewer locally and connect to the remote x11vnc server.</li>
</ol>
<p>When you&#8217;re done, terminate the x11vnc server on the remote machine. If you logout, the server automatically terminates.</p>
<h2>Problems</h2>
<ul>
<li>If you connect to a locked X session, it remains visible remotely. Other than leaving your monitor turned off, I haven&#8217;t come up with a better solution for this. If the remote machine is either at the login screen or if someone else is already logged in, the new session is invisible to the remote user.</li>
<li>Performance is wickedly slow, especially when compared to protocols like rdp (remote desktop from Windows). This seems to be the best vnc is capable of. I&#8217;ve heard good things about freeNX and will play with it when I get the time. If you have any suggestions about improving the performance of vnc, do let me know!
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=82&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2009/09/28/using-vnc-between-two-linux-computers/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
		<item>
		<title>Sharing a keyboard, mouse and clipboard between two computers</title>
		<link>http://karper.wordpress.com/2009/09/06/sharing-a-keyboard-mouse-and-clipboard-between-two-computers/</link>
		<comments>http://karper.wordpress.com/2009/09/06/sharing-a-keyboard-mouse-and-clipboard-between-two-computers/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 10:37:59 +0000</pubDate>
		<dc:creator>karper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://karper.wordpress.com/2009/09/06/sharing-a-keyboard-mouse-and-clipboard-between-two-computers/</guid>
		<description><![CDATA[Problem Background I have two computers at home side by side and would like to share a keyboard and a mouse between them. It would be a great help to share the clipboard as well as it would let me move bits of text really quickly between the two computers (select on one and paste [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=75&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Problem Background</h2>
<p>I have two computers at home side by side and would like to share a keyboard and a mouse between them. It would be a great help to share the clipboard as well as it would let me move bits of text really quickly between the two computers (select on one and paste in the other).</p>
<p>As an example, let&#8217;s say the &#8216;server&#8217; computer has a physical keyboard and mouse. It is located to the right of the &#8216;client&#8217; computer. The server&#8217;s keyboard and mouse needs to be used on the client.</p>
<h2>Solution</h2>
<p>The package I&#8217;ll use is called synergy. Since synergy sends unencrypted information back and forth, I&#8217;ll need to route it through an ssh tunnel so that no one can snoop on my key strokes and clipboard contents. Here&#8217;s how to implement this.</p>
<ol>
<li>Install synergy on both computers.</li>
<p>Arch linux has synergy in its ‘extra’ repository.</p>
<pre>
# pacman -S synergy
</pre>
<blockquote><p>
  <i>The # prompt indicates that the command requires root privileges. Similarly, a $ prompt indicates that a command does not require root privileges.</i>
</p></blockquote>
<li>Edit the /etc/synergy.conf file on both machines.</li>
<p>This file specifies the physical layout of the screens to synergy. This way, The mouse will smoothly transition from one computer to another when it encounters the correct screen edge.</p>
<p>The contents of synergy.conf should look like this on both machines: (Replace <code>SERVER</code> and <code>CLIENT</code> by the correct IP addresses/hostnames)</p>
<pre>
section: screens
  SERVER:
  CLIENT:
end

section: links
  SERVER:
    left=CLIENT
  CLIENT:
    right=SERVER
end

section: aliases
end
</pre>
<p>These files can also be saved in one’s home directory as ~/.synergy.conf</p>
<li>On the server, start the synergy server.</li>
<pre>
$ synergys
</pre>
<li>On the client, open an ssh tunnel to the server.</li>
<blockquote><p>
<i>Note that this is an optional, but strongly recommended step.</i>
</p></blockquote>
<pre>
$ ssh -fNL 24800:SERVER:24800 USERNAME@SERVER
</pre>
<li> On the client again, start the synergy client.</li>
<pre>
$ synergyc localhost
</pre>
<p>If there&#8217;s no ssh tunnel running, replace &#8216;localhost&#8217; in the above command by <code>SERVER</code>.</p>
</ol>
<p> Now, I have a working setup with two computers sharing the same mouse and keyboard! The keyboard strokes are sent to the computer whose screen the mouse cursor is on.</p>
<h2>Problems</h2>
<ul>
<li>If a corner or edge of the screen is shared between the two computers, kwin effects cannot be designated to those corners or edges.</li>
<li>I&#8217;ve sometimes seen the mouse jump to the center of the client screen when transitioning past the edge of the server screen.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/karper.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/karper.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/karper.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/karper.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/karper.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/karper.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/karper.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/karper.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/karper.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/karper.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/karper.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/karper.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/karper.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/karper.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karper.wordpress.com&amp;blog=1589865&amp;post=75&amp;subd=karper&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://karper.wordpress.com/2009/09/06/sharing-a-keyboard-mouse-and-clipboard-between-two-computers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6c7431baea647d380884e65944f9318e?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">KarPer</media:title>
		</media:content>
	</item>
	</channel>
</rss>
