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

<channel>
	<title>MadSoft &#187; Linux</title>
	<atom:link href="http://www.madsoft.org/topics/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.madsoft.org</link>
	<description></description>
	<lastBuildDate>Sat, 12 Dec 2009 20:47:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Configuring the PlayStation 3 Controller on Linux</title>
		<link>http://www.madsoft.org/2008/12/16/configuring-the-playstation-3-controller-on-linux/</link>
		<comments>http://www.madsoft.org/2008/12/16/configuring-the-playstation-3-controller-on-linux/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 03:24:24 +0000</pubDate>
		<dc:creator>Alec Hussey</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[playstation]]></category>
		<category><![CDATA[ps3]]></category>

		<guid isPermaLink="false">http://www.madsoft.org/?p=65</guid>
		<description><![CDATA[A couple of months ago I stumbled upon a slew of information related to using the PS3 controller as a joystick on Linux. I immediately took my PS3 controller and started experimenting with the documentation out there for doing this sort of thing. Unfortunately however, not everything mentioned in this documentation worked correctly. For instance, [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of months ago I stumbled upon a slew of information related to using the PS3 controller as a joystick on Linux. I immediately took my PS3 controller and started experimenting with the documentation out there for doing this sort of thing. Unfortunately however, not everything mentioned in this documentation worked correctly. For instance, I was not able to use a joystick on the controller to control the mouse without a separate piece of middleware. This was because the application I used (the only decent one I was able to find) to signal key presses for every button press on the controller, is unmaintained and had a blocker bug with mouse emulation.</p>
<p>You will need two components in order to make this work: the first being QJoyPad to bind controller buttons to keys, and JoyMouse to use one of the joysticks on the controller to control the mouse. Also remember that I am only using the USB cable to use the controller rather than using it via Bluetooth. I will post directions for using Bluetooth and the accelerometers in the controller at a later date, if I am able to get a hold of a Bluetooth adapter. Nevertheless, the tools are the same.</p>
<p><span id="more-65"></span>Because QJoyPad is currently unmaintained, and the packages available from their site are out of date; we will need to compile from source. The first thing we need to do is install dependencies:</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libqt3-mt-dev libxtst-dev</pre></div></div>

</blockquote>
<p>Then download the tarball <a href="http://downloads.sourceforge.net/qjoypad/qjoypad-3.4.1.tgz" target="_blank">from here</a>, extract it, and compile as usual.</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>Desktop<span style="color: #000000; font-weight: bold;">/</span>qjoypad-3.4.1<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</blockquote>
<p>Before we can get started with QJoyPad; we need to first plug in the controller and make sure that it&#8217;s being recognized by Linux. First make sure that your PlayStation 3 is completely turned off (via the switch in the back). Then plug the one end of the USB cable into the computer, but leave it unplugged from the controller. Hit the PS button to activate the controller and the red LED&#8217;s on the top will start to blink. Now plug the USB cable into the controller and verify that it has been recognized.</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">maddog39<span style="color: #000000; font-weight: bold;">@</span>desktop:~$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>input <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> js
js0</pre></div></div>

</blockquote>
<p>Though take note to the device name of the controller (/dev/input/js0 in my case) as we will need to use this later. Now we can start to configure the buttons on the controller and assign them to keyboard keystrokes. When you launch QJoyPad (via the qjoypad command as no Applications menu item is provided), click on it&#8217;s tray icon and the button editor will appear.</p>
<p><a href="http://www.madsoft.org/wp-content/uploads/2008/12/qjoypad_main.png"><img class="alignnone size-medium wp-image-72" title="qjoypad_main" src="http://www.madsoft.org/wp-content/uploads/2008/12/qjoypad_main-127x300.png" alt="" width="127" height="300" /></a></p>
<p>The first thing you will want to do is create a new layout. Simply click Add at the top of the window and enter a label for your layout. You can see which controller buttons correspond to buttons in QJoyPad by pressing or holding the button you want to modify as it will appear highlighted in blue when its activated. To assign a keypress to any button or axis, click the button or axis you want to modify and a dialog will appear, then click [NO KEY] and hit the key you want to assign.</p>
<p>In order to be able to use either of the PS3 controller&#8217;s joysticks as mice, we need to install JoyMouse which can be downloaded <a href="http://sourceforge.net/project/showfiles.php?group_id=102618" target="_blank">here</a>. Its a really simple program and as far as I know it doesnt have any dependencies so you should be good with a standard build. Extract the tarball to your desktop and open a terminal in the JoyMouse directory.</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>Desktop<span style="color: #000000; font-weight: bold;">/</span>joymouse-<span style="color: #000000;">0.5</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</blockquote>
<p>Once JoyMouse is installed, we need to modify our xorg.conf to add a new pointer device.</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>X11<span style="color: #000000; font-weight: bold;">/</span>xorg.conf</pre></div></div>

</blockquote>
<p>Now go to the end of the file and you will want to insert the following lines.</p>
<blockquote>
<pre>Section "InputDevice"
        Identifier   "Joystick"
        Driver       "mouse"
        Option      "Protocol"     "ExplorerPS/2"
        Option      "Device"     "/dev/joymouse"
        Option      "SendCoreEvents"     "true"
        Option      "ZAxisMapping"    "4 5 6 7"
EndSection</pre>
</blockquote>
<p>Then go back up to the &#8220;ServerLayout&#8221; section of the file and in that section under your mouse input device, insert the following line.</p>
<blockquote>
<pre>InputDevice "Joystick"</pre>
</blockquote>
<p>When your finished, Ctrl+O, Enter, then Ctrl+X to save and exit. Now heres the thing; in order for this to work we need to create a pipe using the mkfifo command, but it needs to always be there for JoyMouse to work. The problem is that these pipes are not retained over reboots: meaning that you have to recreate them everytime you want to use JoyMouse. I have also read that if the pip does not exist, it may cause Xorg to fail to start. I have yet to find a good solution to this problem, but for now manual will have to do.</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkfifo</span> <span style="color: #660033;">-m</span> 0777 <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>joymouse</pre></div></div>

</blockquote>
<p>Running the JoyMouse program is fairly simple, just keep in mind that when you assign axes, they are always in order. So for example, if you wanted to use the right joystick as your mouse you would use the following.</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">joymouse <span style="color: #660033;">-M</span> - <span style="color: #660033;">-M</span> - <span style="color: #660033;">-M</span> x <span style="color: #660033;">-M</span> y</pre></div></div>

</blockquote>
<p>We ignored (using a dash) the first two axes as those are left/right and up/down for the left joystick and assigned X and Y to the left/right and up/down on the right joystick respectively. However, if you wanted to use the left joystick as the mouse, the command would read like this.</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">joymouse <span style="color: #660033;">-M</span> x <span style="color: #660033;">-M</span> y</pre></div></div>

</blockquote>
<p>If you would like, you could add this joymouse command to your GNOME (or whatever desktop environment you prefer) startup programs. In GNOME this would be: System &gt; Preferences &gt; Sessions &gt; Startup Programs. But as mentioned earlier, remember that you need the /dev/joymouse pipe to exist first. After that, your done. Test out the controller with several different games and or applications and tweak the settings to your liking.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madsoft.org/2008/12/16/configuring-the-playstation-3-controller-on-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SETI@Home Optimizers on Linux</title>
		<link>http://www.madsoft.org/2008/09/28/setihome-optimizers-on-linux/</link>
		<comments>http://www.madsoft.org/2008/09/28/setihome-optimizers-on-linux/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 07:13:01 +0000</pubDate>
		<dc:creator>Alec Hussey</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[boinc]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[optimized]]></category>
		<category><![CDATA[seti]]></category>
		<category><![CDATA[setiathome]]></category>

		<guid isPermaLink="false">http://www.madsoft.org/?p=45</guid>
		<description><![CDATA[As I am a big proponent of the SETI@Home project as well as a Linux user, discovering that optimized SETI applications existed and how to use them was important. It took quite some time to figure this all out by myself since there are hardly any (from what I could find) resources on SETI@Home optimized [...]]]></description>
			<content:encoded><![CDATA[<p>As I am a big proponent of the SETI@Home project as well as a Linux user, discovering that optimized SETI applications existed and how to use them was important. It took quite some time to figure this all out by myself since there are hardly any (from what I could find) resources on SETI@Home optimized clients on Linux. Eventually I ran into <a href="http://lunatics.kwsn.net/" target="_blank">this</a> site which offers SSE3 and SSSE3 optimized clients for Linux in addition to SSE, SSE2, and SSE3 clients for FreeBSD.</p>
<p>For those of you who don&#8217;t know what SETI@Home optimizers are, they are essentially specialized versions of the standard version of the SETI@Home client which take advantage of extended floating-point instruction sets available to certain x86 (Intel, AMD, or the like) processors. Using these instruction sets allows optimized clients to complete work many times faster than it could before with the standard client. For example, prior to using an SSSE3 optimized client on my Intel Core 2 Quad Q6600 my recent average credit (RAC) on SETI was in the 500 range including one other active machine and now my RAC has spiked over 2,500 not including the other active machine.</p>
<p><span id="more-45"></span>Before we get started, you should make sure that all other active work units you have running are completed before replacing the standard client with an optimized one. Then you may choose which optimize client you will run. Keep in mind that currently, only Intel Core 2 based CPUs and a single VIA CPU are capable of running SSSE3 instructions. For more details on this you should refer to the <a href="http://en.wikipedia.org/wiki/SSSE3" target="_blank">SSSE3 wikipedia page</a>. Otherwise, you will likely be able to run an SSE3 optimized client, unless your CPU is more than several years old, also <a href="http://en.wikipedia.org/wiki/SSE3" target="_blank">refer to wikipedia</a> for more information on this. If you&#8217;ve got an even older CPU, there are also clients for MMX, SSE, and SSE2.</p>
<p>Optionally you may check which instruction sets are supported by your CPU using the following command:</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>maddog39<span style="color: #000000; font-weight: bold;">@</span>desktop ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>cpuinfo <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> flags <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span>
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm</pre></div></div>

</blockquote>
<p>First thing we want to do is download the client for your respective CPU and kernel version (most likely SSE3 or SSSE3 and kernel 2.6) from <a href="http://lunatics.kwsn.net/discussion-forum/linux-port-of-alex-kans-v8-0.msg8200.html;topicseen#msg8200" target="_blank">this</a> page and extract the tarball. If your using an older CPU requiring an older instruction set, see <a href="http://lunatics.kwsn.net/index.php?module=Downloads;catd=1" target="_blank">this</a> page instead.</p>
<p>Before we actually drop in the optimized client, its probably best to suspend the SETI@Home project in BOINC for safe measure.</p>
<p><a href="http://www.madsoft.org/wp-content/uploads/2008/09/boinc_seti_suspend.png"><img class="alignnone size-full wp-image-54" title="Suspend SETI@Home" src="http://www.madsoft.org/wp-content/uploads/2008/09/boinc_seti_suspend.png" alt="" width="500" height="193" /></a></p>
<p>Now we get to physically install our new SETI@Home optimizer. In the folder you extracted from the tarball, you should find a binary (executable) and an app_info.xml file, either in the folder&#8217;s top directory or in a subsequent sub-folder.</p>
<p><a href="http://www.madsoft.org/wp-content/uploads/2008/09/seti_optimizer_extracted.png"><img class="alignnone size-full wp-image-55" title="Extraced Optimizer Files" src="http://www.madsoft.org/wp-content/uploads/2008/09/seti_optimizer_extracted.png" alt="" width="500" height="342" /></a></p>
<p>You want to copy these files and launch nautilus (or your file manager of choice) as root and point it to the /var/lib/boinc folder. Hit Alt+F2 to bring up a run dialog and enter the command:</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gksudo nautilus <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>boinc<span style="color: #000000; font-weight: bold;">/</span>projects<span style="color: #000000; font-weight: bold;">/</span>setiathome.berkeley.edu</pre></div></div>

</blockquote>
<p><a href="http://www.madsoft.org/wp-content/uploads/2008/09/run_nautilus_root_boinc_fixed.png"><img class="alignnone size-full wp-image-60" title="Run Nautilus as Root" src="http://www.madsoft.org/wp-content/uploads/2008/09/run_nautilus_root_boinc_fixed.png" alt="" width="461" height="179" /></a></p>
<p>Paste the optimizer files into the directory and when comes up. Finally, you will need to restart the BOINC daemon. On my distribution, Arch Linux its:</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>boinc restart</pre></div></div>

</blockquote>
<p>Although if you are using Ubuntu, Debian, or a derivative its:</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>boinc restart</pre></div></div>

</blockquote>
<p>Then, to start using your new SETI optimized client, you simply launch BOINC manager and resume the SETI@Home project. It should start downloading new workunits immediatley and your in business. I hope you found this article useful and keep in mind that I tried to keep it as easy as possible for the newer Linux users out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.madsoft.org/2008/09/28/setihome-optimizers-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
