<?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>ukstokes.com &#187; Desktop Linux</title>
	<atom:link href="http://ukstokes.com/blog/category/desktop-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://ukstokes.com/blog</link>
	<description>tech stuff from a tech bloke</description>
	<lastBuildDate>Tue, 01 Nov 2011 11:29:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Improving Skype notifications on Linux</title>
		<link>http://ukstokes.com/blog/2011/10/23/improving-skype-notifications-on-linux/</link>
		<comments>http://ukstokes.com/blog/2011/10/23/improving-skype-notifications-on-linux/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 18:57:50 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[libnotify]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=884</guid>
		<description><![CDATA[Continuing from the preview blog post on Gmail notifications, I wondered if there was a way to link Skype into libnotify. Skype uses its own notification system by default which doesn't fit with the Gnome / Unity desktop, and looks kind of crappy. I could start a rant about Skype now, and the fact the [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing from the preview blog post on Gmail notifications, I wondered if there was a way to link Skype into libnotify. Skype uses its own notification system by default which doesn't fit with the Gnome / Unity desktop, and looks kind of crappy. I could start a rant about Skype now, and the fact the Linux client never gets updated, seems to silently crash when open for longer than an hour, and is generally a shoddy counterpart to the Windows and Mac versions ... then again since it's been acquired by Microsoft I can't see that this situation is going to ever improve now. Anyway, in the Options, under Notifications, if you select an event and then click Advanced, you can then clear the box that says "send a notification", and select to run a script instead.</p>
<p style="text-align: center;"><a href="http://ukstokes.com/blog/wp-content/uploads/2011/10/skype_options.png"><img class="alignnone size-medium wp-image-885" title="skype_options" src="http://ukstokes.com/blog/wp-content/uploads/2011/10/skype_options-300x203.png" alt="Advanced notification options" width="300" height="203" /><br />
</a><em>Advanced notification options</em></p>
<p>Using the 'Contact came online' event as an example, if you run the following as your 'script', inserting the name of a contact using the %sname variable, it looks like this:</p>
<pre class="brush: plain; title: ; notranslate">notify-send &quot;%sname is now online&quot; -i skype</pre>
<p>And for messages, you can use %smessage to insert the Skype message into a notification popup.</p>
<pre class="brush: plain; title: ; notranslate">notify-send &quot;%sname&quot; &quot;%smessage&quot; -i skype</pre>
<p style="text-align: center;"><em><img class="alignnone size-full wp-image-887" title="skype_message" src="http://ukstokes.com/blog/wp-content/uploads/2011/10/skype_message.png" alt="Skype message received" width="456" height="246" /><a href="http://ukstokes.com/blog/wp-content/uploads/2011/10/skype_message.png"><br />
</a>Skype message received</em></p>
<p>Much better!</p>
<p>A list of available variables is <a href="http://forum.skype.com/index.php?showtopic=85138&amp;st=0&amp;p=390732&amp;#entry390732">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2011/10/23/improving-skype-notifications-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pretty Gmail notifications for Ubuntu</title>
		<link>http://ukstokes.com/blog/2011/10/22/pretty-gmail-notifications-for-ubuntu/</link>
		<comments>http://ukstokes.com/blog/2011/10/22/pretty-gmail-notifications-for-ubuntu/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 19:25:05 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[libnotify]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=868</guid>
		<description><![CDATA[I've recently gone back to Ubuntu (10.11), and in my new installation wondered if there was an app I could install which gave me Gmail notifications via the default notification system (libnotify). I was a bit surprised to find that there wasn't, so I wrote a script in bash that does it: gmailpopup  My script [...]]]></description>
			<content:encoded><![CDATA[<p>I've recently gone back to Ubuntu (10.11), and in my new installation wondered if there was an app I could install which gave me Gmail notifications via the default notification system (libnotify). I was a bit surprised to find that there wasn't, so I wrote a script in bash that does it:</p>
<p style="text-align: center;"><a href="http://ukstokes.com/blog/wp-content/uploads/2011/10/gmailpopup.png"><img class="size-full wp-image-869 aligncenter" title="gmailpopup" src="http://ukstokes.com/blog/wp-content/uploads/2011/10/gmailpopup.png" alt="gmalpopup" width="414" height="478" /></a><em>gmailpopup </em></p>
<p>My script also stores your password hashed (unlike some of the alternatives in Software Centre), in a hidden file in your /home.</p>
<p><strong>Installation</strong></p>
<p>To install, run the following:</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
sudo apt-get install curl gnome-gmail
wget -q -O ~/gmailpopup http://ukstokes.com/scripts/gmailpopup
chmod +x ~/gmailpopup
sudo cp ~/gmailpopup /usr/bin
</pre>
<p>To configure it just type <strong>gmailpopup</strong> in a terminal and enter your Gmail address (GApps domains also supported) and password. If you have accidentally fat fingered the password and get an error, you can start again with <strong>gmailpopup --reconfigure</strong>. On subsequent runs you won't get a popup unless your unread email is different from last time.</p>
<p>This doesn't seem to run if inserted into the crontab. But it works fine if this is added as a startup application:</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
while true; do ~/bin/gmailpopup &amp;&amp; sleep 1m; done &amp;
</pre>
<p>Of course, this doesn't just work on Ubuntu. Any distro which uses libnotify will do. By the way the gnome-gmail package is just required for the Gmail icon. There is probably a better way of doing that, which I'll have a think about, but installing gnome-gmail has the added advantage of making Gmail your default mail client for mailto links etc. If that is not what you want, go to the "Default Applications" in "System Info" to set it back.</p>
<p>Thats it. Leave me a comment and let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2011/10/22/pretty-gmail-notifications-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Living with Gnome 3</title>
		<link>http://ukstokes.com/blog/2011/07/19/living-with-gnome-3/</link>
		<comments>http://ukstokes.com/blog/2011/07/19/living-with-gnome-3/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 21:19:56 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=853</guid>
		<description><![CDATA[Here are some tips on how to make Gnome 3 behave a bit more like Gnome 2, to help you transition into this new and unfamiliar territory. Most of them are from this thread on Fedora Forums. Tip 1: Maximise and Minimise If you thought Ubuntu were naughty moving the buttons to the left, you [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some tips on how to make Gnome 3 behave a bit more like Gnome 2, to help you transition into this new and unfamiliar territory. Most of them are from <a href="http://forums.fedoraforum.org/showthread.php?t=263006">this thread on Fedora Forums</a>.</p>
<p><strong>Tip 1</strong>: <em>Maximise and Minimise</em></p>
<p>If you thought Ubuntu were naughty moving the buttons to the left, you aint seen nothing. Gnome completely removed the maximise and minimise buttons. To get them back run the following (as you, not using sudo or su):</p>
<pre class="brush: bash; title: ; notranslate">gconftool-2 -s -t string /desktop/gnome/shell/windows/button_layout &quot;:minimize,maximize,close&quot;</pre>
<p>To see the changes press ALT+F2, press 'r', and hit enter. Your shell will reload without closing any apps and the extensions will be applied.</p>
<p><strong>Tip 2</strong>: <em>Remove the accessibility icon from the top panel</em></p>
<p>This is done by installing the following Gnome 3 extension:</p>
<pre class="brush: bash; title: ; notranslate">su -c 'yum install gnome-shell-extension-remove-accessibility-icon'</pre>
<p><strong>Tip 3</strong>: <em>Enable 'Power off' in the status menu</em></p>
<p>Usually you have to hold ALT to see this, which is frankly bullshit. Luckily this is also easily remedied by installing an extension.</p>
<pre class="brush: bash; title: ; notranslate">su -c 'yum install gnome-shell-extensions-alternative-status-menu'</pre>
<p><strong>Tip 4</strong>: <em>Better window management</em></p>
<p>I don't really like the 'dock' for managing background applications which appears inside the activities area. My advice is to install Docky. Other docks are available such as avant window manager, but I think Docky is the best.</p>
<pre class="brush: bash; title: ; notranslate">su -c 'yum install docky'</pre>
<p>Edit: Docky crashes A LOT for me, on both F15 machines. I am going to try an alternative.</pre>
<p><strong>Tip 5</strong>: <em>Add programs to 'startup applications'</em></p>
<p>The dialog box was removed from the settings screen. You can access it by pressing ALT+F2 and typing gnome-session-properties into the box.</p>
<p><strong>Tip 6</strong>: <em>Enable desktop icons/shortcuts</em></p>
<p>Another classic, you can't create shortcuts ANYWHERE in Gnome 3. WTF. But, there is a nifty program in the yum repos called gnome-tweak-tool that can fix that. Install it and then launch 'Tweak Advanced Settings' from the apps menu, then switch 'Have file manager manage the desktop' to ON.</p>
<pre class="brush: bash; title: ; notranslate">su -c 'yum install gnome-tweak-tool'</pre>
<p><strong>Tip 7</strong>: <em>Add icons</em></p>
<p>You might want to add icons for missing things like the gnome-session-properties tool. If you yum install 'alacarte' you get a menu editor (straight from Gnome 2) to create your missing shortcut items.</p>
<p><del><strong>Tip 8</strong>: <em>Change the ALT+TAB behaviour</em></del></p>
<p><del>Alt+Tab changed slightly in Gnome 3. If you have multiple windows of the same type open, for example 2 terminal windows, when you alt tab you only see one of them. Then when you hover over the item in Alt+Tab, the multiple instances are shown. I am indifferent about this but if you want to restore Window based, rather than Application based Alt+Tab, there is another extension to install:</del></p>
<pre class="brush: bash; title: ; notranslate">su -c 'yum install gnome-shell-extensions-alternate-tab'</pre>
<p>Edit: This extension causes my shell to crash. I wouldn't recommend it.</pre>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2011/07/19/living-with-gnome-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unity (Ubuntu 11.04)</title>
		<link>http://ukstokes.com/blog/2011/06/08/unity-ubuntu-11-04/</link>
		<comments>http://ukstokes.com/blog/2011/06/08/unity-ubuntu-11-04/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 16:48:46 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=829</guid>
		<description><![CDATA[I am writing this post using Ubuntu 11.04 using the new ‘Unity Desktop’. In the interest of fairness and because I really don’t want to say goodbye to Ubuntu, I have been giving it a try for a while to see if I can adapt. Let me start with the criticism. There seem to be [...]]]></description>
			<content:encoded><![CDATA[<p><!-- ======================================================= --> <!-- Created by AbiWord, a free, Open Source wordprocessor.  --> <!-- For more information visit http://www.abisource.com.    --> <!-- ======================================================= --> <!-- #toc, .toc, .mw-warning { 	border: 1px solid #aaa; 	background-color: #f9f9f9; 	padding: 5px; 	font-size: 95%; } #toc h2, .toc h2 { 	display: inline; 	border: none; 	padding: 0; 	font-size: 100%; 	font-weight: bold; } #toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { 	text-align: center; } #toc ul, .toc ul { 	list-style-type: none; 	list-style-image: none; 	margin-left: 0; 	padding-left: 0; 	text-align: left; } #toc ul ul, .toc ul ul { 	margin: 0 0 0 2em; } #toc .toctoggle, .toc .toctoggle { 	font-size: 94%; }@media print, projection, embossed { 	body { 		padding-top:1in; 		padding-bottom:1in; 		padding-left:1in; 		padding-right:1in; 	} } body { 	font-family:'Times New Roman'; 	color:#000000; 	widows:2; 	font-style:normal; 	text-indent:0in; 	font-variant:normal; 	font-weight:normal; 	font-size:12pt; 	text-decoration:none; 	text-align:left; } table { } td { 	border-collapse:collapse; 	text-align:left; 	vertical-align:top; } p, h1, h2, h3, li { 	color:#000000; 	font-family:'Times New Roman'; 	font-size:12pt; 	text-align:left; 	vertical-align:normal; } --></p>
<div>
<p>I am writing this post using Ubuntu 11.04 using the new ‘Unity Desktop’. In the interest of fairness and because I really don’t want to say goodbye to Ubuntu, I have been giving it a try for a while to see if I can adapt.</p>
<p>Let me start with the criticism. There seem to be a lot of things which don’t make any sense to me. For example, why:</p>
<ul>
<li>the system settings are accessed by pressing the ‘power on/off’ icon</li>
<li>when I press the ‘menu’ button (the ubuntu button in the top left), my entire screen fills up with massive icons - my eyesight is actually fine and I’m using a laptop, not a tablet or touchscreen device.</li>
<li>on said Ubuntu menu, there is an icon called ‘more apps’ within the shortcuts.</li>
<li>if I click on ‘bin’ in the panel, I get ‘wastebasket’. They should be called the same thing. Why can't any Linux distros get this right!?</li>
<li>other than clicking the Home button, I cant see any way to open a file manager. I am also not able to rename my Home button to ‘File Manager’.</li>
</ul>
<p>&nbsp;</p>
<p>Additionally, I don’t seem to be able to customise this launcher at all other than by ‘pinning’ things to it. I can’t remove it and use something else. In fact if I go to the ‘system settings’ (ignoring the fact it then opens something called Control Centre, should be called ’System Settings’?), and then click on ‘Main Menu’, I get a dialog box for configuring the old Gnome menu, not the new Unity one. To me this seems to be a bit of a mess. I can't right click anywhere in the launcher. I don't see any method of editing the 'shortcuts' that appear.</p>
<p>The performance of Unity is pretty sluggish on my netbook (Samsung NC210). Full screen video is really choppy unless I run in a mode which has desktop compositing turned off.</p>
<p>What nice things can I say about it?</p>
<p>The global menu actually works quite well and gives me some more space back on my tiny netbook screen (I still go to the top right for my close button though). The menu options for a maximised program are now found on the top panel, like on a Mac.</p>
<p>Stability wise I have not had any application or system crashes. It’s been very stable.</p>
<p>The rest of the Ubuntu system is good. Installing software is really nice in the software centre. Getting audio codecs was easy during the install. The actual install itself was a piece of cake, too. But I think a 'What's new' screen and tour of Unity would have been helpful.</p>
<p>So, in summary I’ve got a user interface I don’t really like and can’t customise, which has worse graphical performance than on Gnome 2.x.</p>
<p>I feel quite sad to see the end of Gnome 2.x. It was a refined desktop that worked really well (particually the implementation from Ubuntu) and I’ve grown comfortable with it. Yes I know there is a 'classic mode' in Ubuntu which gives you Gnome 2, but Canonical have already said that option will not be there in 11.10. Sadly, I have not found Gnome 3 any better than Unity (which is the subject for another blog post perhaps). Xfce seems like a viable option, or even perhaps KDE4.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2011/06/08/unity-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A cunning problem with for loops</title>
		<link>http://ukstokes.com/blog/2011/03/18/a-cunning-problem-with-for-loops/</link>
		<comments>http://ukstokes.com/blog/2011/03/18/a-cunning-problem-with-for-loops/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 07:26:34 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Bash scripting]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=815</guid>
		<description><![CDATA[I came across a cunning little problem with for loops where the values being parsed contain spaces, and can offer a couple of solutions to it. I'll explain what I mean with some code. If you md5sum a bunch of files, you get this kind of output: I wanted to iterate through a list of [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a cunning little problem with for loops where the values being parsed contain spaces, and can offer a couple of solutions to it. I'll explain what I mean with some code.</p>
<p>If you md5sum a bunch of files, you get this kind of output:</p>
<pre class="brush: bash; title: ; notranslate">[ben@minitron ~]$ md5sum *.txt
d41d8cd98f00b204e9800998ecf8427e  myfile.txt
cdbd2b665e14f8803d6bddc80bff1402  omg.txt
6353f9b2e7c47f73b48eef4544968bcd  otherfile.txt</pre>
<p>I wanted to iterate through a list of files and their md5sums using a for loop, run a test and then take some action based on the result. But my script kept throwing unexpected output. I realised the for loop was parsing each word, rather than each line because of the spaces.</p>
<pre class="brush: bash; title: ; notranslate">[ben@minitron ~]$ for line in $(md5sum *.txt); do
echo $line; done
d41d8cd98f00b204e9800998ecf8427e
myfile.txt
cdbd2b665e14f8803d6bddc80bff1402
omg.txt
6353f9b2e7c47f73b48eef4544968bcd
otherfile.txt</pre>
<p>Sometimes putting spaces around variables can help bash to resolve values in the right way, but here it caused all line breaks to be removed:</p>
<pre class="brush: bash; title: ; notranslate">[ben@minitron ~]$ for line in &quot;$(md5sum *.txt)&quot;; do echo $line; done
d41d8cd98f00b204e9800998ecf8427e myfile.txt cdbd2b665e14f8803d6bddc80bff1402 omg.txt 6353f9b2e7c47f73b48eef4544968bcd otherfile.txt</pre>
<p>I needed to preserve the original line breaks in order for my script to make sense of which md5sum matched up to which file. There are a couple of ways to do this. One possible solution is to use <strong>tr </strong>to translate the spaces into a different character:</p>
<pre class="brush: bash; title: ; notranslate">[ben@minitron ~]$ for line in $(md5sum *.txt | tr &quot; &quot; :); do
echo $line; done
d41d8cd98f00b204e9800998ecf8427e::myfile.txt
cdbd2b665e14f8803d6bddc80bff1402::omg.txt
6353f9b2e7c47f73b48eef4544968bcd::otherfile.txt</pre>
<p>But for some reason md5sum uses 2 spaces for a field separator, if you wanted just one character between the md5sum and the filename, you could go a little more advanced:</p>
<pre class="brush: bash; title: ; notranslate">[ben@minitron ~]$ for file in *.txt; do
echo -n &quot;$file:&quot;;md5sum $file | cut -d &quot; &quot; -f1 ; done
myfile.txt:d41d8cd98f00b204e9800998ecf8427e
omg.txt:cdbd2b665e14f8803d6bddc80bff1402
otherfile.txt:6353f9b2e7c47f73b48eef4544968bcd</pre>
<p>This does give the output in the other way round but was good enough for me to make my script work.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2011/03/18/a-cunning-problem-with-for-loops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora 14 on a Samsung N210 netbook</title>
		<link>http://ukstokes.com/blog/2011/03/09/fedora-14-on-a-samsung-n210-netbook/</link>
		<comments>http://ukstokes.com/blog/2011/03/09/fedora-14-on-a-samsung-n210-netbook/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 17:48:37 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=754</guid>
		<description><![CDATA[Here are some musings on getting Fedora 14 working on a Samsung N210 netbook. Why Samsung N210? It's undeniable the Next Big Thing is tablets. I love new tech and I kind of want an Android Honeycomb tab, but they are still waaaay over priced. I considered getting an iPad as Android tabs are still [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some musings on getting Fedora 14 working on a Samsung N210 netbook.</p>
<p><strong>Why Samsung N210?</strong></p>
<p><a href="http://ukstokes.com/blog/wp-content/uploads/2011/03/Samsung-N210.jpg"><img class="size-thumbnail wp-image-799  alignleft" title="Samsung-N210" src="http://ukstokes.com/blog/wp-content/uploads/2011/03/Samsung-N210-150x150.jpg" alt="Samsung N210" width="84" height="84" /></a></p>
<p>It's undeniable the Next Big Thing is tablets. I love new tech and I kind of want an Android Honeycomb tab, but they are still waaaay over priced. I considered getting an iPad as Android tabs are still only just coming of age, but in the end I could not really justify double the cost of a netbook just for an alternate form factor and interface ... in my head I weighed up the following benefits of a netbook:</p>
<ul>
<li>More storage. The Samsung N210 has a 250Gb hard drive, big enough to fit all of my music and movies and still have extra room for iPlayer downloads - in fact it acts as backup for my desktop machine.</li>
<li>Better for typing. For example, writing this blog post.</li>
<li>Better for hacking. I guess this is debatable, since Android is a hackable platform.</li>
<li>A more practical on call companion. I can install work tools and vpn client and use it to rdp to my desktop. This can also be done from a tablet OS, but controling a mouse-driven desktop with fingers is tricky. Plus on a tablet when you bring up the keyboard, half of your screen is obscured.</li>
<li>Price. Netbooks are half the cost.</li>
</ul>
<p>There are possibly a few reasons why a tablet would be better.</p>
<ul>
<li>More convenient during rush hour commuting. You can stand up and pull it from your bag to read or watch a movie.</li>
<li>Battery life. I get about 6 hours from my netbook.  iPad  and competitors can go for about 9 hours I think.</li>
<li>Better interface. Another debatable one, most would agree that new tablet interfaces are pretty slick though.</li>
<li>More fun / better for gaming. But I don't really play games that much.</li>
<li>Portability. A tablet is marginally smaller and lighter.</li>
</ul>
<p>I think I am just not 100% sold on the tablet form factor yet, perhaps I will change my mind when tablets are more affordable.</p>
<p>So back to the N210 - by current netbook standards it pretty much falls into line with an Atom 1.6Ghz hyper threaded processor and 1Gb of RAM (I also purchased the 2Gb DIMM option from Amazon for £30). It only really sets itself apart from other similar netbooks by having a matt screen rather than glossy, which makes it more readable and less reflective in sunlight. I am averaging just over 6 hours of battery life between charges, this is with wireless and bluetooth always on, and usually with music streaming to bluetooth headphones or with video playing at full screen. The battery life is just below advertised but I am pleased with it. Amazon were selling it for just over £200 a few months ago because the Samsung were about to launch the successor to the N210 (which is pretty similar in specs but has a dual-core Atom chip).</p>
<p><strong>Why Fedora?</strong></p>
<p><img class="alignleft" title="Fedora Logo" src="http://ukstokes.com/images/fedora_logo.jpg" alt="Fedora Logo" width="78" height="78" />In my early days with Linux I hopped between distros a lot, but I had settled on Ubuntu and been a Ubuntu user until recently. But when I gave Ubuntu netbook remix (UNR) a test drive for a week I absolutely hated it. The UNR desktop called 'Unity' is a watered down experience for a power user, I couldn't even add an icon to the launcher bar and was frustrated that things like the file manager were difficult to access.</p>
<p>I don't resist change if there is good reason for it but I am getting annoyed by Ubuntu's deviation from standard conventions ... moving the close/maximise/minimise buttons to the left for no reason was their first bizarre move, and now moving the desktop experience to Unity on all Ubuntu installations has pretty much ended my interest in them.</p>
<p>A second reason, is since I use CentOS at work I thought I might get some technology previews by using it's upstream contributor - Fedora. I'll be able to get familiar with things like <a href="http://www.freedesktop.org/wiki/Software/systemd">SystemD</a> before they trickle down to Red Hat and derivatives.</p>
<p>I've also decided to use the traditional Gnome desktop rather than a netbook optimised environment, accepting that it will have a slightly bigger memory footprint than others - since this shoudn't be an issue for me with the 2b RAM upgrade.</p>
<p><strong>Configuration</strong></p>
<p>Like most netbooks the N210 doesn't have a CD tray, so I used <a href="http://unetbootin.sourceforge.net/">Unetbootin</a> to make a <a href="http://fedoraproject.org/get-fedora">Fedora</a> 14 USB stick and booted from that. And I was surprised to find almost everything worked from a fresh install! Desktop Linux has really come a long way since I first got my feet wet in 2005 ...</p>
<p>I noticed the Fn keys did not work, but the Fn volume control started working after I had updated all packages. The Fn controls for screen brightness were the only ones still not working, that was fixed by following instructions <a href="http://linuxtweaking.blogspot.com/2011/01/fedora-14-how-to-make-samsung-fn.html">here</a> and rebooting. The only major failure was the WiFi card which was not detected. The N210 uses a Realtek RTL8192E which is in the staging tree of the Fedora kernel, however rather than recompiling the kernel I chose to compile the driver from source as it seemed like less effort. The driver source can be found <a href="http://sites.google.com/site/johnfos...edirects=0&amp;d=1">here</a> - installing is straightforward:</p>
<pre class="brush: bash; title: ; notranslate">
su -
tar fzxv rtl8192e_linux_2.6.0014.0401.2010.tar.gz
cd rtl8192e_linux_2.6.0014.0401.2010
make
make install
reboot
</pre>
<p><strong>Note</strong>: WiFI drivers will break if the kernel is updated. Just return to your source directory and rebuild again (make &amp;&amp; make install) and it will be fixed. Or select to skip updates to the kernel package.</p>
<p>I was surprised to learn the touchpad on most Samsung netbooks are multitouch capable and let you use 2 fingered gestures for scrolling. To enable that in Fedora add the following to a file, make it executable and then set it as a startup application in the gnome preferences menu:</p>
<pre class="brush: bash; title: ; notranslate">
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient EmulateTwoFingerMinW=5
synclient EmulateTwoFingerMinZ=48
</pre>
<p>Credit goes to <a href="http://josthalen.wordpress.com/2010/07/03/linux-on-samsung-n210/">here</a> for that discovery. Failing that, just enable the "edge scrolling" feature in Gnome, which lets you scroll up and down using the right-hand edge of the touchpad.</p>
<p><strong>Sounds good to me</strong></p>
<p>I use Nokia BH-905 stereo bluetooth headphones paired with the netbook for music and video. This actually works out of the box, but A2DP is not enabled by default. After pairing your headset you have to open the Sound preferences dialog, on the Hardware tab choose A2DP, and on the Output tab you should then see you can select Stereo next to the headset. This is then remembered the next time you reboot.</p>
<div id="attachment_806" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-806 " title="nokia-bh905" src="http://ukstokes.com/blog/wp-content/uploads/2011/03/nokia-bh905-150x150.jpg" alt="Nokia BH-905" width="150" height="150" /><p class="wp-caption-text">Nokia BH-905</p></div>
<p>With all the hardware problems sorted, the biggest problem in Fedora is with missing codecs for my movie files, I guess I should have known what I was getting into there with Fedora ... There isn't a package in the Fedora repos (like ubuntu-restricted-extras)  that sorts out codecs in one big hit. The bundled "Movie Player" causes selinux security failures if you try to let it find codecs automatically, and if you disable selinux and try again you will just get a Unable to find codecs message which links you to the <a href="https://fedoraproject.org/wiki/PackageKit_Items_Not_Found#Missing_Codec">fedora FAQ</a> (it basically says go and use Google, you're on your own).</p>
<p>So a bit of a FAIL by Fedora there, the codec discovery feature from "Movie Player" is basically completely broken and may as well not even be there. Oh well.</p>
<p><strong>Making it look pretty</strong></p>
<p>The standard Gnome desktop on Fedora is plain and simple and doesn't look very spectacular. I was looking for netbook optimised GTK themes and came across the <a href="http://tiheum.deviantart.com/art/Faenza-Icons-173323228">faenza icons</a> set (and the bokeh effect wallpaper from the same page), and <a href="http://gnome-look.org/content/show.php/Equinox+GTK+Engine?content=121881">Equinox GTK</a> theme for Gnome which look great. I also scrapped the bottom panel and replaced it with <a href="http://do.davebsd.com/wiki/Docky">Docky</a> for window switching and app launching.</p>
<p style="text-align: center;"><a href="http://ukstokes.com/images/desktop.png"><img title="My Desktop" src="http://ukstokes.com/images/desktop.png" alt="My Desktop" width="170" height="100" /></a><a href="http://ukstokes.com/images/desktop.png"><br />
</a><a href="http://ukstokes.com/images/desktop.png"><em>My Desktop</em></a></p>
<p>I use VLC as my media player for Video as it plays any file format without separate codec packages to be installed. I found a dark theme for VLC on their site that goes with my desktop theme.</p>
<p>The Plymouth boot screen was defaulting to an ugly failsafe mode. I just needed to rebuild my initrd and it looked good after that. I installed the Fedora Spinfinity theme which looks pretty good.</p>
<p><strong>Wrap up</strong><br />
Time to wrap up as this is already getting a bit waffly. I'm pleased with my Samsung N210. It's no powerhouse but with F14 installed it certainly runs faster than it did with the factory installed Windows 7 image. With a bit of tweaking everything in Fedora 14 is supported, and I think it's worth the effort. If you get stuck there is loads of support available. And with the regular releases you can ensure you're running the latest and greatest of everything, if like me, you're into that sort of thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2011/03/09/fedora-14-on-a-samsung-n210-netbook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automatic X forwarding</title>
		<link>http://ukstokes.com/blog/2010/11/10/automatic-x-forwarding/</link>
		<comments>http://ukstokes.com/blog/2010/11/10/automatic-x-forwarding/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 22:05:46 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Enterprise Linux]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=733</guid>
		<description><![CDATA[At work I've found I often need to bring up X applications like jvisualvm, or HPSUM, while I administer Linux servers from my Windows 7 machine. This is how I automatically set the $DISPLAY variable on the bash session to point to my machine: Add the following to the end of your .bash_profile: Then on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ukstokes.com/blog/wp-content/uploads/2010/11/xorg.jpg"><img src="http://ukstokes.com/blog/wp-content/uploads/2010/11/xorg-150x150.jpg" alt="" title="xorg" width="80" height="80" class="alignleft size-thumbnail wp-image-743" /></a>At work I've found I often need to bring up X applications like jvisualvm, or HPSUM, while I administer Linux servers from my Windows 7 machine. This is how I automatically set the $DISPLAY variable on the bash session to point to my machine:</p>
<p>Add the following to the end of your .bash_profile:</p>
<pre class="brush: bash; title: ; notranslate">export DISPLAY=$(who am i | awk -F &quot;(&quot; {'print $2'} | awk -F &quot;.&quot; {'print $1'}):0.0</pre>
<p>Then on my Windows 7 laptop, I installed <a href="http://sourceforge.net/projects/xming/files/">xming</a> and configured xlaunch to start automatically when the computer is started (with the "no access control" box ticked). </p>
<p>Now I can just SSH to servers and launch X apps, and they appear on my desktop with no configuration required.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2010/11/10/automatic-x-forwarding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>D-Link DWA-131 and Ubuntu</title>
		<link>http://ukstokes.com/blog/2010/05/12/d-link-dwa-131-and-ubuntu/</link>
		<comments>http://ukstokes.com/blog/2010/05/12/d-link-dwa-131-and-ubuntu/#comments</comments>
		<pubDate>Wed, 12 May 2010 21:50:46 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=628</guid>
		<description><![CDATA[I recently bought this wireless-n USB adaptor for use with Ubuntu as I had read it was "Linux compatible", or at least as compatible as a wireless card can be with Linux. It proved tricky to get working, so this post may help others who are thinking of attempting the same thing. There are basically [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ukstokes.com/blog/wp-content/uploads/2010/05/nano-usb.jpg"><img class="alignleft size-full wp-image-668" title="D-Link DWA-131" src="http://ukstokes.com/blog/wp-content/uploads/2010/05/nano-usb.jpg" alt="" width="114" height="103" /></a>I recently bought this wireless-n USB adaptor for use with Ubuntu as I had read it was "Linux compatible", or at least as compatible as a wireless card can be with Linux. It proved tricky to get working, so this post may help others who are thinking of attempting the same thing.</p>
<p>There are basically 2 ways to make this usb dongle work, once you have overcome the first hurdle and discovered that this uses the Realtek 8192 chipset inside.</p>
<p><strong>The easy way</strong><br />
Easiest method is to use the Windows Realtek driver and a nifty program called ndiswrapper (or ndisgtk if you prefer to use a graphical interface). The drawback is this will only give you wireless-g capability, not wireless-n. Here's how (you can get the driver from <a href="http://members.driverguide.com/driver/detail.php?driverid=1689953&amp;action=filfo">here</a> if you don't have a driver disk):</p>
<pre class="brush: bash; title: ; notranslate">unzip UGL2430-U2H2_XP_Vista.zip
sudo ndiswrapper -i XP_Vista/88_91_92_SU_Driver/WinXP2K/net8192su.inf
sudo ndiswrapper -l
sudo ndiswrapper -m
sudo modprobe ndiswrapper
iwconfig</pre>
<p>Then you can manage your newly created "wlan0" or "wlan1" device using Network manager, or you can configure it manually if you like.</p>
<p><strong>The hard way (recommended)</strong><br />
To get the full wireless-n potential from this usb dongle you have to compile the Realtek driver from source. The drawback to this process is it is complicated, several prerequisite steps are required.</p>
<p>Download the driver files from here: <a href="http://www.opendrivers.com/modeldriver/RealTek_Network_RTL8191SU-driver-download.html">RealTek_Network_RTL8191SU-driver-download</a> and save it to ~/realtek</p>
<p>Assuming that your kernel version is 2.6.32 (check using uname -r) get the kernel source:</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get install build-essential linux-source-2.6.32 linux-headers-generic
cd /usr/src
sudo tar -xvjf linux-source-2.6.32.tar.bz2
sudo ln -s /usr/src/linux-source-2.6.32 /usr/src/linux</pre>
<p>If this was all fine, go back and unzip the driver file:</p>
<pre class="brush: bash; title: ; notranslate">cd ~/realtek
unzip rtl8191SU_usb_linux_v2.6.0006.20100226.zip
cd rtl8191SU_usb_linux_v2.6.0006.20100226/driver
tar fzxv rtl8712_8188_8191_8192SU_usb_linux_v2.6.0006.20100226.tar.gz
cd rtl8712_8188_8191_8192SU_usb_linux_v2.6.0006.20100226/</pre>
<p>Now for the crazy part. You now have to hack the source code of the driver to stop it from throwing build errors. Follow the instructions <a href="http://samiux.blogspot.com/2010/05/howto-realtek-8192su-usb-dongle.html">in this blog post first</a>, and then it will build successfully. Do the 'make' and 'make install' <strong>as root</strong> (sudo su -)</p>
<pre class="brush: bash; title: ; notranslate">make
make install
depmod -a
modprobe 8712u
iwconfig</pre>
<p>Now you should have full wireless-n networking on this device, iwconfig will show "IEEE 802.11bgn" if it was installed correctly.</p>
<p><strong>Edit: </strong>Looks like there is now an easier way to do this, <a href="http://ubuntuforums.org/showpost.php?p=9690593&#038;postcount=8">explained here on the Ubuntu Forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2010/05/12/d-link-dwa-131-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The thin client project</title>
		<link>http://ukstokes.com/blog/2009/09/12/the-thin-client-project/</link>
		<comments>http://ukstokes.com/blog/2009/09/12/the-thin-client-project/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 20:59:00 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[thin client]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=463</guid>
		<description><![CDATA[On our small remote sites we use HP thin clients to connect to applications using Citrix. The thin clients are Linux based, with 1Gb of flash memory for storage and running an HP customised version of Debian. The distro is basically a cut down Gnome desktop with Iceweasel (Firefox), and some HP branding and tools [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ukstokes.com/blog/wp-content/uploads/2009/08/100px-NewTux.svg.png"><img class="size-full wp-image-484 alignleft" title="Tux" src="http://ukstokes.com/blog/wp-content/uploads/2009/08/100px-NewTux.svg.png" alt="Tux" width="100" height="120" /></a>On our small remote sites we use HP thin clients to connect to applications using Citrix. The thin clients are Linux based, with 1Gb of flash memory for storage and running an HP customised version of Debian. The distro is basically a cut down Gnome desktop with Iceweasel (Firefox), and some HP branding and tools for backing up and restoring the client and for connecting to HP printers.</p>
<p>We've recently had some downtime with ADSL connections in these sites and wanted a contingency for network problems. We came up with the idea of 3G USB dongles and had bought a Vodafone one, but after testing it, the conclusion was this would not work without a lot of hacking about with the packages available in the HP Distro. However, after some testing in <a href="http://www.ubuntu.com">Ubuntu</a> we found it worked perfectly with the most recent version of Network Manager. With Network Manager you can basically just insert the key and after a minute right-click the tray icon, select 'Vodefone 3G' and you're off (yes, incredibly it really is that good). So ... the challenge was to reconfigure our thin clients, so that:</p>
<p>- It used Ubuntu and Network Manager<br />
- It could be easily deployed by a user from booting a USB stick<br />
- Had a system to allow IT to make changes to the image and re-image the USB stick<br />
- The USB sticks should be easily cloned to distribute to all remote offices.</p>
<p>I can't resist a good challenge, expecially when it involves tinkering with Linux.</p>
<p><strong>1. Installing a lean and mean Ubuntu machine</strong><br />
This step was a challenge in in itself - Ubuntu Jaunty would not boot into a live session on this computer, (kernel modules were failing to load right at the start) and doing a basic text based install (with no GUI elements) pretty much filled the entire drive, give or take a few Mb!</p>
<p>I had partitioned the disk with no swap partition, 100Mb for home and 70Mb for boot. I set off by removing unwanted locales from the system using 'locale purge':</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get install localepurge
sudo apt-get clean</pre>
<p>I decided I would go for <a href="http://www.xfce.org/about/screenshots">XFCE</a> for the Window manager, since it was impossible to install a Gnome desktop without hundreds of megs of bloat. All I really need is a desktop with a web browser so installing a Gnome desktop seems like overkill.</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get install xfce4</pre>
<p>This automatically pulls in all of the dependancies, like the X-Window system. Next to start reclaiming used disk space. To find out which directories were using the most space I used du:</p>
<pre class="brush: bash; title: ; notranslate">sudo du / -h --max-depth=1 | grep M</pre>
<p>The main culprets were /usr/share and /lib. Deleting items from /lib is not advisable, removing the dependant packages and then using an 'apt-get autoremove' will tidy them up the clean way. I prefer to use Synaptic to do this rather than apt-get, some things are just better and faster using a GUI.</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get install synaptic
xfce4-session</pre>
<p>From within XFCE, I launched Synaptic and removed everything that was unnecessary. Afterwards went back into /usr/share and used du to locate the large DIR's again. I removed gimp files and unnecessary locales:</p>
<pre class="brush: bash; title: ; notranslate">cd /usr/share
sudo rm -rf gimp
sudo mv locale/en .
sudo mv locale/en_GB .
sudo rm -rf locale/*
sudo mv en locale
sudo mv en_GB locale</pre>
<p>Removed unnecessary docs, myspell and redundant openoffice.org components. Have no idea why these were even installed in the first place since the openoffice suite was not installed ... totally unnecessary bloat!</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get remove myspell-en myspell-en-gb
sudo rm /var/lib/dpkg/info/openoffice* -f
sudo dpkg -r --force-remove-reinstreq openoffice.org-hyphenation-en-us
sudo dpkg --purge openoffice.org-hypnenation-en-us
sudo tar fzvc /home/docs.tgz doc --remove-files</pre>
<p>I deleted /home/docs.tgz after a reboot, since nothing stopped working. :-)</p>
<p>Next got rid of unwanted XFCE themes:</p>
<pre class="brush: bash; title: ; notranslate">cd /usr/share/themes
sudo mkdir ../themes_OLD
sudo mv * ../themes_OLD/
sudo mv themes_OLD/Def* .
sudo mv themes_OLD/Xfce* .
sudo rm -rf themes_OLD</pre>
<p>Installed Firefox, usplash (pretty startup screen) and the all-important Network Manager:</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get install firefox usplash network-manager</pre>
<p>To get the Network Manager tray icon in XFCE, you just have to configure 'nm-applet' to start when XFCE is started. Tested Network Manager using the Vodafone 3G dongle and success, it worked first time! Citrix sessions actually run quite well over 3G too.</p>
<p>Once last package cleanup, for good measure:</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get remove synaptic
sudo apt-get autoremove
sudo apt-get clean</pre>
<p>This left me around 30Mb free on /, which is pretty much what I had started with on the HP/Debian distro.</p>
<p>Last few bits were configuring the user to auto login, installing printers using CUPS, installing the Citrix client (this goes into the users /home directory), setting desktop background, and a few other customisations, like configuring Firefox to automatically purge data when closed ... that 100Mb home partition would fill up pretty quickly otherwise.</p>
<p>The autologon to XFCE without a login manager was a bit tricky since Ubuntu uses Upstart to manage the startup sequence rather than the traditional Linux sysinit, since this is a bit unfamiliar to me I had to follow some guides on the <a href="http://ubuntuforums.org">Ubuntu forums</a> to get it working. The community support is excellent though, which is one other reason we chose it in the move away from the HP thin client distro. There always seems to be someone before you who has already had the same problem!</p>
<p><strong>2. User friendly imaging from a bootable USB stick</strong><br />
My weapon of choice for this initially was the Linux tool 'dd', which does block level duplication of partitions or sections of a disk quite easily. For example to clone the second partition on disk 'hda' to a file, you could use:</p>
<pre class="brush: bash; title: ; notranslate">dd if=/dev/hda2 of=/myimages/thin_client_hda2.img</pre>
<p>dd can also be piped into tar or zip to compress the output. One drawback is dd does also duplicate white space into the output file, so it's not the most efficient tool for the job. My tests with dd were not very successful, creating the image was fine, but writing the image back to disk always failed complaining it had run out of disk space.</p>
<p>I dumped dd and started looking into <a href="http://clonezilla.org/">CloneZilla</a>. It's an open source partition and disk imaging tool that boots from CD or USB and can dump a disk image locally, or to an NFS or Samba share. It is comparible to norton ghost in features but not quite as friendly in the GUI department, since the menus are all text based and keyboard controlled. Clonezilla can dump an image to usb attached or to windows or NFS shares and can even be set up as a PXE server to multicast images across a network and image multiple machines at once, but it's most common form is imaging a single machine in live mode. To dump a disk image locally I has to split my usb stick into 2 partitions : 500Mb for Clonezilla (formatted in fat32) and 1.5Gb for the partition images (formatted in ext3). This was necessary as you can't write images to the filesystem clonezilla has booted from.</p>
<p>I used <a href="http://unetbootin.sourceforge.net/">unetbootin</a> (awesome utility) to write the Clonezilla iso to the usb stick and make it bootable. You may notice unetbootin already contains a Clonezilla option, I did try using this but the stick that was created was somehow missing important files from /etc/ocs, so I'd advise downloading the latest iso from clonezilla first, and then just using unetbootin wo write the iso file.</p>
<p style="text-align: center;"><a href="http://ukstokes.com/blog/wp-content/uploads/2009/09/unetbootin.PNG"><img class="size-medium wp-image-513 aligncenter" title="unetbootin" src="http://ukstokes.com/blog/wp-content/uploads/2009/09/unetbootin-300x220.PNG" alt="unetbootin" width="300" height="220" /><em><br />
Unetbootin</em></a></p>
<p>Next boot from the stick but instead of going into an interactive session, choose the command line mode. Grant yourself root access by using:</p>
<pre class="brush: bash; title: ; notranslate">sudo su -</pre>
<p>Edit the syslinux.cfg file to customise the boot menu.</p>
<pre class="brush: bash; title: ; notranslate">vi /live/image/syslinux.cfg</pre>
<p>If you've ever created a Linux PXE server you'll recognise the layout of this file. By editing this and passing different options to the kernel at boot, you can launch custom clonezilla scripts without user interaction. My syslinux.cfg looked like this ... the top menu item becomes the default, so this configuration will automatically restore the thin client from the usb stick if there is no interaction for 10 seconds - perfect for sending to users on remote sites.</p>
<pre class="brush: bash; title: ; notranslate">default vesamenu.c32
prompt 0
menu title UNetbootin
timeout 100

label restore
menu label Restore image from USB stick
kernel /ubnkern
append initrd=ubninit boot=live union=aufs vga=788 ip=frommedia ocs_live_run=&quot;/live/image/pkg/custom-ocs-restore&quot; ocs_live_extra_param=&quot;&quot; ocs_live_keymap=&quot;NONE&quot; ocs_live_batch=&quot;yes&quot; ocs_lang=&quot;en_us.UTF8&quot;

label backup
menu label Backup image to USB stick
kernel /ubnkern
append initrd=ubninit boot=live union=aufs vga=788 ip=frommedia ocs_live_run=&quot;/live/image/pkg/custom-ocs-backup&quot; ocs_live_extra_param=&quot;&quot; ocs_live_keymap=&quot;NONE&quot; ocs_live_batch=&quot;yes&quot; ocs_lang=&quot;en_us.UTF8&quot;

label unetbootindefault
menu label CloneZilla Live Session
kernel /ubnkern
append initrd=/ubninit boot=live union=aufs    nolocales ocs_live_run=&quot;ocs-live-general&quot; ocs_live_extra_param=&quot;&quot; ocs_live_keymap=&quot;&quot; ocs_live_batch=&quot;no&quot; ocs_lang=&quot;&quot; vga=791 ip=frommedia</pre>
<p>The <strong>ocs_live_run </strong>parameter in each stanza points to the custom script you want to run. These scripts have to exist in /live/image/pkg and be marked as executable. They can be called anything you like. Some examples already exist on the live cd, can't remember the exact location but I found them using:</p>
<pre class="brush: bash; title: ; notranslate">find / -name &quot;custom-ocs*&quot;</pre>
<p>My backup and restore scripts looked like this:</p>
<p><strong>/live/image/pkg/custom-ocs-backup</strong></p>
<pre class="brush: bash; title: ; notranslate">#!/bin/bash

DRBL_SCRIPT_PATH=&quot;${DRBL_SCRIPT_PATH:-/opt/drbl/}&quot;

. $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
. $DRBL_SCRIPT_PATH/conf/drbl-ocs.conf
. $DRBL_SCRIPT_PATH/sbin/ocs-functions

if [ -e /etc/ocs/ocs-live.conf ]; then   . /etc/ocs/ocs-live.conf; fi
ask_and_load_lang_set en_US.UTF-8

mkdir -p /home/partimag
mount /dev/sda2 /home/partimag

/opt/drbl/sbin/ocs-sr -q2 -c -j2 -z1 -i 2000 -p true savedisk &quot;maverick-img&quot; &quot;hda&quot;</pre>
<p><strong>/live/image/pkg/custom-ocs-restore</strong></p>
<pre class="brush: bash; title: ; notranslate">#!/bin/bash

DRBL_SCRIPT_PATH=&quot;${DRBL_SCRIPT_PATH:-/opt/drbl/}&quot;

. $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
. $DRBL_SCRIPT_PATH/conf/drbl-ocs.conf
. $DRBL_SCRIPT_PATH/sbin/ocs-functions

if [ -e /etc/ocs/ocs-live.conf ]; then   . /etc/ocs/ocs-live.conf; fi
ask_and_load_lang_set en_US.UTF-8

mkdir -p /home/partimag
mount /dev/sda2 /home/partimag

/opt/drbl/sbin/ocs-sr -g auto -c -p true restoredisk &quot;maverick-img&quot; &quot;hda&quot;</pre>
<p>I got stuck in a few places, the project maintainer (Steven Shiau) helped me out on the <a href="http://sourceforge.net/forum/forum.php?forum_id=663168">clonezilla forums</a> (thanks Steven).</p>
<p><strong>3. Cloning the USB stick</strong></p>
<p>Gah ... well I've got this working using dd ... but I need a Windows tool that can do this since the IT Service Desk are all on Windows machines! Provided the partitions on the USB stick are the correct size, one can use:</p>
<pre class="brush: bash; title: ; notranslate">dd if=/dev/sda1 of=/dev/sdb1 conv=notrunc
dd if=/dev/sda2 of=/dev/sdb2 conv=notrunc</pre>
<p>What Windows tool can I use to do this ... don't really have the time to spend but I am thinking a 3rd option in the Clonezilla boot menu for duplicating the stick. Perhaps a 2nd part in the future to this already too long blog post!</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/09/12/the-thin-client-project/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Adventures in wine</title>
		<link>http://ukstokes.com/blog/2009/01/13/adventures-in-wine/</link>
		<comments>http://ukstokes.com/blog/2009/01/13/adventures-in-wine/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 22:24:29 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Desktop Linux]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=117</guid>
		<description><![CDATA[I've been working a lot with Wine at the moment. No, that doesn't mean I've been getting sloshed at my desk at work. Actually for the last month or so I have been running Linux on my laptop - not dual booting - I've been using Linux as my sole operating system. Since time at [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-118" title="Wine (Is not an emulator)" src="http://ukstokes.com/blog/wp-content/uploads/2009/01/images.jpeg" alt="" width="77" height="124" />I've been working a lot with Wine at the moment. No, that doesn't mean I've been getting sloshed at my desk at work. Actually for the last month or so I have been running Linux on my laptop - not dual booting - I've been using Linux as my sole operating system. Since time at work is divided 50/50 between Windows and Linux administration, I wondered it if might be helpful to administer Linux, from Linux, and I also wanted to use it as an opportunity to learn more about the inner workings of the OS. Since we use Red Hat only at work I've gone for CentOS 5.2 (for those that don't know, it's a very close clone of Red Hat) as my distro of choice.</p>
<p>I do still need to run Windows software though. I tried just using Citrix for my WIndows apps at first, but it became annoying after a while for various reasons - mainly copy and paste not working, and not being able to browse my own filesystem from the Citrix server, for say adding an attachment to a message.</p>
<p>Instead I am running Windows apps in Linux by using Wine (which stands for Wine Is Not an Emulator). It's an open source implemtation of the Windows API that can run on Linux, Unix and Mac systems.</p>
<p>There are really 2 things that I want to mention in this post, and the first is winetricks. Presuming you have first installed Wine, using:</p>
<p>[lang="bash"]yum install wine[/lang]</p>
<p>Winetricks can can just be downloaded and run like this:</p>
<p>[lang="bash"]wget http://www.kegel.com/wine/winetricks<br />
chmod 755 ./winetricks<br />
./winetricks[/lang]</p>
<p>This presents you with a GTK menu where you can select the Windows apps you want installed. Winetricks then fetches the download and installs in your 'fake windows' for you. I found this especially handy for .NET Framework 2.0 and Windows Installer 2.0, which I wanted for the VMware Virtual Infrastructure Client. The VI Client then installed using Wine, but incidentally still would not run. Nonetheless winetricks is the best Wine helper-app I've seen so far.</p>
<p><center><a href="http://ukstokes.com/images/winetricks.png"><img class="alignnone" title="Winetricks" src="http://ukstokes.com/images/winetricks.png" alt="" width="298" height="222" /></a><br />
<em>winetricks</em></center><br />
I can't say that I'm completely happy still, I've given up on Outlook 2007 as it was too buggy and am now using Office 2003, it is still a bit ropey in places (my preview window quite often breaks) but I guess I can work around the problems as they are not showstoppers. I've tried using Evolution as an open source alternative to Outlook, but being a guy why has used Outlook every day for many years, it seemed inferior in almost every way, and of course the integration with Exchange is never going to be as good as Microsoft's own Exchange client.</p>
<p>By the way if you're going to use Crossover Linux, I would use it exclusively for managing your Windows apps, rather than using Crossover, winetricks, and installing your own stuff just by running <em>wine setup.exe</em>. I found mixing and matching caused Office to become even more buggy than usual.</p>
<p>The second thing I wanted to mention is <a href="http://www.codeweavers.com/products/cxlinux/" target="_blank">Codeweavers Crossover Linux</a>. Wine is actually not difficult to use, but the general consensus on the Internet is it's not possible to get Outlook 2003/2007 working on Linux using Wine. This is where Crossover Linux steps in and makes it possible, and also makes it very easy to do so using a nice graphical interface. Crossover Linux is not free (usually it's $44), but I was lucky to get in there a few months back when they were giving it away free for a day.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/01/13/adventures-in-wine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

