<?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>The GNU of Life, the Universe and Everything</title>
	<atom:link href="http://freethegnu.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://freethegnu.wordpress.com</link>
	<description>Freeing the GNU from the daily amusements</description>
	<lastBuildDate>Wed, 18 Jan 2012 18:39:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='freethegnu.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The GNU of Life, the Universe and Everything</title>
		<link>http://freethegnu.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://freethegnu.wordpress.com/osd.xml" title="The GNU of Life, the Universe and Everything" />
	<atom:link rel='hub' href='http://freethegnu.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Stop internet censorship. Say no to PIPA and SOPA</title>
		<link>http://freethegnu.wordpress.com/2012/01/18/stop-internet-censorship-say-no-to-pipa-and-sopa/</link>
		<comments>http://freethegnu.wordpress.com/2012/01/18/stop-internet-censorship-say-no-to-pipa-and-sopa/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 13:36:29 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[Freedom]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=170</guid>
		<description><![CDATA[Today&#8217;s the day of the world stood against the proposals that would create laws to censor the internet based on denounces without due process! Although you may have heard about SOPA, please take note that there&#8217;s a similar proposal called PIPA that is also being discussed but is not getting attention. If you live in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=170&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s the day of the world stood against the proposals that would create laws to censor the internet based on denounces without due process!</p>
<p>Although you may have heard about SOPA, please take note that there&#8217;s a similar proposal called PIPA that is also being discussed but is not getting attention.</p>
<p>If you live in the USA,  please write or call your representatives, or use this form:  <a href="http://sopastrike.com/strike">sopastrike.com/strike</a> to stop PIPA and SOPA.</p>
<p>These proposals are also very dangerous for everyone outside the US. Although these are US based laws, don&#8217;t forget that many domains that have a .com, .org, or .net are considered as domestic to the USA, so they fall under these laws jurisdiction. We know that corporations have been influencing the European governments like the recent cases of France, Portugal and Spain, to push similar laws into our own civil codes.  A censored internet is the end of public sharing of knowledge and we all have been thankful for this. So thank you for taking action!</p>
<div id="attachment_171" class="wp-caption aligncenter" style="width: 970px"><a href="http://freethegnu.files.wordpress.com/2012/01/no-sopa_header.png"><img class="size-full wp-image-171" title="say no to PIPA and SOPA" src="http://freethegnu.files.wordpress.com/2012/01/no-sopa_header.png" alt="say no to PIPA and SOPA" width="960" height="354" /></a><p class="wp-caption-text">say no to PIPA and SOPA</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=170&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2012/01/18/stop-internet-censorship-say-no-to-pipa-and-sopa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2012/01/no-sopa_header.png" medium="image">
			<media:title type="html">say no to PIPA and SOPA</media:title>
		</media:content>
	</item>
		<item>
		<title>Lpsolve Syntax Highlight for Geany IDE</title>
		<link>http://freethegnu.wordpress.com/2011/12/17/lpsolve-syntax-highlight-for-geany-ide/</link>
		<comments>http://freethegnu.wordpress.com/2011/12/17/lpsolve-syntax-highlight-for-geany-ide/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 00:50:20 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[editor]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[geany]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=160</guid>
		<description><![CDATA[Add Lp Solve extension First, we need to add the extension file, so geany knows what file it can associate to lp solve files. Either go to:  Tools -&#62; Configuration Files -&#62; filetype_extensions.conf or:  edit directly the file in Linux: ~/.config/geany/filetype_extensions.conf Windows 7 :  c:\Users\username\AppData\Roaming\geany\filetype_extensions.conf and add a new line with Lpsolve=*.lp; Download Lp Solve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=160&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Add Lp Solve extension</h1>
<div id="attachment_161" class="wp-caption alignright" style="width: 310px"><a href="http://freethegnu.files.wordpress.com/2011/12/ss_01.png"><img class="size-medium wp-image-161" title="Lp solve files Syntax highlight for Geany" src="http://freethegnu.files.wordpress.com/2011/12/ss_01.png?w=300&#038;h=259" alt="Lp solve files Syntax highlight for Geany" width="300" height="259" /></a><p class="wp-caption-text">An example of Lp solve files Syntax highlight in Geany</p></div>
<p>First, we need to add the extension file, so geany knows what file it can associate to lp solve files.</p>
<p>Either go to: <code> Tools -&gt; Configuration Files -&gt; filetype_extensions.conf</code></p>
<p>or:  edit directly the file in</p>
<p>Linux: <code>~/.config/geany/filetype_extensions.conf</code></p>
<p>Windows 7 : <code> c:\Users\username\AppData\Roaming\geany\filetype_extensions.conf</code></p>
<p>and add a new line with</p>
<p><code>Lpsolve=*.lp;</code></p>
<h1>Download Lp Solve syntax highlight file</h1>
<p>Next, download this syntax highlight file:  <a title="Lp solve files syntax hightlight" href="http://leitecarvalho.com/files_pub/filetypes.Lpsolve.conf" target="_blank">filetypes.Lpsolve.conf</a></p>
<p>and place it in <code>~/.config/geany/filedefs/</code> (Linux)</p>
<p>or<code> c:\Users\username\AppData\Roaming\geany\filedefs\ </code>(Windows 7)</p>
<h2>More information on syntax highlight</h2>
<p>Note:  if not bothered to download this file, you can add the extension to any existing filetypes, for example:</p>
<p><code>C=*.c;*.h;*.lp;</code></p>
<p>Many thanks to <a title="geanycolourscheme.xtreemhost.com" href="http://geanycolourscheme.xtreemhost.com/" target="_blank">geanycolourscheme.xtreemhost.com</a> editor.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=160&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2011/12/17/lpsolve-syntax-highlight-for-geany-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2011/12/ss_01.png?w=300" medium="image">
			<media:title type="html">Lp solve files Syntax highlight for Geany</media:title>
		</media:content>
	</item>
		<item>
		<title>how to open Visual paradigm projects directly from KDE</title>
		<link>http://freethegnu.wordpress.com/2011/11/29/how-to-open-visual-paradigm-projects-directly-from-kde/</link>
		<comments>http://freethegnu.wordpress.com/2011/11/29/how-to-open-visual-paradigm-projects-directly-from-kde/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 06:32:56 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[kde4]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[visual paradigm]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=154</guid>
		<description><![CDATA[oddly enough my installation of Visual Paradigm set its type to application/zip. When i try to open it, it uses the same applications that other .zip files use. Sure i could right-click + open with + Visual paradigm , but &#8230;. So instead we&#8217;re going to create a new file type for that .vpp extension. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=154&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>oddly enough my installation of Visual Paradigm set its type to application/zip.</p>
<p>When i try to open it, it uses the same applications that other .zip files use.</p>
<p>Sure i could right-click + open with + Visual paradigm , but &#8230;.</p>
<p>So instead we&#8217;re going to create a new file type for that .vpp extension.</p>
<p><a href="http://freethegnu.files.wordpress.com/2011/11/snapshot8.png"><img class="alignright size-medium wp-image-155" title="Add a filetype to KDE" src="http://freethegnu.files.wordpress.com/2011/11/snapshot8.png?w=300&#038;h=201" alt="" width="300" height="201" /></a></p>
<h1>Create a new filetype in KDE</h1>
<p>1 &#8211; Add a &#8220;x-vpp&#8221; type.</p>
<p>2 &#8211; select it (it down the list, inside the application category)</p>
<p>3 &#8211; Add a filename Pattern:<br />
*.vpp</p>
<p>4 &#8211; Add an Application<br />
* browse to your &#8220;Visual Paradigm for UML&#8221; binary file ( /path/vp/bin/Visual_Paradigm_for_UML_8.3 )</p>
<p>5 &#8211; Select an icon<br />
* check the &#8220;resources&#8221; directory in your VP installation ( path/vp/resources/vpuml.png )</p>
<p>6 &#8211; press OK</p>
<p>Ok, now we need to edit the culprit of this mess:</p>
<h1>Change the mimetype for Visual Paradigm for UML</h1>
<p>edit the <code>~/.local/share/applications/Visual_Paradigm_for_UML_8.3.desktop</code></p>
<p>and change the mimetype to:</p>
<p><code>MimeType=application/x-vpp;</code></p>
<h1>Restart your file manager</h1>
<p>and we&#8217;re done! re-open your konqi/dolphin and .vpp files will always open with VP and your .zip will never again<br />
be open with VP!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=154&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2011/11/29/how-to-open-visual-paradigm-projects-directly-from-kde/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2011/11/snapshot8.png?w=300" medium="image">
			<media:title type="html">Add a filetype to KDE</media:title>
		</media:content>
	</item>
		<item>
		<title>Patch portage to be more quiet</title>
		<link>http://freethegnu.wordpress.com/2011/03/19/patch-portage-to-be-more-quiet/</link>
		<comments>http://freethegnu.wordpress.com/2011/03/19/patch-portage-to-be-more-quiet/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 20:20:40 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[portage]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=142</guid>
		<description><![CDATA[Gentoo linux is alive and well and just released a new Gentoo Linux Live.  It features Linux Kernel 2.6.37 (with Gentoo patches). It comes will all desktop environments. Especially if you are looking for KDE 4.6 SC here&#8217;s the best way to start. It also includes OpenOffice.org (3.2.1), GIMP (2.6.11), Inkscape (0.48.1), Blender (2.49b), and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=142&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://freethegnu.files.wordpress.com/2011/03/1024x600.jpg"><img src="http://freethegnu.files.wordpress.com/2011/03/1024x600.jpg?w=300&#038;h=175" alt="Gentoo Live Linux 10.0" title="1024x600" width="300" height="175" class="aligncenter size-medium wp-image-148" /></a><br />
<a href="http://www.gentoo.org/">Gentoo</a> linux is alive and well and just released a new Gentoo Linux Live.  It features Linux Kernel 2.6.37 (with Gentoo patches). It comes will all desktop environments. Especially if you are looking for KDE 4.6 SC here&#8217;s the best way to start.<br />
It also includes OpenOffice.org (3.2.1), GIMP (2.6.11), Inkscape (0.48.1), Blender (2.49b), and many more. They are all packed in either the x86/x86_64 or the x86_64. If you like it, you&#8217;ll need to install Gentoo with the Instalation CD.</p>
<p>So a few days after the <a href="http://planet.gentoo.org/">celebrated news of 11th release</a> here&#8217;s a patch for portage to make it quiet and nice.</p>
<p>Those extra verbose warnings really annoys me,  because emerging something keeps showing me all the licensed packages that are masked, broken packages or masked.  So i fixed the <strong>&#8220;<span style="color:#ffff00;">!!!</span> existing preserved libs:</strong><br />
<strong> &#8221; ,  &#8220;<span style="color:#ff0000;">!!!</span> The following installed packages are masked:&#8221;</strong> and <strong>&#8220;<span style="color:#ff0000;">!!!</span> There are updates currently masked by LICENSE changes.&#8221; </strong> messages.</p>
<p>You can revert to the verbose warnings with the new flag &#8220;&#8211;extra-verbose&#8221;.</p>
<p>All it does is remove the list of packages shown after doing a emerge, and improves the speed because it doesn&#8217;t calculate any of it (particular when figuring out the preserved libs) and only shows a single line warning about them.</p>
<p>The patch is for portage-2.2.0_alpha26 (which is totally a must so you can play around with @sets)</p>
<h2>Where to get the patch</h2>
<p><a href="http://leitecarvalho.com/files/patch-2.2.0_alpha26">patch-2.2.0_alpha26</a></p>
<h2>How to apply the patch:</h2>
<p>on the <code>/usr/lib/portage/pym/</code> directory</p>
<blockquote><p><code>patch -p1 -i patch-2.2.0_alpha26</code></p></blockquote>
<p>The <a href="http://www.gentoo.org/doc/en/handbook/">handbook</a> is always a good idea to keep around ;)</p>
<p>(the image was taken from the <a href="http://www.gentoo.org/proj/en/pr/releases/10.0/graphics.xml">Gentoo Live 10.0</a>)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=142&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2011/03/19/patch-portage-to-be-more-quiet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2011/03/1024x600.jpg?w=300" medium="image">
			<media:title type="html">1024x600</media:title>
		</media:content>
	</item>
		<item>
		<title>How to format a usb pen or mp3 player the right way</title>
		<link>http://freethegnu.wordpress.com/2010/12/14/how-to-format-a-usb-pen-or-mp3-player-the-right-way/</link>
		<comments>http://freethegnu.wordpress.com/2010/12/14/how-to-format-a-usb-pen-or-mp3-player-the-right-way/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 01:11:29 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=133</guid>
		<description><![CDATA[In a short line: # mkfs.vfat -vc -F 32 -n &#8220;zen stone&#8221; -S 2048 /dev/yourdevice The explanation: -v Verbose execution. -c Check the device for bad blocks before creating the file system. -F FAT-size Specifies the type of file allocation tables used (12, 16 or 32 bit). If nothing is specified, mkdosfs will automatically select [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=133&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>In a short line:</h3>
<p style="padding-left:30px;"># mkfs.vfat -vc -F 32 -n &#8220;zen stone&#8221; -S 2048 /dev/yourdevice</p>
<h3>The explanation:</h3>
<h3>
<p><div id="attachment_137" class="wp-caption alignright" style="width: 273px"><img class="size-full wp-image-137 " title="free the gnu -  lego mp3 player" src="http://freethegnu.files.wordpress.com/2010/12/mp3_lego.jpg" alt="free the gnu -  lego mp3 player" width="263" height="270" /><p class="wp-caption-text">free the gnu -  lego mp3 player</p></div></h3>
<p><strong>-v </strong> <em>Verbose execution.</em></p>
<p><strong>-c </strong> <em> Check the device for bad blocks before creating the file system.</em></p>
<p><strong>-F FAT-size</strong><br />
<em>Specifies the type of file allocation tables used (12, 16 or 32 bit).</em><br />
<em> If nothing is specified, mkdosfs will automatically select between 12</em> <em>and 16 bit, whatever fits better for the filesystem size.  32 bit FAT </em><em>(FAT32 format) must (still) be selected explicitly if you want it.</em></p>
<p><strong>-n volume-name</strong><br />
<em>Sets  the volume name (label) of the filesystem.  The volume name can</em> <em>be up to 11 characters long.  The default is no label.</em></p>
<p><strong>-S logical-sector-size</strong><br />
<em>Specify the number of bytes per logical sector.  Must be a power of 2 </em><em>and  greater  than or equal to 512, i.e. 512, 1024, 2048, 4096, 8192, </em><em>16384, or 32768.</em></p>
<p>change &#8220;youdevice&#8221; for your own. Find out which is by checking your <strong>dmesg</strong> after plug-in the usb device for  something like:</p>
<ul>
<li>sde: sde1</li>
<li>sdb</li>
<li>etc&#8230;</li>
</ul>
<p>You might want to try this flag too:<em><br />
</em></p>
<p><strong>-I </strong> <em>Normally you are not allowed to use any &#8216;full&#8217;  fixed  disk  devices.</em><br />
<em> mkdosfs  will complain and tell you that it refuses to work.  This is</em> <em>different when usind MO disks.  One doesn&#8217;t always need partitions on</em><br />
<em> MO  disks.   The  filesytem can go directly to the whole disk.  Under </em><em>other OSes this is known as the &#8216;superfloppy&#8217; format.</em></p>
<p><em>This switch will force mkdosfs to work properly.</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=133&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2010/12/14/how-to-format-a-usb-pen-or-mp3-player-the-right-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2010/12/mp3_lego.jpg" medium="image">
			<media:title type="html">free the gnu -  lego mp3 player</media:title>
		</media:content>
	</item>
		<item>
		<title>Yet another ssh brute force attack and how to protect against it with iptables and sshguard</title>
		<link>http://freethegnu.wordpress.com/2010/09/22/yet-another-ssh-brute-force-attack-and-how-to-protect-against-it-with-iptables-and-sshguard/</link>
		<comments>http://freethegnu.wordpress.com/2010/09/22/yet-another-ssh-brute-force-attack-and-how-to-protect-against-it-with-iptables-and-sshguard/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 21:20:09 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=117</guid>
		<description><![CDATA[By chance, i looked into syslog ( /var/log/syslog ) and saw a ssh attempt to login from a ip outside local network. It was a brute force attack that started 7 days ago.. See down the post how to protect ssh from further attacks. Looking at the logs ( tail -n 200000 /var/log/syslog ) noticed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=117&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://freethegnu.files.wordpress.com/2010/09/ss_brute_force_attack1.png"><img class="alignleft size-medium wp-image-128" title="ssh brute force attack" src="http://freethegnu.files.wordpress.com/2010/09/ss_brute_force_attack1.png?w=259&#038;h=300" alt="ssh brute force attack" width="259" height="300" /></a></p>
<p>By chance, i looked into syslog (<code> /var/log/syslog</code> ) and saw a ssh attempt to login from a ip outside local network. It was a brute force attack that started 7 days ago.. See down the post <a href="#gettingstarted">how to protect ssh from further attacks.</a></p>
<p>Looking at the logs (<code> tail -n 200000 /var/log/syslog </code>) noticed that the attack started on:</p>
<blockquote><p>Sep 15 21:01:37 cerval sshd[13101]: Failed password for root from 114.80.94.183 port 42023 ssh2</p></blockquote>
<p>then the attack went on by</p>
<blockquote><p>66.219.59.10<br />
193.106.65.15<br />
85.62.8.13</p>
<p><em>Sep 17 21:43:44 cerval sshd[18343]: reverse mapping checking getaddrinfo for 85.62.8.13.static.abi.uni2.es [85.62.8.13] failed &#8211; POSSIBLE BREAK-IN ATTEMPT</em></p></blockquote>
<p>Then more brute force from</p>
<blockquote><p>87.106.243.162<br />
85.10.136.18</p>
<p><em>Sep 18 09:33:10 cerval sshd[28178]: Address 222.253.174.238 maps to localhost, but this does not map back to the address &#8211; POSSIBLE BREAK-IN ATTEMPT! </em></p></blockquote>
<p>and more</p>
<blockquote><p>222.253.174.238<br />
75.127.81.15<br />
93.182.137.2<br />
68.71.97.58 &#8230;</p></blockquote>
<p>and still more from</p>
<blockquote><p>201.240.99.126<br />
59.151.119.180<br />
124.232.131.82<br />
119.188.7.164<br />
200.121.131.166</p></blockquote>
<p>on the  20th, things got intensified with 3 simultanious attacks:</p>
<blockquote><p>Sep 20 14:11:38 cerval sshd[7749]: Failed password for root from 118.68.202.49 port 4921 ssh2<br />
Sep 20 14:11:38 cerval sshd[7747]: Failed password for root from 58.186.10.126 port 3667 ssh2<br />
Sep 20 14:11:38 cerval sshd[7753]: Failed password for root from 123.20.1.43 port 3703 ssh2</p></blockquote>
<p>and yet some more:</p>
<blockquote><p>200.37.45.101<br />
bj141-147-66.bjtelecom.net [219.141.147.66]<br />
195.58.83.74<br />
61.150.72.170</p></blockquote>
<p>UDP packets ??</p>
<blockquote><p>Sep 22 09:03:20 cerval [3971817.790301] UDP: short packet: From 0.136.255.255:35010 25649/99 to 80.173.165.1:6881</p></blockquote>
<p>and finally</p>
<blockquote><p>220.226.22.72<br />
213.172.36.130<br />
194.190.129.49</p></blockquote>
<p>I checked the logs and saw the attack. stopped ssh. no more fun for you :(</p>
<p>I decided finally, after 6 years of laziness to build up some security.</p>
<h2><a name="gettingstarted">Getting started with iptables</a></h2>
<p>The guys at <a href="http://www.netfilter.org/">netfilter</a> created, omnipresent on most of Linux machines, a packet filtering system called <a href="http://www.netfilter.org/projects/iptables/index.html">iptables</a>.</p>
<h3>The iptables Rules</h3>
<p>For creating a bash script to create all the rules need, i used this <a href="http://www.lowth.com/LinWiz/1.09/">online iptables wizard</a>. (don&#8217;t forget to remove &#8220;LINWIZ-&#8221; from the script created)</p>
<h3>Running iptables</h3>
<p>Next run the script <code>sh iptables.sh</code>, save it <code>/etc/init.d/iptables save</code>, and then start, stop and start iptables again ( <code>/etc/init.d/iptables start; /etc/init.d/iptables stop; /etc/init.d/iptables start </code> )</p>
<p>and check if the rules are active with <code>iptables -L -v</code></p>
<p>To get a better understanding check <a href="http://www.puschitz.com/FirewallAndRouters.shtml">Stateful Firewall and Masquerading on Linux</a></p>
<h2>Protecting ssh</h2>
<p>Luckly gentoo portage has <a href="http://www.sshguard.net/">sshguard</a>, which has lots of nice features!<br />
Unmasked it to use a decent version (portage has 1.0 as stable, 1.4 as latest, but sshguard is v1.5rc4, which is the last RC planned before 1.5 stable. )</p>
<p>and then, <code>emerge -av sshguard</code>.<br />
<a href="http://www.sshguard.net/docs/faqs/#sshguard-start-at-boot">Its FAQ has the script to use for booting</a> but the &#8220;<code>-l</code>&#8221; option wasn&#8217;t working on this version, so i used this instead</p>
<blockquote>
<pre>#! /bin/sh
case $1 in
start)
    tail -n0 -F /var/log/auth.log | /usr/local/sbin/sshguard &amp;
    ;;
stop)
    killall sshguard
;;
*)
    echo "Use start or stop"
    exit 1
;;
esac</pre>
</blockquote>
<p>Add to the rc levels to ensure it starts at every boot:</p>
<blockquote><p><code>rc-update add sshguard default</code></p></blockquote>
<h3>If you are using syslog-ng with sshguard</h3>
<p>On Gentoo, just add  this to <code>/etc/syslog-ng/syslog-ng.conf</code>:</p>
<blockquote>
<pre>#create a new destination for sshguard
destination sshguardproc {
    program("/usr/sbin/sshguard"
        template("$DATE $FULLHOST $MESSAGE\n"));
};
#creates a filter called f_sshlogs for auth and authpriv system logs
filter f_sshlogs { facility(auth, authpriv) and match("sshd"); }; # for sshguard

log { source(src); filter(f_sshlogs); destination(sshguardproc); };</pre>
</blockquote>
<h2>Restart sshd</h2>
<p>Start ssh again! <code>/etc/init.d/sshd start</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=117&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2010/09/22/yet-another-ssh-brute-force-attack-and-how-to-protect-against-it-with-iptables-and-sshguard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2010/09/ss_brute_force_attack1.png?w=259" medium="image">
			<media:title type="html">ssh brute force attack</media:title>
		</media:content>
	</item>
		<item>
		<title>Make Emacs pretty with beautiful fonts</title>
		<link>http://freethegnu.wordpress.com/2010/08/07/make-emacs-pretty-with-beautiful-best-fonts/</link>
		<comments>http://freethegnu.wordpress.com/2010/08/07/make-emacs-pretty-with-beautiful-best-fonts/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 04:22:24 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[emacs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=107</guid>
		<description><![CDATA[Over the years i&#8217;ve been trying to make emacs more readable, harmonizing it with the desktop themes. i dislike long lines and scrolling up and down so a small readable font is very important. So here&#8217;s the evolution emacs had today: left-top: default emacs 23 right-top : old left-bottom : default with &#8211;font &#8220;Bitstream Vera [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=107&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Over the years i&#8217;ve been trying to make emacs more readable, harmonizing it with the desktop themes. i dislike long lines and scrolling up and down so a small readable font is very important. </p>
<p>So here&#8217;s the evolution emacs had today:<br />
left-top: default emacs 23<br />
right-top : old<br />
left-bottom : default with &#8211;font &#8220;Bitstream Vera Sans Mono-10&#8243; -q<br />
right-bottom : default &#8211;font &#8220;Inconsolata-11&#8243; -q<br />
<a href="http://freethegnu.files.wordpress.com/2010/08/ss_emacs-all-3.jpg"><img src="http://freethegnu.files.wordpress.com/2010/08/ss_emacs-all-3.jpg?w=203&#038;h=300" alt="Pretty emacs with beautiful fonts" title="Pretty emacs with beautiful fonts" width="203" height="300" class="aligncenter size-medium wp-image-111" /></a></p>
<p>here&#8217;s the complete images, side by side:<br />
<a href="http://freethegnu.files.wordpress.com/2010/08/ss_emacs-all-1.png"><img src="http://freethegnu.files.wordpress.com/2010/08/ss_emacs-all-1.png?w=235&#038;h=300" alt="Pretty emacs with beautiful fonts" title="Pretty emacs with beautiful fonts" width="235" height="300" class="aligncenter size-medium wp-image-114" /></a></p>
<p>So the lines fit on the 80columns, there&#8217;s plenty of lines shown and the font is beautiful.</p>
<p>I&#8217;ve used alot of fonts over the time, but the best font right now is Inconsolata font, created by Raph Levien, with the suport from the TeX Users Group <a href="http://tug.org/tc/devfund/">Development Fund</a>. It has so many gorgeous details like the curved t, and the g. oh, i&#8217;m in love :) Find out more about <a href="http://www.levien.com/type/myfonts/inconsolata.html">Inconsolata font</a>!</p>
<p>i&#8217;m happy! oh, just in case, here&#8217;s my .emacs after a heavy purge!</p>
<p><a href="http://leitecarvalho.com/files_pub/.emacs">.emacs</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=107&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2010/08/07/make-emacs-pretty-with-beautiful-best-fonts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2010/08/ss_emacs-all-3.jpg?w=203" medium="image">
			<media:title type="html">Pretty emacs with beautiful fonts</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2010/08/ss_emacs-all-1.png?w=235" medium="image">
			<media:title type="html">Pretty emacs with beautiful fonts</media:title>
		</media:content>
	</item>
		<item>
		<title>How to change sound from two sound cards</title>
		<link>http://freethegnu.wordpress.com/2010/04/14/how-to-change-sound-from-two-sound-cards/</link>
		<comments>http://freethegnu.wordpress.com/2010/04/14/how-to-change-sound-from-two-sound-cards/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 17:29:15 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[soundcards]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=86</guid>
		<description><![CDATA[I have two sound cards. One is the inboard and the other is a USB card. I&#8217;m toggling often between them so i created this simple script: (see the end for link to files) #!/bin/bash dir=/home/username/ if [[ "$1" = "-l" ]] &#124;&#124; [[ ! -n "$1" ]]; then cat /proc/asound/cards exit fi card=`grep "^ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=86&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have two sound cards. One is the inboard and the other is a USB card.</p>
<p><a href="http://freethegnu.files.wordpress.com/2010/04/ss_freethegnu1.png"><img src="http://freethegnu.files.wordpress.com/2010/04/ss_freethegnu1.png?w=300&#038;h=102" alt="" title="ss_freethegnu1" width="300" height="102" class="alignnone size-medium wp-image-103" /></a></p>
<p>I&#8217;m toggling often between them so i created this simple script: (see the end for link to files)</p>
<blockquote><p><code><br />
#!/bin/bash<br />
<span style="color:#ff0000;">dir=/home/username/</span><br />
if [[ "$1" = "-l" ]] || [[ ! -n "$1" ]]; then<br />
cat /proc/asound/cards<br />
exit<br />
fi<br />
card=`grep "^ $1" /proc/asound/cards`<br />
echo "Changing to sound card $card"<br />
ln -fs $dir.asoundrc_"$1"0 $dir.asoundrc<br />
</code></p></blockquote>
<p>The <code>dir</code> variable has to be changed to the user&#8217;s name.<br />
This script moves around the .asoundrc files. there&#8217;s one for each card available or for each card used:</p>
<h1>Example:</h1>
<p>i have 4 entries in /proc/asound/cards:</p>
<blockquote><p><code><br />
0 [VirMIDI        ]: VirMIDI - VirMIDI<br />
Virtual MIDI Card 1<br />
1 [NVidia         ]: HDA-Intel - HDA NVidia<br />
HDA NVidia at 0xfbf78000 irq 21<br />
2 [hercdjrmx0     ]: hdj_mod - Hercules DJ Console RMX<br />
Hercules Hercules DJ Console RMX at usb-0000:00:04.0-1, full speed<br />
3 [RMX            ]: USB-Audio - Hercules DJ Console RMX<br />
Hercules Hercules DJ Console RMX at usb-0000:00:04.0-1, full speed<br />
</code></p></blockquote>
<p>so i have <code>.asoundrc_00</code> , <code>.asoundrc_10</code> , <code>.asoundrc_20</code> and <code>.asoundrc_30</code></p>
<p>this is the basic model: (for sound card 1)</p>
<blockquote><p><code><br />
# File: ~/.asoundrc (nvidia nforce setup)<br />
pcm.!default {<br />
type plug<br />
slave.pcm "dmixer"<br />
}<br />
pcm.dsp0 {<br />
type plug<br />
slave.pcm "dmixer"<br />
}<br />
pcm.dmixer {<br />
type dmix<br />
ipc_key 1024<br />
slave {<br />
<span style="color:#ff0000;">pcm "hw:1,0"</span><br />
period_time 0<br />
period_size 1024<br />
buffer_size 8192<br />
rate 48000   #many new cards are 48000 only<br />
}<br />
bindings {<br />
0 0<br />
1 1<br />
}<br />
}<br />
ctl.dmixer {<br />
type hw<br />
<span style="color:#33cccc;">card NVidia<br />
#    card RMX</span><br />
}<br />
#end.<br />
# for 5.1 speakers<br />
pcm.ch51dup {<br />
slave.pcm surround51<br />
slave.channels 6<br />
type route<br />
ttable.0.0 1<br />
ttable.1.1 1<br />
ttable.0.2 1<br />
ttable.1.3 1<br />
ttable.0.4 0.5<br />
ttable.1.4 0.5<br />
ttable.0.5 0.5<br />
ttable.1.5 0.5<br />
}</code></p></blockquote>
<p>Then i just have to create the other 3 files changing the line in red to <span style="color:#ff0000;">pcm &#8220;hw:0,0</span><span style="color:#ff0000;">&#8220;</span> <em>(for sound card 0), <span style="color:#ff0000;"> </span></em><span style="color:#ff0000;">pcm &#8220;hw:2,0&#8243;</span> <em> (for sound card 2) </em>and <span style="color:#ff0000;">pcm &#8220;hw:3,0&#8243;</span> <em>(for sound card 3)</em></p>
<p>The lines in blue can be changed too, but i&#8217;ve found that they are ignored. After a reboot, the ordering of the cards might change so its useful to have a file for each slot.</p>
<h1>Installing</h1>
<p>The <code>.asoundrc*</code> files are placed in the user&#8217;s home directory<br />
The script goes to <code>/usr/local/bin</code>.</p>
<h1>files needed</h1>
<ul>
<li><a href="http://leitecarvalho.com/files_pub/.asoundrc_00"> .asoundrc_00</a></li>
<li><a href="http://leitecarvalho.com/files_pub/.asoundrc_10"> .asoundrc_10</a></li>
<li><a href="http://leitecarvalho.com/files_pub/.asoundrc_20"> .asoundrc_20</a></li>
<li><a> .asoundrc_30</a></li>
<li><a href="http://leitecarvalho.com/files_pub/chsnd"> chsnd</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=86&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2010/04/14/how-to-change-sound-from-two-sound-cards/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>

		<media:content url="http://freethegnu.files.wordpress.com/2010/04/ss_freethegnu1.png?w=300" medium="image">
			<media:title type="html">ss_freethegnu1</media:title>
		</media:content>
	</item>
		<item>
		<title>making gentoo portage more quiet without showing preverved libs and installed masked packages</title>
		<link>http://freethegnu.wordpress.com/2010/02/02/making-gentoo-portage-more-quiet-without-showing-preverved-libs-and-installed-masked-packages/</link>
		<comments>http://freethegnu.wordpress.com/2010/02/02/making-gentoo-portage-more-quiet-without-showing-preverved-libs-and-installed-masked-packages/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 21:00:13 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[emerge]]></category>
		<category><![CDATA[libs]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[portage]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=74</guid>
		<description><![CDATA[Well, it was one of those days drifting from trying to do one thing, and ending fixing the core system. emerge been having alot of output lately, and its extra verbosity was driving me mad. First, showing the preserved-libs takes alot of time. Second, now i have always have to scroll up to check if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=74&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, it was one of those days drifting from trying to do one thing, and ending fixing the core system.</p>
<p>emerge been having alot of output lately, and its extra verbosity was driving me mad.</p>
<p>First, <strong>showing</strong> the preserved-libs takes alot of time.<br />
Second, now i have always have to scroll up to check if the emerge succeed , for emerge warnings bout the packages and whatnot.</p>
<p>The other annoying thing is it warning me that are installed packages that are currently masked for one reason or the other by the maintainers.</p>
<p>&#8230; and then proceed to list them all, completely unrelated to the package being emerged.</p>
<p>so that was my itch. i&#8217;ve scratched not sure if i tore up anything vital :D</p>
<p>it was built against portage-2.2_r61<br />
(note: the following code might be broken due to wordpress weirdness)<br />
<code><br />
--- portage-2.2_rc61_new/pym/_emerge/main.py    2010-02-02 07:18:02.000000000 +0000<br />
+++ portage-2.2_rc61_mod/pym/_emerge/main.py    2010-02-02 05:15:09.000000000 +0000<br />
@@ -73,6 +73,7 @@ options=[<br />
"--unordered-display",<br />
"--update",<br />
"--verbose",<br />
+"--show-preserved",<br />
]<br />
</code><br />
<code><br />
shortmapping={<br />
@@ -214,13 +215,12 @@ def display_preserved_libs(vardbapi, myo<br />
vardbapi.plib_registry.pruneNonExisting()<br />
</code><br />
<code><br />
if vardbapi.plib_registry.hasEntries():<br />
-               if "--quiet" in myopts:<br />
+               if "--show-preserved" in myopts:<br />
print()<br />
-                       print(colorize("WARN", "!!!") + " existing preserved libs found")<br />
-                       return<br />
+                       print(colorize("WARN", "!!!") + " existing preserved libs:")<br />
else:<br />
print()<br />
-                       print(colorize("WARN", "!!!") + " existing preserved libs:")<br />
+                       print(colorize("WARN", "!!!") + " existing preserved libs found")<br />
return<br />
</code><br />
<code><br />
plibdata = vardbapi.plib_registry.getPreservedLibs()<br />
--- portage-2.2_rc61_new/pym/_emerge/depgraph.py        2010-02-02 07:18:02.000000000 +0000<br />
+++ portage-2.2_rc61_mod/pym/_emerge/depgraph.py        2010-02-02 05:15:14.000000000 +0000<br />
@@ -4908,12 +4908,12 @@ class depgraph(object):<br />
pkg.cpv, pkg.metadata, mreasons))<br />
if masked_packages:<br />
writemsg("\n" + colorize("BAD", "!!!") + \<br />
-                               " The following installed packages are masked:\n",<br />
+                               " There are some installed packages currently masked!\n",<br />
noiselevel=-1)</code><br />
<code><br />
-                       show_masked_packages(masked_packages)<br />
-                       show_mask_docs()<br />
-                       writemsg("\n", noiselevel=-1)<br />
+#                      show_masked_packages(masked_packages)<br />
+#                      show_mask_docs()<br />
+#                      writemsg("\n", noiselevel=-1)<br />
</code><br />
<code><br />
def saveNomergeFavorites(self):</p>
<p></code><br />
i hope it helps.</p>
<p>note that there&#8217;s a new flag &#8220;&#8211;show-preserved&#8221; that.. well.. makes it show the preserved libs.<br />
After that, <strong>lafilefixer</strong> will try to fix any semi-broken .la files, deleted or hanging around.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=74&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2010/02/02/making-gentoo-portage-more-quiet-without-showing-preverved-libs-and-installed-masked-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>
	</item>
		<item>
		<title>how to fix firefox hanging every few seconds</title>
		<link>http://freethegnu.wordpress.com/2010/01/03/how-to-fix-firefox-hanging-every-few-seconds/</link>
		<comments>http://freethegnu.wordpress.com/2010/01/03/how-to-fix-firefox-hanging-every-few-seconds/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 05:25:47 +0000</pubDate>
		<dc:creator>Pedro Carvalho</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[affinity]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[mask]]></category>
		<category><![CDATA[taskset]]></category>

		<guid isPermaLink="false">http://freethegnu.wordpress.com/?p=60</guid>
		<description><![CDATA[Every x seconds, my firefox (built from sources) hangs for a few seconds (but the other applications keep running smothly). Seems that my firefox (i didn&#8217;t tried using the binary) isn&#8217;t very keen on multithreading. By default it has: $ taskset -c -p firefoxpid pid 29964's current affinity list: 0,1 To find firefox&#8217;s pid do: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=60&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Every x seconds, my firefox (built from sources) hangs for a few seconds (but the other applications keep running smothly).</p>
<p>Seems that my firefox (i didn&#8217;t tried using the binary) isn&#8217;t very keen on multithreading.<br />
By default it has:</p>
<p><code>$ taskset -c -p firefoxpid<br />
pid 29964's current affinity list: 0,1</code></p>
<p>To find firefox&#8217;s pid do:</p>
<p><code>$ ps -eo pid,comm | grep firefox<br />
29964 firefox</code></p>
<p>So, firefoxpid is 29964, only in this case (pid varies). I needed to do this:</p>
<p><code>taskset -c -p 0 29964</code></p>
<p>with -c 0 (&lt;&#8211; that&#8217;s a zero) the affinity mask is set to 1, so firefox only is allowed to use one cpu.<br />
Take note of the parameters ordering: first the flags ( -c -p ) them the values ( &lt;affinity list&gt; &lt;pid&gt; )</p>
<p>the cpu id:<br />
<code>$ taskset -c -p firefoxpid<br />
pid 29964's current affinity list: 0</code></p>
<p>the number of cpu&#8217;s allowed:<br />
<code>$ taskset -p firefoxpid<br />
pid 29964's current affinity mask: 1</code></p>
<p>If firefox is to start from the beginning restricted,  it can be launched like:</p>
<p><code>taskset -c 0 firefox</code></p>
<p>That should lessen the hangings. In my case, javascript still hanged a bit.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/freethegnu.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/freethegnu.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/freethegnu.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/freethegnu.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/freethegnu.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/freethegnu.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/freethegnu.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/freethegnu.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/freethegnu.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/freethegnu.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/freethegnu.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/freethegnu.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/freethegnu.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/freethegnu.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=freethegnu.wordpress.com&amp;blog=1249929&amp;post=60&amp;subd=freethegnu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://freethegnu.wordpress.com/2010/01/03/how-to-fix-firefox-hanging-every-few-seconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3068790f76eb2dcd8c434f88f9bfbb71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pedrocarvalho</media:title>
		</media:content>
	</item>
	</channel>
</rss>
