<?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>Steven Harms</title>
	<atom:link href="http://www.sharms.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sharms.org/blog</link>
	<description>Life, Linux and Technology</description>
	<lastBuildDate>Tue, 24 Aug 2010 18:25:04 +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>Terminator color palettes</title>
		<link>http://www.sharms.org/blog/2010/08/terminator-color-palettes/</link>
		<comments>http://www.sharms.org/blog/2010/08/terminator-color-palettes/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 18:25:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=757</guid>
		<description><![CDATA[Bored of the normal everyday terminal colors? These can be easily changed by right clicking on the terminal window, clicking preferences and changing the colors: You can see how my terminal colors are different than standard: If you want to know where this information is stored on your filesystem: #!/bin/bash cat ~/.config/terminator/config My current palette: [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2008/11/workspaces/' rel='bookmark' title='Permanent Link: Workspaces'>Workspaces</a></li>
<li><a href='http://www.sharms.org/blog/2007/03/making-openbsd-more-friendly/' rel='bookmark' title='Permanent Link: Making OpenBSD more friendly'>Making OpenBSD more friendly</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Bored of the normal everyday terminal colors?  These can be easily changed by right clicking on the terminal window, clicking preferences and changing the colors:</p>
<p><a href="http://www.sharms.org/blog/wp-content/uploads/2010/08/terminator-2.jpg"><img src="http://www.sharms.org/blog/wp-content/uploads/2010/08/terminator-2.jpg" alt="" title="terminator-2" width="737" height="542" class="alignnone size-full wp-image-758" /></a></p>
<p>You can see how my terminal colors are different than standard:</p>
<p><a href="http://www.sharms.org/blog/wp-content/uploads/2010/08/terminator-1.jpg"><img src="http://www.sharms.org/blog/wp-content/uploads/2010/08/terminator-1.jpg" alt="" title="terminator-1" width="686" height="390" class="alignnone size-full wp-image-759" /></a></p>
<p>If you want to know where this information is stored on your filesystem:</p>
<pre class="brush: sh">
#!/bin/bash
cat ~/.config/terminator/config
</pre>
<p>My current palette:</p>
<pre class="brush: sh">
palette = &quot;#2e3436:#cc0000:#4e9a06:#c4a000:#c48dff:#75507b:#06989a:#d3d7cf:#555753:#e52222:#a6e32d:#fc951e:#3465a4:#fa2573:#67d9f0:#f2f2f2&quot;
</pre>
<p>The same can be done for gnome-terminal, but that stores it&#8217;s defaults in gconf.  You can retrieve them using gconftool-2:</p>
<pre class="brush: sh">
#!/bin/bash
gconftool-2 --all-entries /apps/gnome-terminal/profiles/Default
</pre>
<p>This is fun as these colors carry over into Vim etc, so when you are not using the graphical versions, you can still spice up your syntax highlighting.</p>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2008/11/workspaces/' rel='bookmark' title='Permanent Link: Workspaces'>Workspaces</a></li>
<li><a href='http://www.sharms.org/blog/2007/03/making-openbsd-more-friendly/' rel='bookmark' title='Permanent Link: Making OpenBSD more friendly'>Making OpenBSD more friendly</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/08/terminator-color-palettes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stylish desktop, new search engines</title>
		<link>http://www.sharms.org/blog/2010/08/stylish-desktop-new-search-engines/</link>
		<comments>http://www.sharms.org/blog/2010/08/stylish-desktop-new-search-engines/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 16:28:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=750</guid>
		<description><![CDATA[My Desktop Read Seif&#8217;s post on his desktop, so I copied most of that style (original post) : I actually enabled compiz for the first time in a long time, and AMD&#8217;s linux drivers have come a long way since my critical posts a few years ago about them. Great to see the whole stack [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2007/04/looking-for-help/' rel='bookmark' title='Permanent Link: Looking for help'>Looking for help</a></li>
<li><a href='http://www.sharms.org/blog/2008/05/using-ssh-to-access-internal-network-sites-from-an-external-network/' rel='bookmark' title='Permanent Link: Using SSH to access internal network sites from an external network'>Using SSH to access internal network sites from an external network</a></li>
<li><a href='http://www.sharms.org/blog/2009/03/make-your-bash-shell-cool-again/' rel='bookmark' title='Permanent Link: Make your bash shell cool again'>Make your bash shell cool again</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>My Desktop</strong><br />
Read Seif&#8217;s post on his desktop, so I copied most of that style (<a href="http://seilo.geekyogre.com/2010/08/my-sexy-desktop/">original post</a>) :</p>
<p><a href="http://www.sharms.org/img/desktop-aug142010/desktop-full.png"><img src="http://www.sharms.org/img/desktop-aug142010/desktop-small.jpg" alt="Desktop" /></a></p>
<p>I actually enabled compiz for the first time in a long time, and AMD&#8217;s linux drivers have come a long way since my critical posts a few years ago about them.  Great to see the whole stack improving.</p>
<p><strong>Default Search Engine</strong><br />
This week I switched over my default search engine to <a href="http://www.duckduckgo.com">Duck Duck Go</a>.</p>
<p><a href="http://www.sharms.org/blog/wp-content/uploads/2010/08/nduck.v104.png"><br />
<img src="http://www.sharms.org/blog/wp-content/uploads/2010/08/nduck.v104.png" alt="" title="nduck.v104" width="200" height="132" class="alignnone size-full wp-image-751" /></a></p>
<p>I really like it&#8217;s clean interface, and their attention to privacy and technology enthusiasm.</p>
<p><strong>New Home Page</strong><br />
In addition, I updated<a href="http://www.sharms.org"> my generic landing page</a> using Python / <a href="http://flash.pocoo.org">Flask</a> to pull feeds etc, I really like the simplicity of Flask and the well thought out design / documentation.  I also published the source on github.</p>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2007/04/looking-for-help/' rel='bookmark' title='Permanent Link: Looking for help'>Looking for help</a></li>
<li><a href='http://www.sharms.org/blog/2008/05/using-ssh-to-access-internal-network-sites-from-an-external-network/' rel='bookmark' title='Permanent Link: Using SSH to access internal network sites from an external network'>Using SSH to access internal network sites from an external network</a></li>
<li><a href='http://www.sharms.org/blog/2009/03/make-your-bash-shell-cool-again/' rel='bookmark' title='Permanent Link: Make your bash shell cool again'>Make your bash shell cool again</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/08/stylish-desktop-new-search-engines/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using Apache to decrypt SSL pages</title>
		<link>http://www.sharms.org/blog/2010/07/using-apache-to-decrypt-ssl-pages/</link>
		<comments>http://www.sharms.org/blog/2010/07/using-apache-to-decrypt-ssl-pages/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 18:50:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=744</guid>
		<description><![CDATA[Although you should almost never have a decent rationale for doing this, at some point I needed to do it, and documentation was scarce. The basic idea is we have a website &#8211; https://www.securewebsite.com and our clients cannot use https (ssl), so we need to decrypt it to http for them. In order to accomplish [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Although you should almost never have a decent rationale for doing this, at some point I needed to do it, and documentation was scarce.  The basic idea is we have a website &#8211; <em>https://www.securewebsite.com</em> and our clients cannot use https (ssl), so we need to decrypt it to http for them.  </p>
<p>In order to accomplish this, Apache 2.x is needed, along with mod_ssl and mod_proxy.  Here is the magic:</p>
<pre class="brush: xml">
&lt;VirtualHost virtualhostipaddress:443&gt;
        SSLProxyEngine on
        #SSLProxyCACertificateFile /etc/apache2/ssl/google.crt
        SSLEngine on
        RequestHeader set Front-End-Https &quot;On&quot;
        ServerName testing

        #SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
        SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
        SSLCertificateFile /etc/apache2/ssl.crt
        SSLCertificateKeyFile /etc/apache2/ssl.key
        #LogLevel debug

        ErrorLog /var/log/apache2/ssl_proxy_error.log
        CustomLog /var/log/apache2/ssl_proxy_access.log combined

        &lt;Proxy *&gt;
                Order deny,allow
                Allow from all
        &lt;/Proxy&gt;

        ProxyVia On
        ProxyRequests Off
        ProxyPreserveHost Off
        ProxyPass / https://www.securewebsite.com:443/
        ProxyPassReverse / https://www.securewebsite.com:443/

        #SetEnvIf User-Agent &quot;.*MSIE.*&quot; nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
        BrowserMatch &quot;MSIE [1-4]&quot; nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
        BrowserMatch &quot;MSIE [5-9]&quot; ssl-unclean-shutdown
&lt;/VirtualHost&gt;
</pre>
<p>Obviously replace <b>virtualhostipaddress</b> with the ip you want to bind to and <b>securewebsite.com</b> with the actual website.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/07/using-apache-to-decrypt-ssl-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux guru needed</title>
		<link>http://www.sharms.org/blog/2010/07/linux-guru-needed/</link>
		<comments>http://www.sharms.org/blog/2010/07/linux-guru-needed/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 19:22:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=740</guid>
		<description><![CDATA[I have another position open, it&#8217;s a contract position for 3 months atleast. Pays great, will need to come onsite to Cincinnati. Skills we need: Administration &#8211; familiar with Apache / SSL / SSH / Kickstart or autoyast / rsync / hardening etc Virtualization &#8211; xen RPM creation Perl (Catalyst is a plus) PHP (Symfony [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2010/02/looking-for-someone-to-give-me-a-hand/' rel='bookmark' title='Permanent Link: Looking for someone to give me a hand'>Looking for someone to give me a hand</a></li>
<li><a href='http://www.sharms.org/blog/2008/08/got-skills-email-me/' rel='bookmark' title='Permanent Link: Got skills?  Email me'>Got skills?  Email me</a></li>
<li><a href='http://www.sharms.org/blog/2007/06/novell-linux-client-on-ubuntu-redux/' rel='bookmark' title='Permanent Link: Novell Linux Client on Ubuntu redux'>Novell Linux Client on Ubuntu redux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have another position open, it&#8217;s a contract position for 3 months atleast.  Pays great, will need to come onsite to Cincinnati.</p>
<p><strong>Skills we need:</strong></p>
<ul>
<li>Administration &#8211; familiar with Apache / SSL / SSH / Kickstart or autoyast / rsync / hardening etc</li>
<li>Virtualization &#8211; xen</li>
<li>RPM creation</li>
<li>Perl (Catalyst is a plus)</li>
<li>PHP (Symfony is a plus)</li>
<li>Python (Django is a plus)</li>
<li>C</li>
<li>Compiling kernels, making slight adjustments to drivers etc</li>
<li>Thin client experience is a plus</li>
<li>Software distribution (ZLM / Altiris)</li>
<li>Bash scripting</li>
<li>Javascript / Jquery</li>
<li>HTML / CSS</li>
<li>Rest</li>
<li>XML / JSON / Yaml</li>
<li>Git / Bazaar / Svn</li>
<li>Having a github or launchpad account is a plus</li>
</ul>
<p>If you think you fit the bill email me ASAP as it is an immediate opening, and I will put you in touch with my HR department.  You can find my email through Launchpad or Google.</p>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2010/02/looking-for-someone-to-give-me-a-hand/' rel='bookmark' title='Permanent Link: Looking for someone to give me a hand'>Looking for someone to give me a hand</a></li>
<li><a href='http://www.sharms.org/blog/2008/08/got-skills-email-me/' rel='bookmark' title='Permanent Link: Got skills?  Email me'>Got skills?  Email me</a></li>
<li><a href='http://www.sharms.org/blog/2007/06/novell-linux-client-on-ubuntu-redux/' rel='bookmark' title='Permanent Link: Novell Linux Client on Ubuntu redux'>Novell Linux Client on Ubuntu redux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/07/linux-guru-needed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SLES 11 SP1 and Novell / SUSE Autoyast with Intel / Dell Raid Controllers</title>
		<link>http://www.sharms.org/blog/2010/07/sles-sp1-and-novell-suse-autoyast-with-intel-dell-raid-controllers/</link>
		<comments>http://www.sharms.org/blog/2010/07/sles-sp1-and-novell-suse-autoyast-with-intel-dell-raid-controllers/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 20:06:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=735</guid>
		<description><![CDATA[When using an Intel raid controller, you have two options: let the raid controller handle the raid, or run a linux software raid (md). If you want to run a linux software raid, and use autoyast, a prompt box will popup during the middle of the installation. This becomes a problem if you are imaging [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2009/09/sles-sled-10-with-intel-965-graphics/' rel='bookmark' title='Permanent Link: SLES / SLED 10 with Intel 965 Graphics'>SLES / SLED 10 with Intel 965 Graphics</a></li>
<li><a href='http://www.sharms.org/blog/2007/06/dell-d620-love/' rel='bookmark' title='Permanent Link: Dell D620 Love'>Dell D620 Love</a></li>
<li><a href='http://www.sharms.org/blog/2007/11/adventures-in-dual-head-for-dell-d620-with-intel/' rel='bookmark' title='Permanent Link: Adventures in 3D Dual Head for Dell D620 with intel'>Adventures in 3D Dual Head for Dell D620 with intel</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When using an Intel raid controller, you have two options: let the raid controller handle the raid, or run a linux software raid (md).  If you want to run a linux software raid, and use autoyast, a prompt box will popup during the middle of the installation.  This becomes a problem if you are imaging several thousand Linux systems.</p>
<p>Add this to your bootup options (in our case PXE config, but you can type it manually also from the installation CD prompt):</p>
<pre class="brush: sh">
libstorage_imsm_driver=mdadm
</pre>
<p>That is all there is to it.  To configure the rest of autoyast, you can check out Uwe Gansert&#8217;s website as he maintains it: <a href="http://www.suse.com/~ug/">http://www.suse.com/~ug/</a></p>
<p>Other hard to find resources when tracking these things down:</p>
<ul>
<li><a href="http://svn.opensuse.org/viewvc/yast/trunk">Yast2 SVN Repository</a></li>
<li><a href="http://gitorious.org/opensuse">OpenSUSE Git Repository</a></li>
</ul>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2009/09/sles-sled-10-with-intel-965-graphics/' rel='bookmark' title='Permanent Link: SLES / SLED 10 with Intel 965 Graphics'>SLES / SLED 10 with Intel 965 Graphics</a></li>
<li><a href='http://www.sharms.org/blog/2007/06/dell-d620-love/' rel='bookmark' title='Permanent Link: Dell D620 Love'>Dell D620 Love</a></li>
<li><a href='http://www.sharms.org/blog/2007/11/adventures-in-dual-head-for-dell-d620-with-intel/' rel='bookmark' title='Permanent Link: Adventures in 3D Dual Head for Dell D620 with intel'>Adventures in 3D Dual Head for Dell D620 with intel</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/07/sles-sp1-and-novell-suse-autoyast-with-intel-dell-raid-controllers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming using IOCTL to interface with Linux kernel drivers</title>
		<link>http://www.sharms.org/blog/2010/06/programming-using-ioctl-to-interface-with-linux-kernel-drivers/</link>
		<comments>http://www.sharms.org/blog/2010/06/programming-using-ioctl-to-interface-with-linux-kernel-drivers/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 19:14:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=721</guid>
		<description><![CDATA[IOCTL is a function call that allows you to interface with kernel drivers, allowing you to adjust settings or set parameters from code without compiling a new module. From a programming perspective, having the linux kernel source is a prerequisite. In this example, I cloned the main kernel: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux Once I had [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2009/07/programming-in-c-converting-an-integer-to-binary-int-to-bin/' rel='bookmark' title='Permanent Link: Programming in C: Converting an Integer to Binary (int to bin)'>Programming in C: Converting an Integer to Binary (int to bin)</a></li>
<li><a href='http://www.sharms.org/blog/2009/07/fun-stuff/' rel='bookmark' title='Permanent Link: MMap to null'>MMap to null</a></li>
<li><a href='http://www.sharms.org/blog/2008/12/why/' rel='bookmark' title='Permanent Link: Why?'>Why?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>IOCTL is a function call that allows you to interface with kernel drivers, allowing you to adjust settings or set parameters from code without compiling a new module.  </p>
<p>From a programming perspective, having the linux kernel source is a prerequisite.  In this example, I cloned the main kernel:</p>
<pre class="brush: sh">
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux
</pre>
<p>Once I had the source, I specifically wanted to see exactly how I could interface with the driver called <strong>usblp</strong>.  I was using a USB to parallel port converter, and wanted to see if there was any way to force it to operate differently as we needed a non-printer device to work with it.</p>
<p>After opening the kernel source, I found the driver file itself which was under <strong>/drivers/usb/class/usblp.c</strong>.  In this file I found a section of information about which IOCTLs it supported, and put them in a header file for my program called usblp-hack.h:</p>
<pre class="brush: c">
#ifndef USBLP_HACK_H
#define USBLP_HACK_H

#include &lt;linux/ioctl.h&gt;

/* ioctls: */
#define IOCNR_GET_DEVICE_ID     1
#define IOCNR_GET_PROTOCOLS     2
#define IOCNR_SET_PROTOCOL      3
#define IOCNR_HP_SET_CHANNEL        4
#define IOCNR_GET_BUS_ADDRESS       5
#define IOCNR_GET_VID_PID       6
#define IOCNR_SOFT_RESET        7
/* Get device_id string: */
#define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, &#039;P&#039;, IOCNR_GET_DEVICE_ID, len)
/* The following ioctls were added for http://hpoj.sourceforge.net: */
/* Get two-int array:
 * [0]=current protocol (1=7/1/1, 2=7/1/2, 3=7/1/3),
 * [1]=supported protocol mask (mask&amp;(1&lt;&lt;n)!=0 means 7/1/n supported): */
#define LPIOC_GET_PROTOCOLS(len) _IOC(_IOC_READ, &#039;P&#039;, IOCNR_GET_PROTOCOLS, len)
/* Set protocol (arg: 1=7/1/1, 2=7/1/2, 3=7/1/3): */
#define LPIOC_SET_PROTOCOL _IOC(_IOC_WRITE, &#039;P&#039;, IOCNR_SET_PROTOCOL, 0)
/* Set channel number (HP Vendor-specific command): */
#define LPIOC_HP_SET_CHANNEL _IOC(_IOC_WRITE, &#039;P&#039;, IOCNR_HP_SET_CHANNEL, 0)
/* Get two-int array: [0]=bus number, [1]=device address: */
#define LPIOC_GET_BUS_ADDRESS(len) _IOC(_IOC_READ, &#039;P&#039;, IOCNR_GET_BUS_ADDRESS, len)
/* Get two-int array: [0]=vendor ID, [1]=product ID: */
#define LPIOC_GET_VID_PID(len) _IOC(_IOC_READ, &#039;P&#039;, IOCNR_GET_VID_PID, len)
/* Perform class specific soft reset */
#define LPIOC_SOFT_RESET _IOC(_IOC_NONE, &#039;P&#039;, IOCNR_SOFT_RESET, 0)
#endif
</pre>
<p>There are plenty of hints on usage here, and I was able to grab a little more info after searching for some of those defines in google code search.  Using these IOCTLs I wanted to know exactly which modes the USB to parallel converter supported, and try to set it in mode 3, which I hoped would give me more options for talking to the device.</p>
<p>Here is my usblp-hack.c which was able to probe and update these settings, although in my case mode 3 didn&#8217;t work, but shows an example of exactly how to do it:</p>
<pre class="brush: c">
#include &quot;usblp-hack.h&quot;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;fcntl.h&gt;		/* open */
#include &lt;unistd.h&gt;		/* exit */
#include &lt;sys/ioctl.h&gt;		/* ioctl */

main()
{
	int fd;
	int twoints[2];

	fd = open(&quot;/dev/usblp0&quot;, O_RDONLY | O_NONBLOCK);
	if (fd &lt; 0) {
		printf(&quot;Cannot open device.\n&quot;);
		exit(-1);
	}

	if(ioctl(fd, LPIOC_GET_PROTOCOLS(sizeof(int[2])), &amp;twoints) &gt;= 0)
		printf(&quot;Great success: %d / %d\n&quot;, twoints[0], twoints[1]);
	else {
		printf(&quot;Fail!\n&quot;);
		exit(-1);
	}

	if(ioctl(fd, LPIOC_SET_PROTOCOL, 2) &gt;= 0)
		printf(&quot;set protocol to version 2\n&quot;);
	else {
		printf(&quot;Fail!\n&quot;);
		exit(-1);
	}

	if(ioctl(fd, LPIOC_GET_PROTOCOLS(sizeof(int[2])), &amp;twoints) &gt;= 0)
		printf(&quot;Great success: %d / %d\n&quot;, twoints[0], twoints[1]);
	else {
		printf(&quot;Fail!\n&quot;);
		exit(-1);
	}

	if(ioctl(fd, LPIOC_SOFT_RESET) &gt;= 0)
	{
		printf(&quot;Success reset device\n&quot;);
	} else {
		printf(&quot;Could not reset device\n&quot;);
		exit(-1);
	}

	close(fd);
	exit(0);
}
</pre>
<p>You can compile the above example just using gcc:</p>
<pre class="brush: sh">
gcc -o usblp-hack usblp-hack.c
</pre>
<p>You can see in the example above I was able to probe the device to see what mode it was currently in and supports (<strong>LPIOC_GET_PROTOCOLS</strong>), attempt to set the device mode (<strong>LPIOC_SET_PROTOCOL</strong>), and soft reset the device (<strong>LPIOC_SOFT_RESET</strong>).</p>
<p>So in the end, nothing here too complex or mind blowing, but if you are just getting your feet wet it might take you a minute to dig this sort of information up.</p>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2009/07/programming-in-c-converting-an-integer-to-binary-int-to-bin/' rel='bookmark' title='Permanent Link: Programming in C: Converting an Integer to Binary (int to bin)'>Programming in C: Converting an Integer to Binary (int to bin)</a></li>
<li><a href='http://www.sharms.org/blog/2009/07/fun-stuff/' rel='bookmark' title='Permanent Link: MMap to null'>MMap to null</a></li>
<li><a href='http://www.sharms.org/blog/2008/12/why/' rel='bookmark' title='Permanent Link: Why?'>Why?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/06/programming-using-ioctl-to-interface-with-linux-kernel-drivers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Java</title>
		<link>http://www.sharms.org/blog/2010/05/java/</link>
		<comments>http://www.sharms.org/blog/2010/05/java/#comments</comments>
		<pubDate>Thu, 27 May 2010 01:16:13 +0000</pubDate>
		<dc:creator>sharms</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=716</guid>
		<description><![CDATA[It has always been trendy to make fun of Java, and wax poetic about how superior someone&#8217;s language of choice is. The fact of the matter is, whether or not you wish to acknowledge it, more users run Java applications on Linux than any other language1. In the past few years, I have had the [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2008/12/64-bit-java-browser-plugin/' rel='bookmark' title='Permanent Link: 64-bit Java browser plugin'>64-bit Java browser plugin</a></li>
<li><a href='http://www.sharms.org/blog/2009/12/installing-play-framework-on-openbsd-4-6/' rel='bookmark' title='Permanent Link: Installing Play Framework on OpenBSD 4.6'>Installing Play Framework on OpenBSD 4.6</a></li>
<li><a href='http://www.sharms.org/blog/2006/12/run-your-java-apps-under-aiglx/' rel='bookmark' title='Permanent Link: Run your java apps under Aiglx'>Run your java apps under Aiglx</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It has always been trendy to make fun of Java, and wax poetic about how superior someone&#8217;s language of choice is. The fact of the matter is, whether or not you wish to acknowledge it, more users run Java applications on Linux than any other language<sup><a href="http://www.sharms.org/blog/2010/05/java/#footnote_0_716" id="identifier_0_716" class="footnote-link footnote-identifier-link" title="http://www.electronista.com/articles/10/05/26/admob.april.2010.study.has.android.near.even/">1</a></sup>.</p>
<p>In the past few years, I have had the opportunity to code multiple enterprise web applications in any language I chose.  I made a few in Symfony (php), Django (python), and recently I used Play (java).  All of them were fantastic frameworks and languages in their own respect (the only thing people make fun of more than Java is PHP, again generally baseless).</p>
<p>I have used vim for as long as I can remember, but for the Play project I switched over to Eclipse, and that was also a great IDE.  A lot of nice features where it would automated a lot of typing, and I found managing multiple files slightly easier.</p>
<p>Point being the language and the tools around it are there, well tested, and ready for prime time.  Given the right coder, they are just as effective as any of the trendy languages, and to dismiss that based on outright false statements on most comment threads is absurd.</p>
<p><strong>Performance:</strong> Java in no way, in any application I wrote, was limited by the language or jvm in performance.  This is generally affected entirely by the coder, not the language.</p>
<p><strong>Adoption:</strong>  Java is all over my business, and is the clear leader in the enterprise technology stack<sup><a href="http://www.sharms.org/blog/2010/05/java/#footnote_1_716" id="identifier_1_716" class="footnote-link footnote-identifier-link" title="http://www.forrester.com/rb/Research/of_strategic_languages%2C_javas_adoption_is_highest/q/id/37356/t/2">2</a></sup></p>
<p><strong>Tools:</strong> Tools for Java are abundant, feature rich, and more than adequate to develop complex projects</p>
<p><strong>Criticisms:</strong>  The only valid criticism is that Java apps are slow to load up initially, for user apps.  I think with the innovation we see with respect to JVM performance improvements (JIT compilation etc)<sup><a href="http://www.sharms.org/blog/2010/05/java/#footnote_2_716" id="identifier_2_716" class="footnote-link footnote-identifier-link" title="http://www.h-online.com/open/news/item/Android-s-Dalvik-to-be-JIT-boosted-861870.html">3</a></sup> continuously make that point not even legitimate, but clearly you can make applications load slowly.  With that in mind, I have the ability to write a C app that loads slow also.</p>
<p>This post more than anything is to encourage breaking the mold of the group think, <em>&#8220;None of us is as dumb as all of us&#8221;</em> mentality.  No matter how many points you get on reddit for a snarky comment, those points won&#8217;t pay your bills, nor give you respect among legitimate coders.</p>
<ol class="footnotes"><li id="footnote_0_716" class="footnote"><a href="http://www.electronista.com/articles/10/05/26/admob.april.2010.study.has.android.near.even/">http://www.electronista.com/articles/10/05/26/admob.april.2010.study.has.android.near.even/</a></li><li id="footnote_1_716" class="footnote"><a href="http://www.forrester.com/rb/Research/of_strategic_languages%2C_javas_adoption_is_highest/q/id/37356/t/2">http://www.forrester.com/rb/Research/of_strategic_languages%2C_javas_adoption_is_highest/q/id/37356/t/2</a></li><li id="footnote_2_716" class="footnote"><a href="http://www.h-online.com/open/news/item/Android-s-Dalvik-to-be-JIT-boosted-861870.html">http://www.h-online.com/open/news/item/Android-s-Dalvik-to-be-JIT-boosted-861870.html</a></li></ol>

<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2008/12/64-bit-java-browser-plugin/' rel='bookmark' title='Permanent Link: 64-bit Java browser plugin'>64-bit Java browser plugin</a></li>
<li><a href='http://www.sharms.org/blog/2009/12/installing-play-framework-on-openbsd-4-6/' rel='bookmark' title='Permanent Link: Installing Play Framework on OpenBSD 4.6'>Installing Play Framework on OpenBSD 4.6</a></li>
<li><a href='http://www.sharms.org/blog/2006/12/run-your-java-apps-under-aiglx/' rel='bookmark' title='Permanent Link: Run your java apps under Aiglx'>Run your java apps under Aiglx</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/05/java/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tenda W322P Wireless N PCI Card</title>
		<link>http://www.sharms.org/blog/2010/05/tenda-w322p-wireless-n-pci-card/</link>
		<comments>http://www.sharms.org/blog/2010/05/tenda-w322p-wireless-n-pci-card/#comments</comments>
		<pubDate>Mon, 03 May 2010 15:46:39 +0000</pubDate>
		<dc:creator>sharms</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=705</guid>
		<description><![CDATA[Purchased this card at Microcenter (http://www.microcenter.com/single_product_results.phtml?product_id=0316296). Out of the box works on Ubuntu 9.10, supports WEP, WPA, WPA2 and has no stability issues transferring large files etc. Attempted to install the card under Windows 7 x64, x32, and Windows XP SP3, all of which did not recognize the card without additional drivers. Summary: PCI wireless [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2007/03/wireless-hackers/' rel='bookmark' title='Permanent Link: Wireless hackers'>Wireless hackers</a></li>
<li><a href='http://www.sharms.org/blog/2007/05/dell-latitude-d620-with-broadcom-wireless-on-feisty/' rel='bookmark' title='Permanent Link: Dell Latitude D620 with Broadcom Wireless on Feisty'>Dell Latitude D620 with Broadcom Wireless on Feisty</a></li>
<li><a href='http://www.sharms.org/blog/2008/06/secret-formula-of-linux-compatible-hardware/' rel='bookmark' title='Permanent Link: Secret Formula of Linux Compatible Hardware'>Secret Formula of Linux Compatible Hardware</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sharms.org/blog/wp-content/uploads/0316296_292524.jpg"><img src="http://www.sharms.org/blog/wp-content/uploads/0316296_292524.jpg" alt="" title="Tenda W322P" width="200" height="200" class="aligncenter size-full wp-image-706" /></a></p>
<p>Purchased this card at Microcenter (<a href="http://www.microcenter.com/single_product_results.phtml?product_id=0316296">http://www.microcenter.com/single_product_results.phtml?product_id=0316296</a>).  Out of the box works on Ubuntu 9.10, supports WEP, WPA, WPA2 and has no stability issues transferring large files etc.</p>
<p>Attempted to install the card under Windows 7 x64, x32, and Windows XP SP3, all of which did not recognize the card without additional drivers.</p>
<p><strong>Summary:</strong> PCI wireless N card that is Ubuntu compatible with a price under $25<br />
<strong>Grade:</strong> A+</p>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2007/03/wireless-hackers/' rel='bookmark' title='Permanent Link: Wireless hackers'>Wireless hackers</a></li>
<li><a href='http://www.sharms.org/blog/2007/05/dell-latitude-d620-with-broadcom-wireless-on-feisty/' rel='bookmark' title='Permanent Link: Dell Latitude D620 with Broadcom Wireless on Feisty'>Dell Latitude D620 with Broadcom Wireless on Feisty</a></li>
<li><a href='http://www.sharms.org/blog/2008/06/secret-formula-of-linux-compatible-hardware/' rel='bookmark' title='Permanent Link: Secret Formula of Linux Compatible Hardware'>Secret Formula of Linux Compatible Hardware</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/05/tenda-w322p-wireless-n-pci-card/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Pygoocanvas, pygtk etc</title>
		<link>http://www.sharms.org/blog/2010/03/pygoocanvas-pygtk-etc/</link>
		<comments>http://www.sharms.org/blog/2010/03/pygoocanvas-pygtk-etc/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 17:50:56 +0000</pubDate>
		<dc:creator>Steven Harms</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=702</guid>
		<description><![CDATA[I was reading a post about PyGoocanvas, and decided to take a look at some code and see what fun could be had. I haven&#8217;t done much yet, but this screenshot of it is pretty entertaining in it&#8217;s own right: Related posts:Writing a blog post people will actually read


Related posts:<ol><li><a href='http://www.sharms.org/blog/2006/12/writing-a-blog-post-people-will-actually-read/' rel='bookmark' title='Permanent Link: Writing a blog post people will actually read'>Writing a blog post people will actually read</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I was reading a<a href="http://www.themacaque.com/?p=482"> post about PyGoocanvas</a>, and decided to take a look at some code and see what fun could be had.  I haven&#8217;t done much yet, but this screenshot of it is pretty entertaining in it&#8217;s own right:</p>
<p><a href="http://www.sharms.org/blog/wp-content/uploads/garth.jpg"><img src="http://www.sharms.org/blog/wp-content/uploads/garth-208x300.jpg" alt="" title="garth" width="208" height="300" class="aligncenter size-medium wp-image-703" /></a></p>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2006/12/writing-a-blog-post-people-will-actually-read/' rel='bookmark' title='Permanent Link: Writing a blog post people will actually read'>Writing a blog post people will actually read</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/03/pygoocanvas-pygtk-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking for someone to give me a hand</title>
		<link>http://www.sharms.org/blog/2010/02/looking-for-someone-to-give-me-a-hand/</link>
		<comments>http://www.sharms.org/blog/2010/02/looking-for-someone-to-give-me-a-hand/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:46:09 +0000</pubDate>
		<dc:creator>sharms</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=695</guid>
		<description><![CDATA[Hoping to reach someone intelligent / talented through this. Basically, I need someone for 2 weeks starting 3/8. It will just be a temporary position, with opportunities to work for us later as needed. Position involves Linux development, and you should know php / perl. The project will involve modems and java also, and the [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2008/08/got-skills-email-me/' rel='bookmark' title='Permanent Link: Got skills?  Email me'>Got skills?  Email me</a></li>
<li><a href='http://www.sharms.org/blog/2010/07/linux-guru-needed/' rel='bookmark' title='Permanent Link: Linux guru needed'>Linux guru needed</a></li>
<li><a href='http://www.sharms.org/blog/2007/02/linus-vs-gnome/' rel='bookmark' title='Permanent Link: Linus vs. Gnome'>Linus vs. Gnome</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Hoping to reach someone intelligent / talented through this.  Basically, I need someone for 2 weeks starting 3/8.  It will just be a temporary position, with opportunities to work for us later as needed.</p>
<p>Position involves Linux development, and you should know php / perl.  The project will involve modems and java also, and the ability to document everything would be great.</p>
<p>Good news about the position is I am leading the project, so anything you can&#8217;t figure out, I will.  Pay will be somewhere in the $100/hr range, and we need you to be in Cincinnati for the two weeks (3/8 &#8211; 3/19), 40 hours per week.</p>
<p>Send me an email (you can find my info in launchpad) or post a comment here if you think you fit the bill.  Anyone who has any Ubuntu development experience or contributions to visible projects will definitely take priority.  Remember, you need to have the ability to be in Cincinnati, as travel is not covered.</p>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2008/08/got-skills-email-me/' rel='bookmark' title='Permanent Link: Got skills?  Email me'>Got skills?  Email me</a></li>
<li><a href='http://www.sharms.org/blog/2010/07/linux-guru-needed/' rel='bookmark' title='Permanent Link: Linux guru needed'>Linux guru needed</a></li>
<li><a href='http://www.sharms.org/blog/2007/02/linus-vs-gnome/' rel='bookmark' title='Permanent Link: Linus vs. Gnome'>Linus vs. Gnome</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2010/02/looking-for-someone-to-give-me-a-hand/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.730 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-03 16:21:38 -->
