<?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>Random and Irrelevant &#187; Slackware</title>
	<atom:link href="http://sgp.me.uk/tag/slackware/feed/" rel="self" type="application/rss+xml" />
	<link>http://sgp.me.uk</link>
	<description>Sam Pearson's weblog - irrelevant content randomly updated</description>
	<lastBuildDate>Sun, 17 Jan 2010 18:57:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Handling mailto links in Firefox</title>
		<link>http://sgp.me.uk/2004/11/18/firefox-mailto/</link>
		<comments>http://sgp.me.uk/2004/11/18/firefox-mailto/#comments</comments>
		<pubDate>Thu, 18 Nov 2004 20:03:05 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/2004/11/18/firefox-mailto</guid>
		<description><![CDATA[On my setup - Firefox 1.0, KDE 3.2, Thunderbird 0.9, Slackware 10 - clicking on a <code>mailto:</code> link in Firefox does nothing; I wanted this to open a new message in Thunderbird, email address pasted in and ready to go.]]></description>
			<content:encoded><![CDATA[<p>On my setup &#8211; Firefox 1.0, KDE 3.2, Thunderbird 0.9, Slackware 10 &#8211; clicking on a <code>mailto:</code> link in Firefox does nothing; I wanted this to open a new message in Thunderbird, email address pasted in and ready to go.  Thanks to Google, I found <a href="http://opensource.weblogsinc.com/entry/7672458579278871/" title="Re-enable mailto: links in Firefox on Linux">the answer</a> pretty quickly &#8211; add this line to your <code>user.js</code>:</p>
<pre><code>user_pref("network.protocol-handler.app.mailto","/usr/bin/thunderbird");</code></pre>
<p>Just remember to change <code>/usr/bin/thunderbird</code> to the appropriate path for your installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2004/11/18/firefox-mailto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>unwired</title>
		<link>http://sgp.me.uk/2003/12/12/unwired1/</link>
		<comments>http://sgp.me.uk/2003/12/12/unwired1/#comments</comments>
		<pubDate>Fri, 12 Dec 2003 02:50:09 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[New Zealand]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[Wellington]]></category>
		<category><![CDATA[WiFi]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/2003/12/12/unwired1</guid>
		<description><![CDATA[I thought it might be useful to post a few notes on the process of getting connected to the <a href="http://www.cafenet.co.nz/">CafeNET</a> <acronym title="Wireless Local Area Network">WLAN</acronym> here in Wellington.  It will help me in absorbing everything that I have read about and might prove useful to someone else one day.  Be warned, this is a fairly technical post!]]></description>
			<content:encoded><![CDATA[<p>I thought it might be useful to post a few notes on the process of getting connected to the <a href="http://www.cafenet.co.nz/">CafeNET</a> <acronym title="Wireless Local Area Network">WLAN</acronym> here in Wellington.  It will help me in absorbing everything that I have read about and might prove useful to someone else one day.  Be warned, this is a fairly technical post!</p>
<p>Hardware and OS:</p>
<ul>
<li><a href="http://www.slackware.com/" title="Slackware homepage">Slackware Linux 9</a></li>
<li>Sony Vaio PCG-C1F Notebook Computer</li>
<li><a href="http://www.zoom.com/products/networking_za.html#4100" title="Product Info at the Zoom website">ZoomAir 4100 Wireless PC Card</a></li>
</ul>
<p>Software Requirements:</p>
<ul>
<li><a href="http://pcmcia-cs.sourceforge.net/" title="Card Services for Linux homepage">PCMCIA Card Services</a> (series a, pcmcia-cs-3.2.4)</li>
<li><a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html" title="Jean Tourrilhes Wireless Tools">Wireless Tools</a> (series n, wireless-tools-25)</li>
<li><a href="http://www.phystech.com/download/dhcpcd.html" title="dhcpcd download page">dhcp client daemon</a> (series n, dhcpcd-1.3.22pl4)</li>
</ul>
<p>The package references in parentheses above are Slackware specific.  I can&#8217;t imagine that there is a major distribution that does not supply any of these packages, but the links will take you to the source if you need it.  There are alternatives to <code>dhcpcd</code> you might use, and there is an <a href="#alternative">alternative solution</a> (in part) to the one I am going to describe using a different driver and toolkit.</p>
<p>The ZoomAir 4100 uses the PRISM II architecture with a MANFID of <code>0x0156, 0x0002</code>.  This architecture is listed in the know cards database (<code>/etc/pcmcia/config</code>) and bound to the <a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Orinoco.html"><code>orinoco_cs</code> device driver</a>, so upon card insertion the <code>cardmgr</code> daemon loads the relevant drivers and logs this in <code>/var/log/messages</code>.</p>
<p>Once <code>cardmgr</code> has identified a card and loaded the device driver(s), it performs some further configuration using the scripts in <code>/etc/pcmcia</code>.  The scripts called depend on the device class of the card (see the <a href="http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-HOWTO.html">PCMCIA-HOWTO</a> for more information).  In this case <code>cardmgr</code> calls the <code>network</code> script which in turn calls the <code>wireless</code> script.  Specific configuration options can be added to the scripts by editing corresponding <code>*.opts</code> files in the same directory.</p>
<p>I had not altered any of these scripts when I began experimenting with the ZoomAir card, and it turned out that the scripts as distributed with Slackware don&#8217;t do anything untoward &#8211; but neither do they do anything particularly useful, so the final steps needed to be performed manually.</p>
<p>The CafeNET website gives their SSID as &#8216;cafenet&#8217; and tells us that they do not use WEP (encryption).  Armed with this information, we can manually configure the interface using <code>iwconfig</code>.  It turns out that the default setup has encryption turned off and sets reasonable values for everything else, so all we need to do is set the SSID:</p>
<p><code># iwconfig eth0 essid cafenet</code></p>
<p>Then you can fire up the dhcp client daemon and hopefully get connected:</p>
<p><code># dhcpcd eth0</code></p>
<p>(I&#8217;m going to use <code>eth0</code> as the interface throughout these examples, but this might not always be the correct option for everyone.  If your interface is <code>eth0</code>, you don&#8217;t actually need to specify it to <code>dhcpcd</code> as it will use that by default.  I&#8217;m specifying it for clarity.)</p>
<p>This was enough to get connected to the network.  To &#8216;hang-up&#8217;, firstly cleanly kill <code>dhcpcd</code>:</p>
<p><code># dhcpcd -k</code></p>
<p>Then you can eject the card:</p>
<p><code># cardctl eject</code></p>
<p>So &#8211; very little needs doing to get connected.  But there are some tweaks I&#8217;ve made to automate the whole process &#8211; even geeks get bored of typing in the same old commands all the time, and what are computers good for if not automation, anyway?</p>
<p>As implied above, Card Services comes with a ready-made system to help automate managing cards.  By adding some code to the scripts in <code>/etc/pcmcia</code> we can automate the entire process of connecting to and disconnecting from CafeNET.</p>
<p>I created a scheme for connecting to CafeNET by customising <code>network.opts</code> and <code>wireless.opts</code>.  There is no card-specific configuration that I&#8217;ve found necessary, so this scheme may be of use to you whatever your card type.  Before customising these scripts it is worth reading through the comments as there will probably be sections you will want to remove or comment out.</p>
<p>Here is the <code>case</code> to add to <code>wireless.opts</code>:</p>
<pre><code>
cafenet,*,*,*)
    INFO="Scheme for connecting to Wellingon's CafeNET"
    ESSID="cafenet"
    MODE="managed"
    # Turn off encryption as suggested:
    KEY="off"
    ;;
</code></pre>
<p>And here is the one for <code>network.opts</code>:</p>
<pre><code>
cafenet,*,*,*)
     # Leave it all up to dhcpcd:
     DHCP="y"
     ;;
</code></pre>
<p>You can now connect to CafeNET by inserting your card and changing the scheme to cafenet:</p>
<p><code># cardctl scheme cafenet</code></p>
<p>Schemes are described in the Card Services documentation.  They&#8217;re are a handy way of packaging configuration options for different circumstances which can then be called with a single command on the fly.</p>
<p>It is worth noting that Schemes persist across boots.  This is useful for me at the moment as I can leave the scheme set to &#8216;cafenet&#8217; and get connected simply by inserting the card which will automatically try to connect &#8211; I don&#8217;t have to type anything at all.  But this might not be the behaviour you want.  You should be able to set a variable (<code>$SCHEME</code>, funnily enough) in your <code>init</code> scripts to set the scheme at boot time, under Slackware you can set this in <code>/etc/rc.d/rc.pcmcia</code>.  There are various ways of controlling this, check out the docs.</p>
<p>To disconnect you <em>should</em> just be able to eject the card using <code>cardctl</code>.  Unfortunately there is a slight problem with the network script supplied with Slackware 9 &#8211; it sends <code>dhcpcd</code> a SIGTERM when it needs a SIGHUP to exit cleanly (see the <a href="http://www.phystech.com/download/dhcpcd_man.html">man page</a> for more).  This is easily fixed.  In the network script in the section of the &#8217;stop&#8217; <code>case</code> dealing with killing <code>dhcpcd</code> replace the line:</p>
<p><code>kill -TERM $PID</code></p>
<p>with:</p>
<p><code>kill -s HUP $PID</code></p>
<p>This is line 182 in my original <code>network</code> script.</p>
<p>This small change will make sure that everything is left nice and tidy.  You could, of course, kill <code>dhcpcd</code> by hand and then eject the card, but why type two commands when one will do?!?</p>
<p>So, there we are &#8211; it all works quite well and working it out has taught me quite a bit about the Card Services tools and about both wireless networks and networking in general, all areas I didn&#8217;t know a great deal about before.  Perhaps this stuff will be useful to someone else.</p>
<p id="alternative">One final point: while researching all this stuff, it became apparent that there is at least one other option for this particular card in terms of drivers.  The <code>orinoco_cs</code> driver is a generic solution &#8211; it supports several types of card, and is distributed with the Card Services package as a standard module.  According to the <a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Orinoco.html">orinoco page</a> at <a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wireless.html">Jean Tourrilhe&#8217;s site</a> (a great resource for Wireless and Linux stuff generally), the support for Prism II cards is &#8216;not yet fully functional&#8217;, and for Prism 2.5/3 cards the alternative <a href="http://www.linux-wlan.com/">linux-wlan-ng</a> system should definitely be used.</p>
<p>The linux-wlan drivers and subsystem provide an alternative to the orinoco/wireless extensions system described above &#8211; not only is the driver different, but the wireless extension tools (e.g. <code>iwconfig</code>) are not used either.  Right now, I&#8217;m still using <code>orinoco_cs</code> (it works), but I might take a look at the linux-wlan package if I&#8217;ve got the time as it is specifically designed for the Prism-type cards of which the ZoomAir 4100 is an example.</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2003/12/12/unwired1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sony Vaio PCG-C1F</title>
		<link>http://sgp.me.uk/2003/10/01/sonyvaio1/</link>
		<comments>http://sgp.me.uk/2003/10/01/sonyvaio1/#comments</comments>
		<pubDate>Wed, 01 Oct 2003 14:21:30 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[Sony Vaio PCG-C1F]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/2003/10/01/SonyVaio1</guid>
		<description><![CDATA[So, I got this Sony Vaio PCG-C1F, right.  My mate Gavin loaned it to me.  The particularly good thing about it is it's size - small enough to carry round without any hassle.]]></description>
			<content:encoded><![CDATA[<p>So, I got this Sony Vaio PCG-C1F, right.  My mate Gavin loaned it to me.  The particularly good thing about it is it&#8217;s size &#8211; small enough to carry round without any hassle.</p>
<div align="center">
<img src="/images/vaio.jpg" alt="[Sony Vaio PCG-C1F]" title="Sony Vaio PCG-C1f" height="307" width="410" />
</div>
<p>Thing is, I&#8217;ve put a nice new <a href="http://www.slackware.com/">Slackware 9</a> install on it.  Sounds good &#8211; but I&#8217;ve got to do all the configuration myself.  If I didn&#8217;t know any better I&#8217;d assume that Gavin thought I needed a project to keep my mind busy.  Still, I suppose it gives me something else to post about, too.</p>
<p>Linux can be a little bit of a pain to install on laptops sometimes &#8211; there&#8217;s a lot of scope for non-standard hardware and the like for which no-one has got around to hacking out device drivers for yet.  Still, at first glance, installing a recent distro on the little Vaio seems like a fairly straigtforward task.  Touch wood.</p>
<p>The basic install goes well.  The machine boots, and the kernel recognises the cards that came with the machine &#8211; the ethernet card Just Works.  The modem and wireless cards are recognised, and just need some configuration &#8211; I can easily whip up a chatscript for the modem, but I&#8217;m a bit less certain about what to do with the wireless card, having never used this technology before.  Still, one thing at a time, and the first thing I want to do is to get <a href="http://www.xfree86.org/" title="XFree86 Project homepage">XFree86</a> running satisfactorily.</p>
<p>The standard XF86Config file installed alongside with Slackware is actually enough to start X despite the fact that it thinks the screen is 1024&#215;768 whereas it is actually 1024&#215;480.  A bit of manpage reading and a quick surf later, and I have a nice little example of an <a href="http://www.remote.org/jochen/projects/vaio/XF86Config" title="Jochen Topf's XF86Config file">XF86Config</a> file as hacked together by <a href="http://www.remote.org/jochen/projects/vaio/" title="Jochen Topf's Vaio page">Jochen Topf for his Sony Vaio</a>.  (This page has a lot of other stuff on it, too.  I plan to read it a bit more thoroughly, and it might be useful to you if you&#8217;ve arrived at this page because you&#8217;re researching getting linux running on a Vaio.)  This doesn&#8217;t quite work &#8211; he uses the svga driver which I don&#8217;t seem to have, and one or two other little minor errors crop up &#8211; but a quick glance in <code>/usr/X11R6/lib/modules/drivers</code> turns up a rather promising little file called <code>neomagic_drv.o</code>.  The Vaio uses the NeoMagic MagicMedia 256AV, so this looks good.</p>
<p>And sure enough, between this, Topf&#8217;s mode line for 1024&#215;480 and a bit of a ripoff from the stock config file, I&#8217;ve pulled together an <a href="http://sgp.me.uk/files/XF86Config.txt">XF86Config</a> file that allows me to <code>startx</code> quite happily and launch the <a href="http://www.xfce.org/">XFce Desktop Environment</a>, which for some reason Gavin and I selected as the default window manager when we were doing the original install without knowing much about at the time.</p>
<p>Despite prioritising getting the X server running, I find that I&#8217;m spending very little time using it anyway.  Oh well.  Next thing I did was to get my digital camera working, a Nikon Coolpix 3100, which proved very simple.  This simple: plug in the <acronym title="Universal Serial Bus">USB</acronym> cable, and type</p>
<pre><code>
# mkdir /mnt/flash
# mount -t vfat /dev/sda1 /mnt/flash
</code></pre>
<p>And off we go.  Straight out of the box, as they say.</p>
<p>Next up:  the modem and wireless cards.  Not to mention a bit of trimming in <code>/etc/rc.d/</code> to cut down on a raft of unnecessary services.</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2003/10/01/sonyvaio1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slackware 8.1 is go&#8230; (mostly)</title>
		<link>http://sgp.me.uk/2002/12/23/slackware1/</link>
		<comments>http://sgp.me.uk/2002/12/23/slackware1/#comments</comments>
		<pubDate>Mon, 23 Dec 2002 16:13:23 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Slackware]]></category>
		<category><![CDATA[SuSE]]></category>

		<guid isPermaLink="false">http://sgp.me.uk/2002/12/23/slackware1</guid>
		<description><![CDATA[I&#8217;ve just finished the first stages of installing Slackware 8.1 on a spare partition on my box.  Up and running to a command line in a mere few minutes &#8211; very straitforward so far, although I&#8217;ve yet to set up an X server.  I&#8217;ve been running SuSE for the last year or so, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished the first stages of installing <a title="Link to the Slackware website" href="http://www.slackware.com/">Slackware 8.1</a> on a spare partition on my box.  Up and running to a command line in a mere few minutes &#8211; very straitforward so far, although I&#8217;ve yet to set up an X server.  I&#8217;ve been running <a title="Link to the SuSE website" href="http://www.suse.de/en/">SuSE</a> for the last year or so, and found 7.3 to be a pretty good intro to the wonderful world of Linux, but over the past couple of months I&#8217;ve been finding myself a bit dissatisfied with SuSE (and rpm), particularly after upgrading to 8.1.</p>
<p>I did a total reinstall for 8.1 as I wanted to completely redesign my partition layout to allow space for Slackware and LFS, and as such was expecting a fairly painless install onto a nice freshly formatted piece of disk.  &#8216;Twas not to be &#8230; nothing really Bad, but just a series of irritating things to fix once the system was running.  And although I had no trouble sorting it all out I suspect that a total newb might have had to spend quite a while reading to fix things.</p>
<p>Now I don&#8217;t necessarily think that this is a bad thing for a newbie to have to do, but SuSE are regarded as a fairly safe bet for beginners and some of the problems &#8211; such as the modules for controlling  DVD and CDRW drives &#8211; hadn&#8217;t occurred in 7.3, so why suddenly an issue in 8.1?  Most newbies probably want to spend a bit of time learning about commands like <code>ls</code> and <code>cd</code> before they get onto <code>modprobe</code> and <code>gcc</code>.</p>
<p>Maybe I&#8217;ll post a bit more about getting 8.1 to the same stage as 7.3 got itself another day.  There&#8217;s certainly been a fair bit of traffic in <a title="link to AOsLS via google groups" href="http://groups.google.com/groups?group=alt.os.linux.suse"> alt.os.linux.suse</a> about some of these problems, so it might be helpful to some people.</p>
<p>Anyway, I&#8217;ve got to go and configure an X server and compile some winmodem drivers, so I&#8217;ll be signing off now.  Bye!</p>
]]></content:encoded>
			<wfw:commentRss>http://sgp.me.uk/2002/12/23/slackware1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
