<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title><![CDATA[LinuxQuestions.org - Blogs - Tim's Bio-Linux tips by avarus]]></title>
		<link>http://www.linuxquestions.org/questions/blog/avarus-108601/</link>
		<description>LinuxQuestions.org offers a free Linux forum where Linux newbies can ask questions and Linux experts can offer advice. Topics include security, installation, networking and much more.</description>
		<language>en</language>
		<lastBuildDate>Thu, 23 May 2013 08:27:42 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>https://lqo-thequestionsnetw.netdna-ssl.com/questions/images/misc/rss.jpg</url>
			<title><![CDATA[LinuxQuestions.org - Blogs - Tim's Bio-Linux tips by avarus]]></title>
			<link>http://www.linuxquestions.org/questions/blog/avarus-108601/</link>
		</image>
		<item>
			<title>Changing the default keyboard on Ubuntu 12.04 Live CD</title>
			<link>http://www.linuxquestions.org/questions/blog/avarus-108601/changing-the-default-keyboard-on-ubuntu-12-04-live-cd-35105/</link>
			<pubDate>Tue, 30 Oct 2012 13:07:36 GMT</pubDate>
			<description><![CDATA[Hi, 
 
This isn't a user tip - as you can probably see I didn't do very well keeping up on those.  Instead here's a rather technical and long-winded...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
This isn't a user tip - as you can probably see I didn't do very well keeping up on those.  Instead here's a rather technical and long-winded commentary about what is going on regarding setting the default keyboard on the Ubuntu 12.04 Live CD, from a British perspective.  This is important to me because I use the customised Bio-Linux Live USB stick image for teaching purposes, and I use it in UK academic labs.  If the first thing I have to do in each course is to get the students to change their default keyboard then it looks rather unprofessional and it begs the question &quot;If you're such a Linux guru and you made a custom distro why don't you just change the default keyboard?&quot;.  Well, heck, I AM a Linux guru and I will have my own default keyboard!  But it wasn't easy.<br />
<br />
First attempt - I looked for advice on <a href="https://help.ubuntu.com/community/LiveCDCustomization" target="_blank" rel="nofollow">https://help.ubuntu.com/community/LiveCDCustomization</a>.  This tells you how to change the default language but not the default keyboard.  However, an older version suggested this (to be run in the chroot before remastering - if that doesn't make sense to you then you need to read the Ubuntu help page first):<br />
<br />
update-locale LANG=en_GB.UTF-8 LANGUAGE=en_GB.UTF-8 LC_ALL=en_GB.UTF-8 LC_NUMERIC=en_GB.UTF-8<br />
<br />
No joy at all.  Setting the locale doesn't switch the keyboard and in any case the configuration for the locale is probably managed more appropriately by some package configuration.  I'm not sure.  Anyway I know I now have the settings I want in /etc/default/locale and yet it makes no difference to the keyboard.<br />
<br />
Second attempt - I used the F3 boot menu in Syslinux to set a UK keyboard, which works, then booted up and looked at the resulting boot stanza (handily available in /proc/cmdline).  Then I edited txt.cfg in syslinux to try and make this the default.  Simple, or at least this had worked previously in 10.04, but this time no joy.  The thing I tried to add was:<br />
&quot;keyboard-configuration/layoutcode=gb&quot;<br />
(In Ubuntu 10.04 the equivalent, that actually worked, was:<br />
locale=en_GB bootkbd=gb console-setup/layoutcode=gb)<br />
<br />
Third attempt - I noticed that &quot;keyboard-configuration/layoutcode=gb&quot; looks like a debconf setting, so I tried (this time on a live image):<br />
dpkg-reconfigure keyboard-configuration<br />
<br />
Ok, this seemed to work.  My keyboard was now fixed.  So I did it in the chroot and remastered.  But no joy.  The console keyboard on the VT (Ctrl+Alt+F2) is set correctly to &quot;gb&quot; but the default keyboard in X is still &quot;us&quot;.  Grrr.<br />
<br />
Fourth attempt.  After much digging and fiddling and rebooting I realised the following:<br />
<br />
(A) If you get an Ubuntu 12.04 live CD and boot it in default mode, then select &quot;try without installing&quot;, you get a US keyboard setup in X with a keyboard switcher icon in the top right that lets you select a US or GB keyboard (and 2 others we don't care about).  But even booting with a persistent USB stick rather than a CD this setting does not get saved between reboots.<br />
<br />
(B) If you interrupt the boot and select a GB keyboard in the Syslinux F3 menu you get a GB keyboard and the keyboard switcher is absent (or, if it appears, shows only the GB option).<br />
<br />
If you start off with (A) and, in a terminal in X, run &quot;dpkg-reconfigure keyboard-configuration&quot; to set a GB keyboard you end up in what looks like (B).<br />
<br />
If you start off with (B) and run &quot;ubiquity -g --only&quot; you end up with a US keyboard and looking like (A).<br />
<br />
Aha - now it starts to make sense.  The above ubiquity system is run like this on a default live boot in order to let the user set their language and to present the options for a live session vs. an installation without the user having to see the ugly Syslinux menus.  Certain boot-time options set by Syslinux skip this Ubiquity &quot;greeter&quot; dialogue, but if it does run it takes over the keyboard settings.  So, is it possible that somewhere in Ubiquity this behaviour is hard-coded??<br />
<br />
Indeed it is - and fortunately as ubiquity is Python-based we can dig right in to look.  Reading through /usr/lib/ubiquity/ubiquity/misc.py reveals the culprit around line 620.  In 10.04, Ubiquity already ran a very similar greeter window on startup and was happy to leave the keymap alone, but since 10.04 it has been tasked with setting appropriate options in the Gnome keyboard switcher, depending on the language selected in the GUI, and the approach is very hacky, with a hard-coded list of default keyboards for different languages.  This code runs even if nothing is clicked by the user and, when libgnomekbd receives the new settings via a gsettings call, the first keyboard it selects ends up as default and is activated.  So, seeing the hard-coded list, one thing is clear - unless I bypass ubiquity altogether by fiddling the default boot options I'll need to edit this file in some way.<br />
<br />
The former option is quite possible (it involves rebuilding the gfxboot module for Syslinux but this is covered in the Wiki above).  But then it would also be nice to still have the keyboard switcher because the Bio-Linux distro I'm making has US users, and they have US keyboards.  So, the obvious thing is to set the default &quot;en&quot; keyboard to &quot;gb&quot; in the misc.py internal mapping table.  Not quite - now I lose the US option entirely and get &quot;Irish&quot;.  I didn't even know there was a special Irish keyboard (joking aside - <a href="http://goo.gl/1lFuV" target="_blank" rel="nofollow">http://goo.gl/1lFuV</a>).<br />
<br />
Fifth attempt.  My final solution is not ideal - one final hack in the misc.py file - but it's good enough for me.  I edited the &quot;restrict_list&quot; function so that, just before it returns, if the first and third keymaps are &quot;us&quot; and &quot;gb&quot; it swaps them round and promotes &quot;gb&quot; to the top spot.  And this does the trick.  The patch looks like this:<br />
<br />
# Patch to add my workaround for the keyboard mapping issue.<br />
# Apply with:<br />
#  patch -d ~/reconstructor/root/usr/lib/ubiquity/ubiquity/ &lt; fux_misc_py.patch<br />
*** old/misc.py	2012-07-17 21:55:21.000000000 +0100<br />
--- new/misc.py	2012-10-29 18:21:48.000000000 +0000<br />
***************<br />
*** 699,706 ****<br />
--- 699,711 ----<br />
  <br />
          # gsettings doesn't understand utf8<br />
          new_variants = [str(variant) for variant in new_variants]<br />
  <br />
+ 	#Hack added for Bio-Linux to prefer gb keyboard over us<br />
+         if new_variants[0] == &quot;us&quot; and new_variants[2] == &quot;gb&quot; :<br />
+           new_variants[0] = str(&quot;gb&quot;)<br />
+           new_variants[2] = str(&quot;us&quot;)<br />
+ <br />
          return new_variants<br />
  <br />
      def call_setxkbmap(variants):<br />
          kb_layouts = []<br />
<br />
I can't see any other way that doesn't either lose the keyboard switcher for US users or involve major re-coding, so this is what I've stuck with.<br />
<br />
TIM</div>

]]></content:encoded>
			<dc:creator>avarus</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog/avarus-108601/changing-the-default-keyboard-on-ubuntu-12-04-live-cd-35105/</guid>
		</item>
		<item>
			<title>Evolution - notification and RSS</title>
			<link>http://www.linuxquestions.org/questions/blog/avarus-108601/evolution-notification-and-rss-1823/</link>
			<pubDate>Thu, 02 Apr 2009 12:57:57 GMT</pubDate>
			<description>Better late than never, some more tips based on my Experience of running the Ubuntu-based Bio-Linux 5.  I promised to say something about the...</description>
			<content:encoded><![CDATA[<div>Better late than never, some more tips based on my Experience of running the Ubuntu-based Bio-Linux 5.  I promised to say something about the Evolution mail client, so here goes.<br />
<br />
I use my e-mail client a lot, so I think it's worth setting it up to work just right and learning some of the more advanced features that can save time and annoyance.  The default e-mail client on Bio-Linux is Evolution, but if you prefer Mozilla Thunderbird, or Mutt, or even NMH, then they can be installed in seconds via Synaptic.<br />
<br />
Evolution has the advantages that it works with just about any mail system and comes with a host of features.  Some of these are available as plugins, and can therefore be activated via the plugin manager (Edit -&gt; Plugins).  If you seem to be missing a feature that you expected to find, it may just be that the plugin needs to be turned on here.<br />
<br />
One thing Evolution lacks by default is a nice way to notify you of new messages in the system task bar.  I use the Gnome mail notifier:<br />
<ol style="list-style-type: decimal"><li>Install the package <b>mail-notification-evolution</b> via apt-get or Synaptic.</li>
<li>In a terminal type &quot;mail-notification &amp;!&quot;.  A new icon should appear next to your update notification icon, which is in the top right of the screen by<br />
default.</li>
<li>Right click this and select Properties.  Add your Evolution mailbox to the list.</li>
<li>Set the other options how you want them, checking the autostart box to ensure the mail notifier appears each time you log in.</li>
</ol><br />
Now the tricky bit.  Mail-notifier gives you various options under <b>Click Action</b> but none of these are what I really want.  I want to pop the current<br />
instance of Evolution to the front, switching virtual desktop if necessary.  If Evolution isn't running I want to start it up.  This can be done as follows:<br />
<ol style="list-style-type: decimal"><li>Select <b>Launch the mail reader</b> as the Click Action</li>
<li>Run gnome-default-applications-properties and set the Mail Reader to <b>Custom</b><br />
  with the command set to <b>/home/&lt;username&gt;/scripts/goto-evolution %s</b></li>
<li>Apt-get install <b>wmctrl</b></li>
<li>mkdir ~/scripts ; touch ~/scripts/goto-evolution ; chmod u+x ~/scripts/goto-evolution</li>
<li>Now put the following 6 lines into your new goto-evolution script:</li>
</ol><br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<pre class="bbcodeblock" dir="ltr" style="
		margin: 0px;
		margin-right: -99999px;
		padding: 3px;
		border: 1px inset;
		width: 98%;
		height: 114px;
		text-align: left;
		overflow: auto">#!/bin/sh
if [ -z &quot;$@&quot; ] ; then
    wmctrl -a '- Evolution' || exec evolution
else
    exec evolution &quot;$@&quot;
fi</pre>
</div>That was slightly long-winded, so here's just one more, shorter, tip.  I try to keep up with a variety of news feeds that are available via RSS.  These can be read through an online service like Google reader, or through a standalone client like the excellent Liferea.  But if you already read mail through Evolution and want to reduce the clutter on your desktop then adding feeds straight into Evolution is easy:<br />
<ol style="list-style-type: decimal"><li>apt-get install <b>evolution-rss</b></li>
<li>restart Evolution and go to Edit -&gt; Preferences.  Look for the new <b>News and Blogs</b> item in the left hand list</li>
<li>Add a new feed and paste in the feed URL - eg.<br />
  <a href="http://www.linuxquestions.org/questions/blog/avarus-108601/feed/">www.linuxquestions.org/questions/blog_external.php?bloguserid=108601</a> for my blog.</li>
<li>Now you'll see a new News&amp;Blogs folder in Evolution, and you can read new feed items just as if they were regular mails.</li>
</ol><br />
Happy e-mailing.  Next time have your keyboard at the ready as I'll be back on the command line.<br />
<br />
TIM</div>

]]></content:encoded>
			<dc:creator>avarus</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog/avarus-108601/evolution-notification-and-rss-1823/</guid>
		</item>
		<item>
			<title>Aaaaaaaaand - Cut!</title>
			<link>http://www.linuxquestions.org/questions/blog/avarus-108601/aaaaaaaaand-cut-1614/</link>
			<pubDate>Wed, 18 Feb 2009 16:03:36 GMT</pubDate>
			<description>A blog entry about the clipboard. 
 
So, the clipboard.  Exciting, eh?  You probably use it all the time.  Cut this, copy that, paste the other. ...</description>
			<content:encoded><![CDATA[<div>A blog entry about the clipboard.<br />
<br />
So, the clipboard.  Exciting, eh?  You probably use it all the time.  Cut this, copy that, paste the other.  Ideally, you should be able to copy text, images, or anything you like from any application and to drop them into the same<br />
application or any other application.  It avoids the need to mess around with saving a temporary file, and sometimes it's the only way to do the job.<br />
<br />
The problem is, the clipboard in Linux doesn't always do what you expect.  Shouting at the computer doesn't fix the problem (I've tried!) so it might be useful to delve a little deeper and find out what's happening behind the scenes.<br />
<br />
The first thing to know is: There are TWO clipboards.  One belongs to X-windows, the other belongs to Gnome.  (Actually that's not entirely true, but it's close enough)  Try this:<br />
<ul><li>Open two terminals and run 'nano' in each (nano is the basic text editor).</li>
<li>In the first terminal, type two different lines of text.</li>
<li>Select the first line with the mouse, then select Edit-&gt;Copy from the menu.</li>
<li>Select the second line with the mouse, and just leave it highlighted</li>
<li>Now in the second window select Edit-&gt;Paste, and the first line should be pasted</li>
<li>Now click the middle mouse button in that window, and the second line should appear.</li>
</ul><blockquote><i>(if you only have two mouse buttons, press both at once for a middle-click)</i></blockquote>(For added fun, Nano also has an internal clipboard, accessed with Ctrl+K and Ctrl+U, that only works within the single editor session.)<br />
<br />
So the X-windows clipboard, traditionally accessed by selecting text to copy it and middle-clicking to paste it, works with any application and only supports plain text.  The Gnome clipboard does not work with some older apps but is able to cope with things such as rich text and images.  For example, try opening a website in Firefox and selecting some formatted text and images, then select Edit-&gt;Copy.  If you paste that into OpenOffice you'll see the format and images are preserved.  If you paste it into Nano it gets converted to plain text.  If you paste into GIMP Image Editor you get an error.  Most of the time this works the way you expect, but keeping in mind the way the computer is having to convert your clipboard data can make things less baffling when unexpected things happen.<br />
<br />
Three other useful things to do with the clipboard are to retrieve a history of contents, copy between the two clipboards, and force rich content on the clipboard to plain text.  A clipboard manager will do this, and there are several - take a look here:<br />
<br />
<a href="http://www.linux.com/feature/123462" target="_blank" rel="nofollow">http://www.linux.com/feature/123462</a><br />
<br />
The standard one for Gnome is Glipper.  Install the 'glipper' package via Synaptic, then right-click your top panel and 'Add to Panel'.  Select 'Clipboard manager' and a little icon should appear.  Copy a few things to the clipboard and then left-click the icon to see the list.  Selecting any of these will drop it into BOTH clipboard buffers, but converted to plain text in both cases.<br />
<br />
I use Glipper and find it indispensible, but it does have some glitches.  For instance, copying images between applications can stop working with Glipper in effect.  This bug has been around for a while and you can follow the progress here: <a href="https://bugs.launchpad.net/ubuntu/+source/glipper/+bug/104432" target="_blank" rel="nofollow">https://bugs.launchpad.net/ubuntu/+s...er/+bug/104432</a>. Hopefully a fix is on the cards, but right now the only remedy is to<br />
temporarily disable Glipper - not ideal.<br />
<br />
That's quite enough clipboard internals, I think.  Next time, the Evolution mail program and how to make it do what you want.<br />
<br />
TTFN,<br />
TIM</div>

]]></content:encoded>
			<dc:creator>avarus</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog/avarus-108601/aaaaaaaaand-cut-1614/</guid>
		</item>
		<item>
			<title>Some Firefox favourites</title>
			<link>http://www.linuxquestions.org/questions/blog/avarus-108601/some-firefox-favourites-1567/</link>
			<pubDate>Fri, 30 Jan 2009 13:43:05 GMT</pubDate>
			<description>The idea of this blog is primarily to give some helpful suggestions to anyone moving from Bio-Linux 4 to Bio-Linux 5...</description>
			<content:encoded><![CDATA[<div>The idea of this blog is primarily to give some helpful suggestions to anyone moving from Bio-Linux 4 to <a href="http://envgen.nox.ac.uk/biolinux.html" target="_blank" rel="nofollow">Bio-Linux 5</a>, and one big change is the desktop environment (which has changed from KDE to Gnome).  The new version looks and behaves a little differently, and for anyone who uses the system as their regular PC the small features can add up to make a more satisfying or a more frustrating experience depending on your personal taste.<br />
<br />
I like to have my computer working just the way I want it, and I've been trying out some tweaks to get things just right.  In this post I'll suggest some ways to set up your Firefox browser that I find make it work better for me.<br />
<br />
Firstly, I've been asked what happened to Iceweasel.  To all intents and purposes, Iceweasel is a Debian branding of Firefox and aside from the name the program works identically.  Now that Bio-Linux runs on Ubuntu, the more recognisable name and logo has returned but all your settings, bookmarks, plugins, etc. should continue to work just as before.<br />
<br />
One little feature I like in Firefox is that you can copy a URL to the clipboard then middle-click in the browser window to open it.  This is disabled in Ubuntu, as it alarms some users, but you can get it back very simply - see <a href="http://ubuntuforums.org/showthread.php?t=167565#3" target="_blank" rel="nofollow">this post</a><br />
<br />
Firefox also supports a wealth of Add-ons.  Three that I find particularly useful:<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/300" target="_blank" rel="nofollow">BioFox</a>: Gives you quick access to all sorts of on-line Bioinformatics tools.  Why hunt down your own services when Biofox collects them all for you in one handy toolbar?<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/3542" target="_blank" rel="nofollow">Ageing tabs</a>: This may seem like a gimmick, but having the unused tabs in your browser slowly fade can be very useful.  If you have, say, 10 tabs open and are currently using three of them the relevant 'hot' tabs immediately jump out at you.<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/12" target="_blank" rel="nofollow">Mouse gestures</a>: Not everyone gets on with this, but I find it a very natural way to control the browser.  Pull new tabs into existence, dismiss them with a sweep, zoom in with a flick.  You won't quite be like John Anderton but you can at least hold your own with those smug iPhone users.<br />
<br />
And if you write your own web pages these two are a must:<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/271" target="_blank" rel="nofollow">Firebug</a>: The ultimate web analyser with on-the-fly editing etc. etc.<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/271" target="_blank" rel="nofollow">Colorzilla </a>: Lets you find the colour of any pixel on a website.  Very handy if you want to have seamless graphics or matching font colours.<br />
<br />
That's enough Firefox.  Next time, getting to grips with the clipboard.<br />
<br />
TIM</div>

]]></content:encoded>
			<dc:creator>avarus</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog/avarus-108601/some-firefox-favourites-1567/</guid>
		</item>
		<item>
			<title>First blog entry... about www.linuxquestions.org</title>
			<link>http://www.linuxquestions.org/questions/blog/avarus-108601/first-blog-entry-about-www-linuxquestions-org-1555/</link>
			<pubDate>Tue, 27 Jan 2009 17:30:06 GMT</pubDate>
			<description><![CDATA[Afternoon, 
 
A first blog entry!  As you'll see from my profile I've been on LQ for a good few years and have posted a few messages to the...]]></description>
			<content:encoded><![CDATA[<div>Afternoon,<br />
<br />
A first blog entry!  As you'll see from my profile I've been on LQ for a good few years and have posted a few messages to the discussion forums - some more helpful than others - but no blog so far.<br />
<br />
I'm proud to be part of a group that maintains <a href="http://bio-linux.net" target="_blank" rel="nofollow">Bio-Linux</a>, an Ubuntu-based distribution that packs in over 500 freely-available bioinformatics programs, with documentation and sample data ready to run out of the box.  The project has been going for several years, and late last year we released Bio-Linux version 5.<br />
<br />
So, whichever way you look at it, this first post is a blatant plug:<br />
<ul><li>If you came here from LQ.org, and are interested in molecular biology, please check out Bio-Linux.  You can download an ISO direct from <a href="http://nebc.nox.ac.uk/cgi-bin/download_register/register.cgi?a=bio-linux5" target="_blank" rel="nofollow">here</a> or find individual packages for your Ubuntu/Debian system <a href="http://nebc.nox.ac.uk/envgen/software/archives/000508.html" target="_blank" rel="nofollow">here</a>.<br /></li>
<li>If you came here as a Bio-Linux user, my first tip to you is to check out the rest of LinuxQuestions.org.  This site has a fantastic community and a wealth of resources for everyone from novice to guru.  You might even find you can help out other users in the forums.<br /></li>
<li>And in either case, keep an eye on this blog over the next few weeks.  I'll be adding some of my personal tips for getting the most out of Bio-Linux and the Linux/UNIX environment in general.</li>
</ul><br />
TIM</div>

]]></content:encoded>
			<dc:creator>avarus</dc:creator>
			<guid isPermaLink="true">http://www.linuxquestions.org/questions/blog/avarus-108601/first-blog-entry-about-www-linuxquestions-org-1555/</guid>
		</item>
	</channel>
</rss>
