<?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>Steve Taylor &#187; Linux</title>
	<atom:link href="http://sltaylor.co.uk/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://sltaylor.co.uk</link>
	<description>Freelance WordPress developer in London - XHTML, CSS &#38; design</description>
	<lastBuildDate>Mon, 19 Jul 2010 09:39:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Customizing the Netbook Remix &amp; creating shell script shortcuts</title>
		<link>http://sltaylor.co.uk/blog/customizing-netbook-remix-creating-shell-script-shortcuts/</link>
		<comments>http://sltaylor.co.uk/blog/customizing-netbook-remix-creating-shell-script-shortcuts/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 14:57:25 +0000</pubDate>
		<dc:creator>Steve Taylor</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sltaylor.co.uk/?p=58</guid>
		<description><![CDATA[A couple more problems of mine with my Eee PC / Ubuntu Eee setup solved. Hopefully of use to others&#8230; Customizing the desktop Ubuntu Eee comes with a custom desktop designed for small screens by Canonical, called the Ubuntu Netbook Remix. It&#8217;s a group of modifications that create more screen space and provide a slick [...]]]></description>
			<content:encoded><![CDATA[<p>A couple more problems of mine with my Eee PC / Ubuntu Eee setup solved. Hopefully of use to others&#8230;</p>
<p><span id="more-58"></span></p>
<h2>Customizing the desktop</h2>
<p>Ubuntu Eee comes with a custom desktop designed for small screens by Canonical, called the <a href="http://www.canonical.com/projects/ubuntu/nbr">Ubuntu Netbook Remix</a>. It&#8217;s a group of modifications that create more screen space and provide a slick application launcher instead of the normal desktop. It&#8217;s nice, but I found it hard to customize to my liking.</p>
<p>There are <a href="http://www.ubuntu-eee.com/wiki/index.php5?title=How_to_use_Ubuntu_Eee_8.04.1%27s_Regular_Desktop_mode_instead_of_the_Netbook_Remix_interface">ways</a> of totally replacing the NBR interface with the normal Ubuntu desktop. But I liked some aspects of NBR, like the Maximus window switcher that keeps windows maximized by default. How to just get the desktop back and turn the NBR &#8220;Show desktop launcher&#8221; button (top left) into an applications menu?</p>
<p><a href="http://www.freesoftwaremagazine.com/columns/ubuntu_netbook_remix_detailed_explanation">This page explaining NBR</a> proved very useful. In the end, it boils down to this:</p>
<ol>
<li>Launch Synaptic, and press &#8220;Status&#8221; in the bottom left. Then select &#8220;Installed&#8221; in the top left, to show installed packages.</li>
<li>Scroll down and &#8220;Mark for Removal&#8221; both &#8220;ume-launcher&#8221; (the replacement desktop) and &#8220;go-home-applet&#8221; (the &#8220;go to desktop&#8221; button, top left). Click &#8220;Apply&#8221;.</li>
<li>Now you&#8217;re stuck. There&#8217;s no way to launch applications! Don&#8217;t worry. What you need to do is to customize the panel, the bar across the top, by right-clicking in an empty space. If there isn&#8217;t any space, right-click on something and move it (you might need to unlock it first). Play around. When you get some space, a right-click should give the option &#8220;Add to Panel&#8221;. Select &#8220;Main menu&#8221;.</li>
<li>Now you can use right-click, lock-unlock, move, to get things how you want them along the top panel. Right-click the main menu and &#8220;Edit menus&#8221; to&#8230; well, you get the idea.</li>
<li>If you still need a &#8220;Show desktop&#8221; button, there&#8217;s one in the &#8220;Add to Panel&#8221; thingy.</li>
</ol>
<h2>Shell scripts</h2>
<p>On Windows, I had a few batch files on the desktop for me to quickly start/stop/restart ColdFusion, at least. How to do the same on Linux?</p>
<p>The equivalent of batch files on Linux are shell scripts. Like batch files, plain text files, but with <code>.sh</code> extensions instead of <code>.bat</code>. Here&#8217;s the basic process, using CF control commands as an example:</p>
<ol>
<li>Create a text file for each command you want to be able to run. The files should have the <code>.sh</code> extension, and you can keep them wherever you want. For CF, the three I&#8217;ve created (each line in a separate file) are:<br />
<code>sudo /opt/coldfusion8/bin/coldfusion start</code><br />
<code>sudo /opt/coldfusion8/bin/coldfusion stop</code><br />
<code>sudo /opt/coldfusion8/bin/coldfusion restart</code></li>
<li>For each file, right-click to select &#8220;Properties&#8221; and then the &#8220;Permissions&#8221; tab. Tick &#8220;Allow executing file as program&#8221;.</li>
<li>On the desktop, right-click and &#8220;Create launcher&#8221;. Select &#8220;Application in Terminal&#8221;, type a name for the launcher shortcut, and browse to the relevant shell script file.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://sltaylor.co.uk/blog/customizing-netbook-remix-creating-shell-script-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Asus Eee PC, Ubuntu, LAMP &amp; ColdFusion</title>
		<link>http://sltaylor.co.uk/blog/asus-eee-pc-ubuntu-lamp-coldfusion/</link>
		<comments>http://sltaylor.co.uk/blog/asus-eee-pc-ubuntu-lamp-coldfusion/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 21:40:32 +0000</pubDate>
		<dc:creator>Steve Taylor</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://sltaylor.co.uk/?p=34</guid>
		<description><![CDATA[I recently got an Asus Eee PC 1000H. For writing, travel, and learning Linux. I wanted to get Ubuntu working on it (a friend recommended it), the Apache/MySQL/PHP trinity (essential for work), and ColdFusion (not essential for work these days, but a few little apps I&#8217;ve written&#8212;for use locally&#8212;use CF). There&#8217;s been a whole series [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sltaylor.co.uk/wp-content/uploads/2008/10/asus-eee.jpg" alt="asus-eee" title="asus-eee" width="200" height="200" class="alignright size-full wp-image-122" />I recently got an Asus Eee PC 1000H. For writing, travel, and learning Linux. I wanted to get Ubuntu working on it (a friend recommended it), the Apache/MySQL/PHP trinity (essential for work), and ColdFusion (not essential for work these days, but a few little apps I&#8217;ve written&#8212;for use locally&#8212;use CF).</p>
<p>There&#8217;s been a whole series of hoops to jump through. I&#8217;m no tech novice, but Windows and occasional Mac use has been my staple thus far. Of course you can&#8217;t do much in web development without knowing a bit of Linux at least; still, wrangling with various desktop issues can be a chore.</p>
<p>The web, or Google (if there&#8217;s a difference) is your friend. Finding a comprehensive tutorial that covers your precise situation is rare if not impossible; you need that familiar net skill of cobbling together varying perspectives and bits of advice into something that works for you. That said, I&#8217;ll point to <a href="http://www.iknowkungfoo.com/blog/index.cfm/2008/6/6/The-ACME-Guide-64bit-Ubuntu-804-Edition-Part-1">this ACME Guide</a> up-front as a fantastic source of information on getting web development stuff going.</p>
<p>I also picked up <a href="http://oreilly.com/catalog/9780596006280/">the O&#8217;Reilly <i>Linux Pocket Guide</i></a>. It&#8217;s a good little intro to the Linux environment as well as a useful reference point.</p>
<p>Anyway, here&#8217;s my summary of what I&#8217;ve learned. Hope it&#8217;s useful for you! (As ever, this information is used at your own risk. I can&#8217;t support you if stuff goes wrong&#8212;but do let me know if you know for sure I&#8217;ve, for example, mis-typed commands!)</p>
<p><span id="more-34"></span></p>
<h2>Ubuntu Eee</h2>
<p><img src="http://sltaylor.co.uk/wp-content/uploads/2008/10/ubuntu-eee.png" alt="ubuntu-eee" title="ubuntu-eee" width="130" height="130" class="alignright size-full wp-image-124" />I got a 40GB Eee with Linux pre-installed. Knowing I was going to shift to Ubuntu anyway (the default version of Linux on the Eee is the clunky Xandros), I probably should have gone for the 80GB Windows version&#8212;it&#8217;s cheaper!</p>
<p>Anyway, in either case, the good news for people wanting Ubuntu is that there&#8217;s a special distribution of this system especially tailored for the Eee: <a href="http://www.ubuntu-eee.com/">Ubuntu Eee</a>. Follow <a href="http://www.ubuntu-eee.com/wiki/index.php5?title=Get_Ubuntu_Eee">their instructions</a>.</p>
<p>My only real sticking point here was that the <a href="http://www.ubuntu-eee.com/wiki/index.php5?title=How_to:_Using_Unetbootin">UNetbootin</a>-created USB installation drive didn&#8217;t boot. The Eee doesn&#8217;t have a CD/DVD drive, so this utility unpacks the disk image (ISO) of the Ubuntu system onto a USB stick, making it bootable. I only solved this by getting a new USB stick for this purpose. The first one was oldish, and only 1GB. This is theoretically enough, but they say a 2GB stick is recommended. Indeed.</p>
<h3>The /home directory</h3>
<p>The Ubuntu Eee install is pretty slick. The only thing I think I missed was relocating the <code>/home</code> directory. This is where most user files are kept in Linux. The Eee seems to come with its main hard disk (actually a solid-state disk) partitioned into two&#8212;mine had one with around 8GB, one with around 32GB. I wiped the Xandros installation off the smaller one and installed Ubuntu there. It was only after installation that I got round to thinking my <code>/home</code> should be on the big partition for all my data&#8230;</p>
<p>There are other options of course&#8212;search and you&#8217;ll find myriad opinions. If you end up in my position, here&#8217;s what to do. I waded through a number of ad-riddled blog posts and forum threads, but <a href="https://answers.launchpad.net/ubuntu-eee/+question/46718">this one</a> seemed to nail it in the end.</p>
<p>Be aware that some of this can go wrong. I managed to make some drastic mistakes here, but Linux is quite sturdy and I managed to recover OK. This definitely isn&#8217;t for total beginners.</p>
<ol>
<li>Close all applications. Print this out or write it down.</li>
<li>Open a command line terminal.</li>
<li><code>sudo su</code><br />
This shifts the session to &#8220;root&#8221; or &#8220;super-user&#8221; (after you enter the password for your own user account). You can prefix individual commands with <code>sudo</code> to temporarily shift from your own user account that was created with the Ubuntu installation to the root account, needed for many system operations. But it can get tedious. This trick keeps you operating as root until you type <code>exit</code>.</li>
<li><code>cd /media/HOME</code><br />
This shifts you into the large partition, which, in the default Ubuntu-Eee install, is mounted with the label &#8220;HOME&#8221;. Linux devices (like disks and drives) are generally registered in the <code>/dev</code> directory. My boot partition is <code>/dev/sda</code>, and my O&#8217;Reilly guide says <code>sda</code> is usually the &#8220;First SCSI&#8221; device (whereas the master hard disk should be <code>hda</code>). I guess this is down to the Eee having solid-state disks instead of hard disks? A detail to watch for. Anyway, this large partition&#8217;s mount is here in the <code>/media</code> directory, usually for external devices&#8212;there&#8217;s a <code>/mnt</code> directory for usual hard disk partition mounts.
</li>
<li>Now, there&#8217;s probably some user directories in <code>/media/HOME</code> left over from Xandros. Obviously grab what you might need, but I felt like a clean slate. Beware, this next command will wipe that partition:</li>
<li><code>rm -r *</code><br />
Remove (<code>rm</code>) recursively (<code>-r</code>)&#8212;that is, all sub-directories and contents&#8212;everything in the current directory (<code>*</code>).</li>
<li><code>unmount /media/HOME</code><br />
Pretty self-explanatory. A useful command you can check this with is <code>df</code>&#8212;it&#8217;ll list all mounted filesystems.</li>
<li><code>mv /home /home.bak</code><br />
<code>mv</code> &#8220;moves&#8221; (actually renames) a file or directory. Here, it basically backs up the <code>home</code> directory by renaming it.</li>
<li><code>mkdir /home</code><br />
This creates a new <code>/home</code> directory.</li>
<li><code>mount -t ext3 /dev/sdb1 /home</code><br />
Now this re-mounts the large partition, <code>/dev/sdb1</code>, under the new <code>/home</code> directory. So now <code>/home</code> points to the partition. Do double-check the partition&#8217;s reference first. Use <code>fdisk -l</code>, which will (for root) show all connected disks, mounted or not, with their details. <code>/dev/sdb</code> is the second (&#8220;b&#8221;) SCSI device, and <code>/dev/sdb1</code> is its first partition. It&#8217;s usually easy to identify drives and partitions by their sizes. Note that <code>ext3</code> is the filesystem format (like NTFS in Windows).</li>
<li><code>cp -a /home.bak/* /home</code><br />
This copies the contents of the old <code>/home</code> into the new partition.</li>
<li>You should be up and running now with <code>/home</code> located on the large partition. The only thing left to do is make sure this mount happens each time you boot up. This sort of stuff is managed by the <code>/etc/fstab</code> file. If you&#8217;re still root in the terminal, you can open it for editing by entering:<br />
<code>gedit /etc/fstab</code><br />
This will open the file in the text editor, with root permissions (essential for saving it!). If you&#8217;re not root anymore, just prefix the above with <code>sudo</code> (you&#8217;ll get used to this).</li>
<li>At the bottom, add the line:<br />
<code>/dev/sdb1	&nbsp;&nbsp;/home &nbsp;&nbsp;ext3 &nbsp;&nbsp;nodev,nosuid &nbsp;&nbsp;0 &nbsp;&nbsp;2</code><br />
By now I imagine you&#8217;ll roughly see what&#8217;s going on in this.</li>
</ol>
<h3>Automounting the USB stick</h3>
<p>That&#8217;s hopefully it for moving <code>/home</code>. But while we&#8217;re editing <code>fstab</code>, there&#8217;s another thing. I found after installing Ubuntu, the USB stick I&#8217;d successfully used was no longer &#8220;automounting&#8221; when I plugged it in. After a bit of searching, someone suggested commenting out the lines referring to <code>/media/cdrom</code>. Just put a <code>#</code> at the start of each line. Seems to be something to do with how the system has to recognize the stick as a boot device initially, which is no longer the case. Anyway, worked for me.</p>
<h2>LAMP</h2>
<p>After all that, LAMP (or AMP at least&#8212;Linux is done!) brings good news.</p>
<p>In Ubuntu, open up Synaptic Package Manager. This is basically a nice GUI for the &#8220;Advanced Packaging Tool&#8221;. You&#8217;ll see plenty of command line examples for installing software (&#8220;packages&#8221;) on Linux with the <code>apt-get</code> program&#8212;the part of the APT family that grabs software from remote repositories. Synaptic makes it all a breeze.</p>
<p>Select <b>Edit &gt; Mark Packages by Task</b>, and from that list select LAMP Server. This will check all the components of the LAMP bundle of packages. You may as well also search (with the Synaptic search tool) for &#8220;phpMyAdmin&#8221; (the trusty web interface for MySQL)  and/or &#8220;mysql-admin&#8221; (the MySQL desktop GUI), and check one or both of those. Just click the box at the left of the package listing and select <b>Mark for Installation</b>.</p>
<p>If you want to install ColdFusion, too, search for &#8220;sun-java6-bin&#8221;. CF&#8217;ll need it.</p>
<p>Any time you use Synaptic, once you&#8217;ve selected everything you want (a process that might also auto-select other packages that the ones you&#8217;ve chosen are dependent on), click <b>Apply</b>.</p>
<p>One of the nicest parts of getting all this going was, after installing LAMP, opening up a browser and going to <i>http://localhost/</i>. In big letters I found that &#8220;It works!&#8221;. Hope you do too.</p>
<p>For more details, do refer to that great <a href="http://www.iknowkungfoo.com/blog/index.cfm/2008/6/6/The-ACME-Guide-64bit-Ubuntu-804-Edition-Part-1">ACME Guide</a> (though you might need to ignore the stuff about 64-bit versions).</p>
<h3>Keeping www somewhere else</h3>
<p>As I&#8217;d decided to keep all my data on that other partition, I also wanted to keep my <code>www</code> directory, for all the local files of websites I&#8217;m developing, there too. I was kind of dreading some trawl through Apache configuration, but thankfully Linux offers a simple solution: a <a href="http://en.wikipedia.org/wiki/Symbolic_link">symbolic link</a>.</p>
<p>Also known as a symlink or soft link, symbolic links are just small files that direct operations from one part of the filesystem to another.</p>
<ol>
<li>Create your web files directory in your user folder, e.g. <code>/home/steve/www</code>.</li>
<li>Apache&#8217;s default web directory is <code>/var/www</code>. If there&#8217;s anything in there you want, copy it to the new one. Then delete the directory.</li>
<li>In a terminal, as root (or using the <code>sudo</code> prefix), enter:<br />
<code>ln -s /home/steve/www /var/www</code><br />
Obviously, change the <code>steve</code> bit! The <code>-s</code> specifies a symbolic link. The next bit is the target directory to point to, and the bit after that effectively recreates <code>/var/www</code> as a link to it.</li>
</ol>
<p>Now you can keep your web files in <code>/home/[wherever]/www</code>, and anything referencing anything starting with <code>/var/www</code> will point there.</p>
<p>Oh, if you&#8217;ve wondered, in looking in the <code>www</code> folder, where the heck phpMyAdmin is&#8212;you&#8217;re not alone. Mine works fine at <i>http://localhost/phpmyadmin/</i>, but I&#8217;ve no idea how this is so, or where it points. Ah well.</p>
<h2>ColdFusion</h2>
<p>There&#8217;s not much I can add to <a href="http://www.iknowkungfoo.com/blog/index.cfm/2008/6/8/The-ACME-Guide-64bit-Ubuntu-804-Edition-Part-2">the ACME Guide&#8217;s lowdown</a> on this. It&#8217;s a good brief education in some basic Linux concepts, too. Thanks to Adrian J. Moreno.</p>
<h2>Fonts</h2>
<p>I&#8217;ve still got loads to learn, but one final tip that will hopefully help you enjoy Ubuntu more. <a href="http://mondaybynoon.com/2007/04/02/linux-font-equivalents-to-popular-web-typefaces/">This page</a> pointed me to <a href="http://corefonts.sourceforge.net/">Microsoft&#8217;s core fonts for the web</a>. They should make browsing a little more pleasant. You can install them from Synaptic (of course)&#8212;search for &#8220;msttcorefonts&#8221;.</p>
<p>That&#8217;s it for now. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://sltaylor.co.uk/blog/asus-eee-pc-ubuntu-lamp-coldfusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
