<?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>Three Wise Men &#187; Software</title>
	<atom:link href="http://www.twm-kd.com/category/computers/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.twm-kd.com</link>
	<description>In a desperate need of a punchline.</description>
	<lastBuildDate>Mon, 06 Sep 2010 08:48:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat</title>
		<link>http://www.twm-kd.com/computers/software/upgrade-ubuntu-10-04-lucid-lynx-to-10-10-maverick-meerkat/</link>
		<comments>http://www.twm-kd.com/computers/software/upgrade-ubuntu-10-04-lucid-lynx-to-10-10-maverick-meerkat/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 08:48:34 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Maverick Meerkat]]></category>
		<category><![CDATA[Preview]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=4093</guid>
		<description><![CDATA[Maverick Meerkat is a next step in the evolution of Ubuntu, few minor changes here and there and Ubuntu community proved once again that they can deliver.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/' rel='bookmark' title='Permanent Link: Ubuntu 10.04 Lucid Lynx &#8211; What&#8217;s New?'>Ubuntu 10.04 Lucid Lynx &#8211; What&#8217;s New?</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/upgrade-ubuntu-810-to-904/' rel='bookmark' title='Permanent Link: Upgrade Ubuntu 8.10 to 9.04'>Upgrade Ubuntu 8.10 to 9.04</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/when-you-break-your-windows-compiz-in-ubuntu-dies/' rel='bookmark' title='Permanent Link: When you break your windows &#8211; Compiz in Ubuntu dies'>When you break your windows &#8211; Compiz in Ubuntu dies</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div class="wp-caption alignright" style="width: 220px"><a href="http://commons.wikipedia.org/wiki/File:Ubuntu_logo.svg"><img class=" " title="Official Ubuntu circle with wordmark. Replace ..." src="http://static.twm-kd.com/twm-uploads/300px-Ubuntu_logo.svg_.png" alt="Official Ubuntu circle with wordmark. Replace ..." width="210" height="49" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
</div>
<p><a class="zem_slink" title="List of Ubuntu releases" rel="wikipedia" href="http://en.wikipedia.org/wiki/List_of_Ubuntu_releases">Maverick Meerkat</a> is still <a class="zem_slink" title="Software release life cycle" rel="wikipedia" href="http://en.wikipedia.org/wiki/Software_release_life_cycle">beta software</a>, so your mileage my vary. Plus, <a class="zem_slink" title="Ubuntu (operating system)" rel="homepage" href="http://www.ubuntu.com/">Ubuntu</a> upgrades are like carrying nitroglycerin around. Most of the times if you are careful everything will be ok, then sometimes you step on something, stumble and everything blows up in your face. Why on earth would you want to upgrade then? Because you&#8217;re adventurous and you want to live on the edge, right? Upgrade worked for me on my computer. I had a minor problem with Nvidia graphics card which was solved quickly. In any case, if you are happy with Lucid Lynx and you have a stable production environment, then you should probably wait. Final release is <a href="https://wiki.ubuntu.com/MaverickReleaseSchedule" target="_blank">scheduled for October 10th</a> and most of the show stopper bugs should be gone by that time.</p>
<p><span id="more-4093"></span></p>
<p>There are a few things that you need to take care before you upgrade. First you need to install update manager core.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> update-manager-core</pre></pre></td></tr></table></div>
<p>Then it would be wise to install all the updates for your current installation.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update</pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade</pre></pre></td></tr></table></div>
<p>Now you are all set and ready to go. A warning, that you should backup your important configuration files and your data, would be appropriate. Consider yourself warned.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> do-release-upgrade <span style="color: #660033;">-d</span></pre></pre></td></tr></table></div>
<p>With this command you will start the upgrade process. After upgrade manager calculates on what it has to do you will be notified and you will get a chance to abort the upgrade. This is your last warning. After your start the upgrade you should not interrupt it. If you do that you will end up with a broken Ubuntu and tears in your eyes. Relax, sit back and enjoy watching how packets are installed. Or perhaps, grab a bite.</p>
<h4>Nvidia problems</h4>
<p>When the upgrade was finished I rebooted and I was greeted with text mode login prompt.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">Ubuntu maverick <span style="color: #7a0874; font-weight: bold;">&#40;</span>development branch<span style="color: #7a0874; font-weight: bold;">&#41;</span> thefish tty1</pre></td></tr><tr><td class="odd_lines"><pre>&nbsp;</pre></td></tr><tr><td class="even_lines"><pre>thefish <span style="color: #c20cb9; font-weight: bold;">login</span>:</pre></pre></td></tr></table></div>
<p><em>(Yes, my hostname is thefish.)</em> If you do not get a nice login window as you used to then first thing you need to do is to inspect your Xorg log file.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">less</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>Xorg.0.log</pre></pre></td></tr></table></div>
<p>If you are running Nvidia and you have a dual monitor setup then you will see this error in your log file.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> ================ WARNING WARNING WARNING WARNING ================</pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> This server has a video driver ABI version of <span style="color: #000000;">8.0</span> that this driver does not officially support.  Please check http:<span style="color: #000000; font-weight: bold;">//</span>www.nvidia.com<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">for</span> driver updates or downgrade to an X server with a supported driver ABI.</pre></td></tr><tr><td class="even_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> =================================================================</pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>EE<span style="color: #7a0874; font-weight: bold;">&#41;</span> NVIDIA: Use the <span style="color: #660033;">-ignoreABI</span> option to override this check.</pre></td></tr><tr><td class="even_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>II<span style="color: #7a0874; font-weight: bold;">&#41;</span> UnloadModule: <span style="color: #ff0000;">&quot;nvidia&quot;</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>II<span style="color: #7a0874; font-weight: bold;">&#41;</span> Unloading <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>xorg<span style="color: #000000; font-weight: bold;">/</span>extra-modules<span style="color: #000000; font-weight: bold;">/</span>nvidia_drv.so</pre></td></tr><tr><td class="even_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>EE<span style="color: #7a0874; font-weight: bold;">&#41;</span> Failed to load module <span style="color: #ff0000;">&quot;nvidia&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>module requirement mismatch, <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>EE<span style="color: #7a0874; font-weight: bold;">&#41;</span> No drivers available.</pre></td></tr><tr><td class="even_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Fatal server error:</pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #7a0874; font-weight: bold;">&#91;</span>    <span style="color: #000000;">10.038</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> no screens found</pre></pre></td></tr></table></div>
<p>Fortunately the fix for this is displayed right there on the screen, you will have to edit your Xorg configuration file and add one more option to the ServerLayout section so that it looks similar to this:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">Section <span style="color: #ff0000;">&quot;ServerLayout&quot;</span></pre></td></tr><tr><td class="odd_lines"><pre>    Identifier     <span style="color: #ff0000;">&quot;Layout0&quot;</span></pre></td></tr><tr><td class="even_lines"><pre>    Screen         <span style="color: #000000;">0</span>  <span style="color: #ff0000;">&quot;Screen0&quot;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></td></tr><tr><td class="odd_lines"><pre>    Screen1        <span style="color: #ff0000;">&quot;Screen1&quot;</span> RightOf <span style="color: #ff0000;">&quot;Screen0&quot;</span></pre></td></tr><tr><td class="even_lines"><pre>    InputDevice    <span style="color: #ff0000;">&quot;Keyboard0&quot;</span> <span style="color: #ff0000;">&quot;CoreKeyboard&quot;</span></pre></td></tr><tr><td class="odd_lines"><pre>    InputDevice    <span style="color: #ff0000;">&quot;Mouse0&quot;</span> <span style="color: #ff0000;">&quot;CorePointer&quot;</span></pre></td></tr><tr><td class="even_lines"><pre>    Option         <span style="color: #ff0000;">&quot;Xinerama&quot;</span> <span style="color: #ff0000;">&quot;0&quot;</span></pre></td></tr><tr><td class="odd_lines"><pre>    Option         <span style="color: #ff0000;">&quot;IgnoreABI&quot;</span> <span style="color: #ff0000;">&quot;True&quot;</span></pre></td></tr><tr><td class="even_lines"><pre>EndSection</pre></pre></td></tr></table></div>
<p>You only need to add <em>IgnoreABI</em> option! Your Xorg configuration file is most likely <em>/etc/X11/xorg.conf</em>. After you made the change restard <em>gdm</em> and Xorg will start and you will see login window. No need to reboot your computer.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> restard gdm</pre></pre></td></tr></table></div>
<p>You are good to go, login and start exploring and trying out new stuff.</p>
<h4>New stuff and the problems</h4>
<p>First thing I noticed is the default background. What is the deal with those big orange blobs? Nobody knows, but they say that default background will be replaced before final release.</p>
<div id="attachment_4109" class="wp-caption aligncenter" style="width: 310px"><a href="http://static.twm-kd.com/twm-uploads/Screenshot.png"><img class="size-medium wp-image-4109" title="Default background" src="http://static.twm-kd.com/twm-uploads/Screenshot-300x187.png" alt="Default background" width="300" height="187" /></a><p class="wp-caption-text">Default background</p></div>
<p><a href="http://www.markshuttleworth.com/archives/333" target="_blank">Windicators</a> are slowly coming into play. When clicking on a sound icon, or better sound windicator, in the panel you will be present with more options than before. Now you can launch Rythmbox from it and when it is running you can also control it from here. One icon less in the panel, which is good. The bad part is that Rythmbox simply quits when you click close button in the main window. It will have to stay open if you want to listen to the music. To make things worse, minimizing will not get rid of the task list icon and you will have to move Rythmbox to another desktop to get rid of the clutter. On Ubuntu forums there is already <a href="http://ubuntuforums.org/showthread.php?t=1564913" target="_blank">a debate</a> on this subject.</p>
<div id="attachment_4110" class="wp-caption aligncenter" style="width: 310px"><a href="http://static.twm-kd.com/twm-uploads/sound_windicator.png"><img class="size-medium wp-image-4110 " title="Ubuntu sound windicator" src="http://static.twm-kd.com/twm-uploads/sound_windicator-300x187.png" alt="Ubuntu sound windicator" width="300" height="187" /></a><p class="wp-caption-text">Sound windicator and Rythmbox</p></div>
<p>Gwibber got support for lists, inline pictures from <a class="zem_slink" title="Twitpic" rel="homepage" href="http://twitpic.com">TwitPic</a> and alike and direct messages for <a class="zem_slink" title="Twitter" rel="homepage" href="http://twitter.com">Twitter</a> and <a class="zem_slink" title="Identi.ca" rel="homepage" href="http://identi.ca/">Identi.ca</a> accounts. Also the <a href="http://arstechnica.com/security/guides/2010/09/twitter-a-case-study-on-how-to-do-oauth-wrong.ars" target="_blank">infamous OAuth</a><sup><a href="http://www.twm-kd.com/computers/software/upgrade-ubuntu-10-04-lucid-lynx-to-10-10-maverick-meerkat/#footnote_0_4093" id="identifier_0_4093" class="footnote-link footnote-identifier-link" title="Excellent article about OAuth by Ryan Paul.">1</a></sup> is supported, it has to be since Twitter made it mandatory. Gwibber was also upgraded with a new database; say goodbye to the slow couch database and welcome <a class="zem_slink" title="SQLite" rel="homepage" href="http://sqlite.org/">SQLite</a>. This means, more speed and no more syncing between different computers. A reasonable trade-off.</p>
<div id="attachment_4115" class="wp-caption aligncenter" style="width: 310px"><a href="http://static.twm-kd.com/twm-uploads/gwibber_dm.png"><img class="size-medium wp-image-4115" title="New Gwibber" src="http://static.twm-kd.com/twm-uploads/gwibber_dm-300x225.png" alt="New Gwibber" width="300" height="225" /></a><p class="wp-caption-text">New Gwibber</p></div>
<p>After that I gave a shot to Shotwell, a new photo manager. I had to wait for quite some time for Shotwell to import my 30.000 pictures library, but I was pleasantly surprised when it imported my older JPEG images and raw Nikon images that were taken more recently. You will be able to adjust few image settings, but for more complex editing you will have to set external editor. Gimp by default. Most of the other software was upgraded, Gnome in this release it carries version number 2.31.92, kernel will be ﻿2.6.35-19 Among other changes I also noticed that Evolution will display emails in threads by default.</p>
<p>In the end, I can say that 10.10 is a next step in the evolution of Ubuntu, few minor changes here and there and Ubuntu community proved once again that they can deliver. Ubuntu 10.10 feels faster than 10.04, but this might only be my feeling. For a proper benchmark you will have to wait for the final release. All in all the first impression is good and now the only thing left is hope that one of the future releases will be named as Horny Hippo.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=7a5b18cf-2d1f-4f2b-9705-cdb11f92e9fb" alt="" /><span class="zem-script pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<ol class="footnotes"><li id="footnote_0_4093" class="footnote">Excellent article about OAuth by Ryan Paul.</li></ol>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/' rel='bookmark' title='Permanent Link: Ubuntu 10.04 Lucid Lynx &#8211; What&#8217;s New?'>Ubuntu 10.04 Lucid Lynx &#8211; What&#8217;s New?</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/upgrade-ubuntu-810-to-904/' rel='bookmark' title='Permanent Link: Upgrade Ubuntu 8.10 to 9.04'>Upgrade Ubuntu 8.10 to 9.04</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/when-you-break-your-windows-compiz-in-ubuntu-dies/' rel='bookmark' title='Permanent Link: When you break your windows &#8211; Compiz in Ubuntu dies'>When you break your windows &#8211; Compiz in Ubuntu dies</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/upgrade-ubuntu-10-04-lucid-lynx-to-10-10-maverick-meerkat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encoding videos with FFMPEG and H.264</title>
		<link>http://www.twm-kd.com/computers/software/encoding-videos-with-ffmpeg-and-h-264/</link>
		<comments>http://www.twm-kd.com/computers/software/encoding-videos-with-ffmpeg-and-h-264/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 17:59:24 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Encoding]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[H.264/MPEG-4 AVC]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Test]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3637</guid>
		<description><![CDATA[Encoding videos for YouTube can be a real pain. FFMPEG and H.264 can be very helpful if you know what you are doing. This article will help you a little bit.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/webcam-and-linux-gstreamer-tutorial/' rel='bookmark' title='Permanent Link: Webcam and Linux &#8211; GStreamer tutorial'>Webcam and Linux &#8211; GStreamer tutorial</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/games/screencasting-your-games-monkey-island-2/' rel='bookmark' title='Permanent Link: Screencasting your games &#8211; Monkey Island 2'>Screencasting your games &#8211; Monkey Island 2</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="none-whatsoever" style="float: right; width: 205px; text-align: center; margin-left: 5px;"><object width="200" height="137"><param name="movie" value="http://www.youtube.com/v/HpfNWO1yeio?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HpfNWO1yeio?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="200" height="137"></embed></object>Prelude to encoding
</div>
<p>Encoding videos can be a real pain. While ffmpeg is an excellent utility for converting videos between various formats it is also a pain to use. If you put <a class="zem_slink" title="H.264/MPEG-4 AVC" rel="wikipedia" href="http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC">H.264</a> codec on top of this, you will get a real mess with command lines that are longer than 200 characters. H.264 is a great format and linux<sup><a href="http://www.twm-kd.com/computers/software/encoding-videos-with-ffmpeg-and-h-264/#footnote_0_3637" id="identifier_0_3637" class="footnote-link footnote-identifier-link" title="and other similar operating systems">1</a></sup> implementation is hiding in the libx264. It will come pre-installed with <a class="zem_slink" title="Ubuntu (operating system)" rel="homepage" href="http://www.ubuntu.com/">Ubuntu</a> 10.04, but if you are more adventurous you should try and install the latest versions from SVN repositories as <a title="Installing ffmpeg and libx264" href="http://ubuntuforums.org/showthread.php?t=786095" target="_blank">described on Ubuntu forums</a>. The whole procedure is quite easy and very well documented so in this post I will assume that you have installed the latest versions.</p>
<p>The focus of this test and tutorial will be on video production, more specifically on an average YouTube Vlogger video. This means, one pass encoding, high compression and very uniform videos. For encoding movies and other videos with very dynamic content and big changes in the scenes you will have to look elsewhere of wait for another post. :)</p>
<h4><span id="more-3637"></span> Test setup</h4>
<p>For the test video I used a short clip that was provided by <a title="Nixie Pixel" href="http://www.nixiepixel.com/" target="_blank">Nixie Pixel</a>, do check her out on <a title="Talk Nerdy to Me" href="http://www.youtube.com/user/NixiePixel" target="_blank">YouTube</a>. Video was recorded with Logitech QuickCam Pro 9000 with the resolution 960&#215;720 at 25 frames per second. <a class="zem_slink" title="GStreamer" rel="homepage" href="http://gstreamer.freedesktop.org/modules/gst-ffmpeg.html">GStreamer</a>&#8216;s gst-launch utility was used for capturing and the clip was recorded as raw data &#8211; video/x-raw-yuv. Audio was captured with an external studio USB microphone and encoded with 1536 kb/s.</p>
<p>The initial file size was 745 MB (780252094 bytes) for a 29.8 seconds of video. All encoding was done on an old Core2Quad Q6600 running at 2.4 GHz with 4GB of RAM. I used -threads 0 parameter with ffmpeg to use all CPU cores while encoding. System load during conversion was around 5.5 and it took from just a few seconds up to two minutes to encode the whole clip.</p>
<p>Latest version of ffmpeg comes with a decent number of preset options for encoding with libx264. I will not go into details about each and every option because that would be a wrist slashing material and quite a long read. However, I will use the presets to simplify the encoding. I decided to use six different presets: hq, veryslow, default, fast, veryfast and lossless_slower. With this I used two different crf<sup><a href="http://www.twm-kd.com/computers/software/encoding-videos-with-ffmpeg-and-h-264/#footnote_1_3637" id="identifier_1_3637" class="footnote-link footnote-identifier-link" title="CRF &amp;#8211; constant rate factor">2</a></sup> parameters: 15 and 28. They are both maximum and minimum of what is usually recommend. 15 being lowest compression and highest quality/bitrate and 28 being the opposite. Time was measured with the time command and file size was reported by ls -lh command.</p>
<p>Encoding command that I used while working with different -vpre and -crf parameters:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ ﻿<span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-threads</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-i</span> bw-test.avi <span style="color: #660033;">-vcodec</span> libx264 <span style="color: #660033;">-vpre</span> default <span style="color: #660033;">-crf</span> <span style="color: #000000;">15.0</span> \</pre></td></tr><tr><td class="odd_lines"><pre>  <span style="color: #660033;">-acodec</span> libmp3lame <span style="color: #660033;">-ab</span> 64k <span style="color: #660033;">-ar</span> <span style="color: #000000;">48000</span> <span style="color: #660033;">-ac</span> <span style="color: #000000;">2</span> <span style="color: #660033;">-f</span> mp4 out_default_15.mp4</pre></pre></td></tr></table></div>
<p>Sound was always encoded with libmp3lame, I know that mp4 files should have AAC encoded sound, but a lot of times audio and video were out of sync after YouTube processed the video. That is why I usually stick with mp3 encoding for sound. For vlog type videos, I encode sound with only 64kbs. Which should be more than enough for human speech.</p>
<h4>The results</h4>
<p>Results include time needed to perform encoding, file size of the encoded clip and a couple of screen shots. One of Nixie talking and the other of llama walking, so there is at least some motion blur on the video from the llama.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> bw-test.avi <span style="color: #660033;">-ss</span> 00:00:<span style="color: #000000;">6.7</span> <span style="color: #660033;">-vframes</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-vcodec</span> png \</pre></td></tr><tr><td class="odd_lines"><pre>  <span style="color: #660033;">-f</span> image2 sample_original_1.png</pre></td></tr><tr><td class="even_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> bw-test.avi <span style="color: #660033;">-ss</span> 00:00:<span style="color: #000000;">24.10</span> <span style="color: #660033;">-vframes</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-vcodec</span> png \</pre></td></tr><tr><td class="odd_lines"><pre>  <span style="color: #660033;">-f</span> image2 sample_original_2.png</pre></pre></td></tr></table></div>
<p>Here are the two screenshots from the original uncompressed clip, clicking on them will give you a larger version.</p>
<p><a href="http://static.twm-kd.com/twm-uploads/sample_out_original_1.png" target="_blank"><img class="size-thumbnail wp-image-3917  alignleft" title="sample_out_original_1" src="http://static.twm-kd.com/twm-uploads/sample_out_original_1-150x150.png" alt="" width="150" height="150" /></a> <a href="http://static.twm-kd.com/twm-uploads/sample_out_original_2.png" target="_blank"><img class="size-thumbnail wp-image-3919" title="sample_out_original_2" src="http://static.twm-kd.com/twm-uploads/sample_out_original_2-150x150.png" alt="" width="150" height="150" /></a></p>
<p>Results are in the table below, clicking on time and file size will open both captured frames for the respective test clip.</p>
<table style="width: 100%; border: 0px; border-spacing: 1px;">
<thead style="color: #000000;">
<tr style="background: #F0F0FF;">
<th>crf</th>
<th>hq</th>
<th>veryslow</th>
<th>default</th>
<th>fast</th>
<th>veryfast</th>
<th>lossless_slower</th>
</tr>
</thead>
<tbody style="text-align: center; color: #000000;">
<tr style="background: #E8E8FF;">
<td>15</td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_hq_15.mp4_1.png" target="_blank">0m 43s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_hq_15.mp4_2.png" target="_blank">16 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_veryslow_15.mp4_1.png" target="_blank">2m 50s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_veryslow_15.mp4_2.png" target="_blank">15MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_default_15.mp4_1.png" target="_blank">0m 31s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_default_15.mp4_2.png" target="_blank">18 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_fast_15.mp4_1.png" target="_blank">0m 24s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_fast_15.mp4_2.png" target="_blank">17 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_veryfast_15.mp4_1.png" target="_blank">0m 9s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_veryfast_15.mp4_2.png" target="_blank">16 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_lossless_15.mp4_1.png" target="_blank">0m 41s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_lossless_15.mp4_2.png" target="_blank">17 MB</a></td>
</tr>
<tr style="background: #F0F0FF;">
<td>28</td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_hq_28.mp4_1.png" target="_blank">0m 22s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_hq_28.mp4_2.png" target="_blank">2.3 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_veryslow_28.mp4_1.png" target="_blank">1m 18s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_veryslow_28.mp4_2.png" target="_blank">1.9 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_default_28.mp4_1.png" target="_blank">0m 14s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_default_28.mp4_2.png" target="_blank">2.3 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_fast_28.mp4_1.png" target="_blank">0m 12s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_fast_28.mp4_2.png" target="_blank">2.5 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_veryfast_28.mp4_1.png" target="_blank">0m 6s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_veryfast_28.mp4_2.png" target="_blank">2.1 MB</a></td>
<td><a href="http://static.twm-kd.com/twm-uploads/sample_out_lossless_28.mp4_1.png" target="_blank">0m 19s</a><br />
<a href="http://static.twm-kd.com/twm-uploads/sample_out_lossless_28.mp4_2.png" target="_blank">2.2 MB</a></td>
</tr>
</tbody>
</table>
<p>Complete test video is <a title="Nixie's Test Video" href="http://www.youtube.com/watch?v=UguDVjnQzPA&amp;hd=1" target="_blank">available on YouTube</a>, I decided to upload the -crf 15 -vpre veryfast version of the video.</p>
<h4>The conclusion</h4>
<p>End results are a little bit surprising. After numerous tests I decided that I can only show a relevant difference between both extremes; minimum and maximum compression. If you compare the -crf 15 screenshots, they are almost identical. Even when comparing very fast and very slow or lossless presets.</p>
<p><a href="http://static.twm-kd.com/twm-uploads/sample_collage_1.png"><img class="aligncenter size-medium wp-image-4011" title="Comparison" src="http://static.twm-kd.com/twm-uploads/sample_collage_1-300x300.png" alt="" width="300" height="300" /></a></p>
<p>When the value of crf is increased the quality will decrease and when it reaches 28 the change is very obvious. If you use -crf 20 you will get a decent balance between the file size and the quality. Just to be sure, I spent some time on YouTube watching various vlogs and other stuff that people post there. After seeing that, I am pretty sure that you can use the worse settings that I mentioned before. Veryfast preset and -crf 28. Your videos will be encoded in no time and upload will be fast and nobody will notice the loss of quality. ;)</p>
<p>And now the time has come to talk of many things, of shoes and ship and sealing wax, of cabbages and kings and why the sea is boiling hot and whether pigs have wings. :)</p>
<ol class="footnotes"><li id="footnote_0_3637" class="footnote">and other similar operating systems</li><li id="footnote_1_3637" class="footnote">CRF &#8211; constant rate factor</li></ol>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/webcam-and-linux-gstreamer-tutorial/' rel='bookmark' title='Permanent Link: Webcam and Linux &#8211; GStreamer tutorial'>Webcam and Linux &#8211; GStreamer tutorial</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/games/screencasting-your-games-monkey-island-2/' rel='bookmark' title='Permanent Link: Screencasting your games &#8211; Monkey Island 2'>Screencasting your games &#8211; Monkey Island 2</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/encoding-videos-with-ffmpeg-and-h-264/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloning Ubuntu Linux &#8211; The easy way</title>
		<link>http://www.twm-kd.com/computers/software/cloning-ubuntu-linux-the-easy-way/</link>
		<comments>http://www.twm-kd.com/computers/software/cloning-ubuntu-linux-the-easy-way/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 09:29:09 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Booting]]></category>
		<category><![CDATA[Disk cloning]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating system]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3894</guid>
		<description><![CDATA[Cloning Ubuntu Linux is quite easy and simple all you need is a working Ubuntu installation. Learn how to clone your Ubuntu in just five short steps.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/losing-your-password-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: Losing your password in Ubuntu Linux'>Losing your password in Ubuntu Linux</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/network-boot-and-install-of-ubuntu-linux/' rel='bookmark' title='Permanent Link: Network boot and install of Ubuntu Linux'>Network boot and install of Ubuntu Linux</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/boot-virtualbox-machine-from-a-usb-flash-drive/' rel='bookmark' title='Permanent Link: Boot VirtualBox machine from a USB flash drive'>Boot VirtualBox machine from a USB flash drive</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div class="wp-caption alignright" style="width: 125px"><a href="http://en.wikipedia.org/wiki/File:Dolly_clone.svg"><img class="   " title="This is diagram of how Dolly the sheep was made." src="http://static.twm-kd.com/twm-uploads/300px-Dolly_clone.svg_.png" alt="This is diagram of how Dolly the sheep was made." width="115" height="151" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
</div>
<p>Your <a class="zem_slink" title="Ubuntu (operating system)" rel="homepage" href="http://www.ubuntu.com/">Ubuntu</a> Linux installation is getting bigger and bigger and you are running out of space on your <a class="zem_slink" title="Hard disk drive" rel="wikipedia" href="http://en.wikipedia.org/wiki/Hard_disk_drive">hard disk</a>. You got your new hard drive and now you need to clone your old drive to the new one. The dreaded <a class="zem_slink" title="Disk cloning" rel="wikipedia" href="http://en.wikipedia.org/wiki/Disk_cloning">cloning</a> is actually quite easy and relatively simple to do. The only thing you will need is a little patience and some typing skills. No special software just your already installed Ubuntu Linux.</p>
<p>The regular obligatory disclaimer: This procedure worked for me several times, I use it almost on a daily basis and I had no problems with it. Your mileage my vary. Make sure you double check all the commands that you type and that you do not format your data drive. You will end up with two empty disks. If you have any questions feel free to ask.<br />
<span id="more-3894"></span><br />
The very basic scenario is assumed here. You have one hard drive installed as <em><a class="zem_slink" title="Device file" rel="wikipedia" href="http://en.wikipedia.org/wiki/Device_file">/dev/sda</a></em> and you want to replace it with a new one. You could just add the new drive and mount it to <em>/home</em> directory for example, but sometimes that is not what you want. I am also assuming that you have SATA drives. This procedure can also be used if you get a new computer and you do not want to bother with new installation. In this case you will have to be more careful if you are moving from one platform to another.</p>
<h4>Step 0 &#8211; Prerequisites</h4>
<p>First make sure that you have all the software installed:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> grub-pc rsync</pre></pre></td></tr></table></div>
<p>Yes, that is it.</p>
<h4>Step 0.5 &#8211; Disk juggling</h4>
<p>Turn off your computer, connect your new hard drive and turn your computer back on. Make sure that you do not disconnect the old drive, you still need it. ;)</p>
<h4>Step 1 &#8211; Partitioning, formatting and mounting</h4>
<p>Check where your new drive is, it will usually be accessible as <em>/dev/sdb</em>. Use <em>fdisk</em> to <a class="zem_slink" title="Disk partitioning" rel="wikipedia" href="http://en.wikipedia.org/wiki/Disk_partitioning">partition</a> the hard drive and then <em>mkfs</em> to format it. If you created more than one partition then you will have to mount all of them. In this example <em>the unknown user</em> created swap, root and home partitions. Here&#8217;s how you mount them:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb2 <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>home</pre></td></tr><tr><td class="even_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb3 <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkswap <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1</pre></pre></td></tr></table></div>
<h4>Step 2 &#8211; Cloning</h4>
<p>After your new partitions are mounted you need to copy all your data to the new location. You will do this with <em>rsync</em>.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> rsync <span style="color: #660033;">--exclude</span>=<span style="color: #ff0000;">&quot;mnt&quot;</span> <span style="color: #660033;">--exclude</span>=<span style="color: #ff0000;">&quot;lost+found&quot;</span> <span style="color: #660033;">--exclude</span>=<span style="color: #ff0000;">&quot;sys&quot;</span> <span style="color: #660033;">--exclude</span>=<span style="color: #ff0000;">&quot;proc&quot;</span> <span style="color: #660033;">-avP</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>mnt <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>proc <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>sys</pre></pre></td></tr></table></div>
<p>No need to copy <em>/proc</em> and <em>/sys</em>, they are virtual file systems and they will be created later on. You still need to create the directories that were not copied.</p>
<h4>Step 3 &#8211; Rescuing the system</h4>
<p>Data is transferred and now you need to take care of few other minor details. In <em>/mnt/etc/fstab</em> you will have to change the UUID string for mounting the partitions. I suggest that you replace UUID with <em>/dev/sda2</em> for root disk and <em>/dev/sda3</em> for <em>/home</em>. This will vary depending on your configuration. If you are feeling adventurous you can find the UUID&#8217;s of your new partitions and replace the old ones with them. Use the <em>blkid</em> command to get the UUID for each partition.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> blkid <span style="color: #660033;">-p</span> <span style="color: #660033;">-o</span> full <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb2</pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb2: <span style="color: #007800;">UUID</span>=<span style="color: #ff0000;">&quot;1a78c1f3-d9d0-4bbc-8dc2-603c2b46f5fc&quot;</span> <span style="color: #007800;">VERSION</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #007800;">TYPE</span>=<span style="color: #ff0000;">&quot;ext4&quot;</span> <span style="color: #007800;">USAGE</span>=<span style="color: #ff0000;">&quot;filesystem&quot;</span></pre></td></tr><tr><td class="even_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> blkid <span style="color: #660033;">-p</span> <span style="color: #660033;">-o</span> full <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb3</pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb3: <span style="color: #007800;">UUID</span>=<span style="color: #ff0000;">&quot;7f5a59ae-43c2-4747-a369-6fc01244ee21&quot;</span> <span style="color: #007800;">VERSION</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #007800;">TYPE</span>=<span style="color: #ff0000;">&quot;ext4&quot;</span> <span style="color: #007800;">USAGE</span>=<span style="color: #ff0000;">&quot;filesystem&quot;</span></pre></pre></td></tr></table></div>
<p>Now just copy and paste the UUID into <em>/mnt/etc/fstab</em>.</p>
<p>If you are cloning your disk to be used on a different computer then you should also take care of network interfaces. Delete the last line, or the last two, depends on how many network interfaces you have, in <em>/etc/udev/rules.d/70-persistent-net.rules</em> file. The lines should look roughly like this:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># PCI device 0x8086:0x294c (e1000e)</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #007800;">SUBSYSTEM</span>==<span style="color: #ff0000;">&quot;net&quot;</span>, <span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, <span style="color: #007800;">DRIVERS</span>==<span style="color: #ff0000;">&quot;?*&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>address<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;xx:xx:xx:xx:xx:xx&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span>dev_id<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;0x0&quot;</span>, ATTR<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">type</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;1&quot;</span>, <span style="color: #007800;">KERNEL</span>==<span style="color: #ff0000;">&quot;eth*&quot;</span>, <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;eth0&quot;</span></pre></pre></td></tr></table></div>
<p>I will not go into details here, let&#8217;s just say that Ubuntu will remember what names were used for your network interfaces and when you boot into the new system you will end up having <em>eth1</em> instead of <em>eth0</em>.</p>
<p>Don&#8217;t worry, the lines will be back once you reboot your system. After this you can shutdown and disconnect the old drive. Now turn on your computer and boot into a non working system. Have no fear, you will get it fixed in no time.</p>
<h4>Step 4 &#8211; First boot</h4>
<p>Your <a class="zem_slink" title="Booting" rel="wikipedia" href="http://en.wikipedia.org/wiki/Booting">boot loader</a> will die. Don&#8217;t worry it was supposed to, because it doesn&#8217;t know what to boot from and where your new disk is. What you see now is a Grub rescue shell. Does it say on the screen that you can use help? Lovely, because you can&#8217;t, Grub still didn&#8217;t load the help. Now you have to boot your computer manually. Like this:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">insmod <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>grub<span style="color: #000000; font-weight: bold;">/</span>linux.mod</pre></td></tr><tr><td class="odd_lines"><pre>linux <span style="color: #000000; font-weight: bold;">/</span>vmlinuz <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda2 ro</pre></td></tr><tr><td class="even_lines"><pre>initrd <span style="color: #000000; font-weight: bold;">/</span>initrd.img</pre></td></tr><tr><td class="odd_lines"><pre>boot</pre></pre></td></tr></table></div>
<p>First you load the Linux module so that you can tell Grub where to find <a class="zem_slink" title="Linux kernel" rel="homepage" href="http://www.kernel.org/">Linux kernel</a> and initial ram disk. Then you can boot. If you have your root partition on <em>/dev/sda2</em> then you should see your computer rebooting. After you login, open a terminal so that you can fix Grub:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> update-grub</pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> grub-install <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda</pre></td></tr><tr><td class="even_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> reboot</pre></pre></td></tr></table></div>
<h4>Step 5 &#8211; Second Reboot &amp; The End</h4>
<p>After the reboot everything should be back to normal. If you are again stuck at the Grub rescue prompt, then repeat the above procedure with Grub and rerun <em>update-grub</em> and <em>grub-install</em>. As you can see, cloning disk isn&#8217;t not so hard and you don&#8217;t need any special tools or software, except your beloved Ubuntu Linux.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=3d5bd679-a6d2-46b8-804c-1bdcb2725bb2" alt="" /><span class="zem-script pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/losing-your-password-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: Losing your password in Ubuntu Linux'>Losing your password in Ubuntu Linux</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/network-boot-and-install-of-ubuntu-linux/' rel='bookmark' title='Permanent Link: Network boot and install of Ubuntu Linux'>Network boot and install of Ubuntu Linux</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/boot-virtualbox-machine-from-a-usb-flash-drive/' rel='bookmark' title='Permanent Link: Boot VirtualBox machine from a USB flash drive'>Boot VirtualBox machine from a USB flash drive</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/cloning-ubuntu-linux-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using menus in WordPress 3.0</title>
		<link>http://www.twm-kd.com/computers/software/using-menus-in-wordpress-3-0/</link>
		<comments>http://www.twm-kd.com/computers/software/using-menus-in-wordpress-3-0/#comments</comments>
		<pubDate>Sat, 15 May 2010 11:01:41 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Wordpress 3.0]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3773</guid>
		<description><![CDATA[Wordpress 3.0 is already in beta stage and it is just a matter of time before it will be released. Learn how to add menu support to your theme.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/' rel='bookmark' title='Permanent Link: WordPress 3.0 &#8211; What&#8217;s new'>WordPress 3.0 &#8211; What&#8217;s new</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/wordpress-plugins-you-need-to-survive/' rel='bookmark' title='Permanent Link: WordPress plugins you need to survive'>WordPress plugins you need to survive</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/' rel='bookmark' title='Permanent Link: Optimizing WordPress &#8211; Tips for Speed'>Optimizing WordPress &#8211; Tips for Speed</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Menus are a new big thing in the upcoming release of <a class="zem_slink" title="WordPress" rel="homepage" href="http://wordpress.org">WordPress</a> 3.0 and most of the theme builders will have to add at least some minor support in their themes for menus to work. Not so long time ago <a href="http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/" target="_blank">we tested</a> one of the WordPress <a class="zem_slink" title="Neutral build" rel="wikipedia" href="http://en.wikipedia.org/wiki/Neutral_build">nightly builds</a> and we had some trouble with our theme. It was about time to address these issues and see how much work will be required to add support for menus to our theme. It turned out that the work was minimal and really simple. We did miss few things that would be nice to have. Read on to see what needs to be done in your theme to support menus.</p>
<p><span id="more-3773"></span>Menu structure on <a href="http://www.twm-kd.com/">www.twm-kd.com</a> is not that complicated, we have only two buttons on our front page, three if you are one of the three wise men. We replicated this structure in menu editor, which has matured since the last version we tested.</p>
<p style="text-align: center;"><a href="http://static.twm-kd.com/twm-uploads/menus-menu.png"><img class="size-medium wp-image-3774 aligncenter" title="Menu structure" src="http://static.twm-kd.com/twm-uploads/menus-menu-300x116.png" alt="Menu structure" width="300" height="116" /></a></p>
<p>Three simple buttons and we are basically done. Then we had to change our functions.php file in our theme directory, we simply added one line to the file inside the first php block:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="php" style="font-family:monospace;">add_theme_support<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'nav-menus'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></pre></td></tr></table></div>
<p>Then we had to change the header.php where the menus are loading. Previously the relevant part of <a class="zem_slink" title="Header file" rel="wikipedia" href="http://en.wikipedia.org/wiki/Header_file">header file</a> looked like this:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;menu&quot;</span><span style="color: #339933;">&gt;</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span></pre></td></tr><tr><td class="even_lines"><pre>	<span style="color: #339933;">&lt;</span>li <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;page_item&quot;</span><span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php echo get_option('home'); ?&amp;gt;/&quot;</span><span style="color: #339933;">&gt;</span>Home<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span></pre></td></tr><tr><td class="odd_lines"><pre>	<span style="color: #339933;">&lt;</span>li <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;page_item&quot;</span><span style="color: #339933;">&gt;&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&amp;lt;?php echo admin_url();?&amp;gt;&quot;</span><span style="color: #339933;">&gt;</span>Admin<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span></pre></td></tr><tr><td class="even_lines"><pre><span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></pre></td></tr></table></div>
<p>And now, after the change, it looks like this:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_nav_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></pre></td></tr></table></div>
<p>Yes, we are down to a single line, great isn&#8217;t it? Menus did not look like we wanted them, but that was a minor change to the style.css. This is how our menu used to look like with WordPress 2.9.x:</p>
<p style="text-align: center;"><a href="http://static.twm-kd.com/twm-uploads/menus-original.png"><img class="size-medium wp-image-3779 aligncenter" title="Original menu" src="http://static.twm-kd.com/twm-uploads/menus-original-300x84.png" alt="Original menu" width="300" height="84" /></a></p>
<p>And this is how it looks like now after the change:</p>
<p style="text-align: center;"><a href="http://static.twm-kd.com/twm-uploads/menus-look.png"><img class="size-medium wp-image-3780 aligncenter" title="New menu" src="http://static.twm-kd.com/twm-uploads/menus-look-300x87.png" alt="New menu" width="300" height="87" /></a></p>
<p>Both versions now look the same and the effort was minimal. Experienced developers should be able to make a transition in no time. We did notice one thing, our Admin button was shown only when a user with admin privileges was logged in, menus could also support this. It is not something that would be hard to implement or add, privilege based menus would be nice. We are still unable to add a non functional, label only, items to the menu that would serve as parent items for sub-menus. This could also be achieved if we could include other menus as sub menus.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=9f5821ab-c34c-4e6a-8825-9720556ebb24" alt="" /><span class="zem-script pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/' rel='bookmark' title='Permanent Link: WordPress 3.0 &#8211; What&#8217;s new'>WordPress 3.0 &#8211; What&#8217;s new</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/wordpress-plugins-you-need-to-survive/' rel='bookmark' title='Permanent Link: WordPress plugins you need to survive'>WordPress plugins you need to survive</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/' rel='bookmark' title='Permanent Link: Optimizing WordPress &#8211; Tips for Speed'>Optimizing WordPress &#8211; Tips for Speed</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/using-menus-in-wordpress-3-0/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux Backup &#8211; Poor man&#8217;s solution</title>
		<link>http://www.twm-kd.com/computers/software/linux-backup-poor-mans-solution/</link>
		<comments>http://www.twm-kd.com/computers/software/linux-backup-poor-mans-solution/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 04:52:36 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Cron]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell script]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3701</guid>
		<description><![CDATA[Making backups on Linux is a pain if you are not at least demigod of Linux administration. Linux really lacks a simple backup solution for regular users.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/cloning-ubuntu-linux-the-easy-way/' rel='bookmark' title='Permanent Link: Cloning Ubuntu Linux &#8211; The easy way'>Cloning Ubuntu Linux &#8211; The easy way</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/linux-tips-aggregated-1/' rel='bookmark' title='Permanent Link: Linux Tips Aggregated &#8211; 1'>Linux Tips Aggregated &#8211; 1</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/network-boot-and-install-of-ubuntu-linux/' rel='bookmark' title='Permanent Link: Network boot and install of Ubuntu Linux'>Network boot and install of Ubuntu Linux</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 250px;">
<dt class="wp-caption-dt"><a href="http://www.flickr.com/photos/8950560@N08/1482849745"><img title="Hard Drive 016" src="http://static.twm-kd.com/twm-uploads/1482849745_241a57d9b8_m.jpg" alt="Hard Drive 016" width="240" height="180" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image by <a href="http://www.flickr.com/photos/8950560@N08/1482849745">jon_a_ross</a> via Flickr</dd>
</dl>
</div>
</div>
<p>The importance of <a class="zem_slink" title="Backup" rel="wikipedia" href="http://en.wikipedia.org/wiki/Backup">backups</a>? It actually differs from case to case, but it seems that in the end 95% of the people do not know how important backups are until their hard drive dies and their data is gone. In the past ten days I had three people complaining about losing their data. Two hard drive failures and one accidental Shift-Delete &amp; Click Yes without reading the warning message. Backing up on <a class="zem_slink" title="Linux" rel="wikipedia" href="http://en.wikipedia.org/wiki/Linux">Linux</a> is a pain if you are not at least demigod of Linux administration. Linux really lacks a simple backup solution for regular users.</p>
<p>Read on if you want to know more on how to perform simple backup in Linux, what backups are and how to handle them.</p>
<p><span id="more-3701"></span></p>
<p><strong>DISCLAIMER</strong>: <em>These instructions and scripts were written and tested on <a class="zem_slink" title="Ubuntu (operating system)" rel="homepage" href="http://www.ubuntu.com/">Ubuntu Linux</a> Server 9.10, Ubuntu Linux Server 8.04 LTS and Ubuntu Linux Desktop 9.10, but they might not work for you. You will need to install openssh-client, openssh-server and rsync if you did not use them before. Before using these scripts for backup you should test them, we take no responsibility if you backed up something and then lost it.</em></p>
<p><strong>No, that is not a backup</strong></p>
<p>Raid arrays, software or hardware, are not backup solutions, they are just protection in case of a hardware failure. If your hard disk dies raid array will save you a lot of trouble and a lot of time that you would spend to restore the system from backup. Raid array will never save you from a human failure. If you often <em>read mail really fast</em><sup><a href="http://www.twm-kd.com/computers/software/linux-backup-poor-mans-solution/#footnote_0_3701" id="identifier_0_3701" class="footnote-link footnote-identifier-link" title="Using command rm -rf;  which removes the target and all its subdirectories.">1</a></sup> then files will be deleted from all the disk drives in the array at the same time and raid array will not provide any protection from this kind of an error. Raid should be backup supplement not a replacement.</p>
<p><strong>Yes, that is a backup</strong></p>
<p>If you have an external hard drive and you copy your important data on it, then you have at least a partial backup. If you have another computer in the house and you copy important data on it every now and then, then you also have a backup. You need to keep in mind that external drives should be disconnected and unplugged after you make the file transfer. Lightning strike can destroy your computer and all the external devices connected to it, so your external drive has to be disconnected from your computer if you want to call it a backup drive.</p>
<p><strong>Hardware failures</strong></p>
<p>We all had them and we all will have them again. In my fifteen years of experience with hardware I think I saw every single brand of hard drive failing. If there are no faults in the production process<sup><a href="http://www.twm-kd.com/computers/software/linux-backup-poor-mans-solution/#footnote_1_3701" id="identifier_1_3701" class="footnote-link footnote-identifier-link" title="Remember IBM&amp;#8217;s DeathStar disk series?">2</a></sup>, then it does not really matter which brand of hard drive you buy. They all die and they all have very similar <a href="http://en.wikipedia.org/wiki/Mean_time_between_failures" target="_blank">MTBF</a> rating and I still did not see any relevant statistics that proves one brand is better than the other. Make sure that you check your disks on a regular basis, Linux provides many tools for that.</p>
<p><strong>How to backup</strong></p>
<p>Creating backups can be complicated and difficult to setup. I will not bother you with incremental or differential backups, with compression, daily backups, weekly rotation and other similar stuff that is used in <em>a corporate world where big boys play</em>. We will be creating a couple of <a class="zem_slink" title="Shell script" rel="wikipedia" href="http://en.wikipedia.org/wiki/Shell_script">shell scripts</a> that will help you backup your data to a remote server.</p>
<p><strong>The scripts and the tools</strong></p>
<p>As we said already, Linux backup solutions are really not worthy of their names and that is why we need to make our own solution. Let us assume that you have a web server with data in a <a class="zem_slink" title="MySQL" rel="homepage" href="http://www.mysql.com">MySQL</a> database and you want to perform daily backups of your web server. We will use a couple of simple <a href="http://en.wikipedia.org/wiki/Cron" target="_blank"><em>crontab</em></a> scripts that are placed in <em>/etc/cron.daily</em> on your web server and on your backup server. The script below you need to put on your web server or any other remote computer that needs to perform any tasks before you start backing it up.</p>
<div class="wp_syntax"><table><tr><td class="numbers">1</td><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span></pre></td></tr><tr><td class="numbers">2</td><td class="odd_lines"><pre>&nbsp;</pre></td></tr><tr><td class="numbers">3</td><td class="even_lines"><pre><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>database.sql.bz2 <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>database.sql.bz2.old</pre></td></tr><tr><td class="numbers">4</td><td class="odd_lines"><pre><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysqldump <span style="color: #660033;">--defaults-extra-file</span>=<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>.my.cnf <span style="color: #660033;">-A</span> <span style="color: #660033;">--all-databases</span> <span style="color: #660033;">-u</span> root <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bzip2</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>database.sql.bz2</pre></td></tr><tr><td class="numbers">5</td><td class="even_lines"><pre><span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:www-data <span style="color: #660033;">-R</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www</pre></td></tr><tr><td class="numbers">6</td><td class="odd_lines"><pre><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> g+rwx <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></td></tr><tr><td class="numbers">7</td><td class="even_lines"><pre><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> g+rw <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></pre></td></tr></table></div>
<p>First we move database backup to a new file, overwriting previous old backup. This way we make sure that there is at least one database backup available if sql dump fails for some reason. Then we use mysqldump to dump all the content of all the databases, pipe it through bzip2 to compress them and finally write the output to the file <em>database.sql.bz2</em> in the /srv/www directory. For a 100 megabyte dump this takes approximately 30 seconds. Password for mysql is stored in the /root/.my.cnf file and it needs to be passed to mysqldump. Password could be supplied in the command line with -p parameter but that would be very insecure. Because a lot of things can happen on the web server during the day we also make sure that all permissions and ownerships are set correctly.</p>
<p>We will call this script PrepBackup, place it in /etc/cron.daily directory and make it executable. In the end the script needs testing, so we execute it.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> PrepBackup <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.daily<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.daily</pre></td></tr><tr><td class="even_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> PrepBackup</pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>PrepBackup</pre></pre></td></tr></table></div>
<p>Now we need to take care of a timing issue. All Ubuntu servers are executing cron.daily jobs at the same time. We need to run our web server script before we run the actual backup script on the backup server. Cron entries for <em>/etc/cron.*</em> directories are located in <em>/etc/crontab</em> and we will need to edit this file. Look for a line that is similar to this:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">25</span> <span style="color: #000000;">5</span>	<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span>	root	<span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>anacron <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #c20cb9; font-weight: bold;">run-parts</span> <span style="color: #660033;">--report</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.daily <span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></pre></td></tr></table></div>
<p>Notice the first two numbers on the line. First number represents minutes and the second number represents hours. Simply reduce the number of hours for one and your daily cron scripts will run an hour early. Now that we took care of the web server and we are moving on to the backup server.</p>
<p>Backup is performed with <a href="http://en.wikipedia.org/wiki/Rsync" target="_blank">rsync</a> as an unattended process and we need to take care that rsync will be able to login without user intervention. Create an ssh-key for root user on the backup server.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span></pre></pre></td></tr></table></div>
<p>Default filename should be <em>/root/.ssh/id_rsa</em> and no pass phrase for the key. Now we will need to add public key from the backup server to authorized keys on the web server. We need to do this as user who has access to the /srv/www directory:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh</pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">vim</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys</pre></pre></td></tr></table></div>
<p>Paste the content of the id_rsa.pub file in the authorized_keys file. Pico or Nano or any other editor can be used for editing the file, just make sure that the whole key is one single line of text.</p>
<p>Now onto the backup server, testing if this works.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> username<span style="color: #000000; font-weight: bold;">@</span>your.backup.server.com</pre></pre></td></tr></table></div>
<p>If ssh did not ask for a password then we are in business.</p>
<p>The second script that we will need is the one that will actually take care of the backup. We will be backup /srv/www directory on the web server.</p>
<div class="wp_syntax"><table><tr><td class="numbers">1</td><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span></pre></td></tr><tr><td class="numbers">2</td><td class="odd_lines"><pre><span style="color: #007800;">HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>root</pre></td></tr><tr><td class="numbers">3</td><td class="even_lines"><pre>&nbsp;</pre></td></tr><tr><td class="numbers">4</td><td class="odd_lines"><pre>rsync <span style="color: #660033;">-avpe</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> user<span style="color: #000000; font-weight: bold;">@</span>web.server.net:<span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span></pre></pre></td></tr></table></div>
<p>First we need to set the <em>$HOME</em> properly otherwise we will never know what user is running cron job and where his home is. Put this script in /etc/cron.daily on the backup server. It is wise to test everything manually before using it in the production environment.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> PerformBackup <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.daily<span style="color: #000000; font-weight: bold;">/</span></pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cron.daily<span style="color: #000000; font-weight: bold;">/</span>PerformBackup</pre></td></tr><tr><td class="even_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-s</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #666666; font-style: italic;"># cd /etc/cron.daily</span></pre></td></tr><tr><td class="even_lines"><pre><span style="color: #666666; font-style: italic;"># ./PerformBackup</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #666666; font-style: italic;"># exit</span></pre></pre></td></tr></table></div>
<p>If both scripts worked then the content of /srv/www on the web server should be on the backup server in /srv/Backup/www directory together with your database dump. Try changing few files on the web server and run the second script again. It will take much less time to run and all the changed files will be backup up.</p>
<p><strong>History?</strong></p>
<p>The downside of this approach is that you don&#8217;t have any history of your backups and you can not restore a file that was available three days ago. PerformBackup script could be modified and a simple cp command inserted in front of the rsync.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>www <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>www_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>d-<span style="color: #000000; font-weight: bold;">%</span>M-<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #000000; font-weight: bold;">`</span></pre></pre></td></tr></table></div>
<p>This will take care of copying backup directory to www_ with the date suffix. Crude, slow and disk space inefficient, but it works if you really need that history and do not want to invest some time and/or money in a different, more advanced solution.</p>
<ol class="footnotes"><li id="footnote_0_3701" class="footnote">Using command rm -rf;  which removes the target and all its subdirectories.</li><li id="footnote_1_3701" class="footnote">Remember IBM&#8217;s DeathStar disk series?</li></ol>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/cloning-ubuntu-linux-the-easy-way/' rel='bookmark' title='Permanent Link: Cloning Ubuntu Linux &#8211; The easy way'>Cloning Ubuntu Linux &#8211; The easy way</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/linux-tips-aggregated-1/' rel='bookmark' title='Permanent Link: Linux Tips Aggregated &#8211; 1'>Linux Tips Aggregated &#8211; 1</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/network-boot-and-install-of-ubuntu-linux/' rel='bookmark' title='Permanent Link: Network boot and install of Ubuntu Linux'>Network boot and install of Ubuntu Linux</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/linux-backup-poor-mans-solution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0 &#8211; What&#8217;s new</title>
		<link>http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/</link>
		<comments>http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 22:21:57 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Preview]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3670</guid>
		<description><![CDATA[New major release of Wordpress is coming our way. Current release is marked as Wordpress 3.0 beta1. First we will take a look at what is new and if the new is good or bad.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/using-menus-in-wordpress-3-0/' rel='bookmark' title='Permanent Link: Using menus in WordPress 3.0'>Using menus in WordPress 3.0</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/wordpress-plugins-you-need-to-survive/' rel='bookmark' title='Permanent Link: WordPress plugins you need to survive'>WordPress plugins you need to survive</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/' rel='bookmark' title='Permanent Link: Optimizing WordPress &#8211; Tips for Speed'>Optimizing WordPress &#8211; Tips for Speed</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div class="wp-caption alignright" style="width: 151px"><a href="http://www.flickr.com/photos/9080929@N05/3361413196"><img class=" " title="WordPress Logo" src="http://static.twm-kd.com/twm-uploads/3361413196_53c355e34c_m.jpg" alt="WordPress Logo" width="141" height="144" /></a><p class="wp-caption-text">Image by koka_sexton via Flickr</p></div>
</div>
<p>New major release of <a class="zem_slink" title="WordPress" rel="homepage" href="http://wordpress.org">WordPress</a> is coming our way. Current release is marked as WordPress 3.0 beta1. We will take a look at what is new and if the new is good or bad. And we will provide screen shots in our quick preview, we promise.</p>
<p>Upgrading WordPress is always something that we don&#8217;t take so lightly. A typical website based on WordPress, it could be a blog or not, will have a lot of plugins installed, some widgets and a more or less customized theme, sometimes perhaps even a custom made theme. Upgrading a minor version is a minor pain which means that upgrading a major version will be a major pain. That is why we did this just for you. So that our site will be broken first and you can see where we went wrong. Read on if you want to see how we handled the upgrade.</p>
<p><span id="more-3670"></span>Of course we are not that silly<sup><a href="http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/#footnote_0_3670" id="identifier_0_3670" class="footnote-link footnote-identifier-link" title="We aren&amp;#8217;t?">1</a></sup> to play on our main site, so we did it on our test site.</p>
<p>Upgrade was smooth, the usual <em>delete everything except wp-config.php and wp-content/</em> worked for us. More detailed upgrade step by step instructions would follow these steps:</p>
<ul>
<li>Login as Admin</li>
<li>Disable all plugins</li>
<li>Delete everything except <em>wp-config.php</em> and <em>wp-content/</em> in your wordpress directory</li>
<li>Visit http://yourblog/wp-admin/upgrade.php</li>
<li>Follow the instructions</li>
</ul>
<p>Database upgrade completed without any difficulties and after the upgrade we started to turn on our plugins. We turned on all of the plugins that we use except the WP-SuperCache and Ozh&#8217; Admin Drop Down Menu. Heavily modified theme that we use currently on our website didn&#8217;t work as it was supposed to, but we didn&#8217;t expect it to actually work. We switched to the new default theme which is supposed to demonstrate few of the new Theme <a class="zem_slink" title="Application programming interface" rel="wikipedia" href="http://en.wikipedia.org/wiki/Application_programming_interface">API</a> features.</p>
<p>New default theme, Twenty Ten, is simple and comes with few interesting features. First we noticed that <a class="zem_slink" title="Zemanta" rel="homepage" href="http://www.zemanta.com">Zemanta</a> plugin didn&#8217;t render floating descriptions on images correctly, but it isn&#8217;t clear if this is plugins fault or new theme breaks something.</p>
<p align="center">
<div id="attachment_3678" class="wp-caption aligncenter" style="width: 310px"><a href="http://static.twm-kd.com/twm-uploads/wp3_zemanta.png"><img class="size-medium wp-image-3678" title="Zemanta Render" src="http://static.twm-kd.com/twm-uploads/wp3_zemanta-300x76.png" alt="" width="300" height="76" /></a><p class="wp-caption-text">Broken description</p></div>
</p>
<p>Other than that we did not encounter any other problems with rendering. Default theme is fast and light and it comes with the built in option to change header image of your blog. Support for threaded comments is also there.</p>
<p align="center">
<div id="attachment_3680" class="wp-caption aligncenter" style="width: 310px"><a href="http://static.twm-kd.com/twm-uploads/wp3_headers.png"><img class="size-medium wp-image-3680" title="Select your header" src="http://static.twm-kd.com/twm-uploads/wp3_headers-300x229.png" alt="" width="300" height="229" /></a><p class="wp-caption-text">Header Selection</p></div>
</p>
<p>New theme is also packed with placeholders for widgets and because sidebars are so 2009, they are now called widget areas. Which can cause some confusion since you must guess where each area is located.</p>
<p align="center">
<div id="attachment_3681" class="wp-caption aligncenter" style="width: 168px"><a href="http://static.twm-kd.com/twm-uploads/wp3_widgets.png"><img class="size-medium wp-image-3681" title="Widget Areas" src="http://static.twm-kd.com/twm-uploads/wp3_widgets-158x300.png" alt="" width="158" height="300" /></a><p class="wp-caption-text">New widget areas</p></div>
</p>
<p>Theme changer, editor and installer got some love and tabbed interface will make theme installing and switching a little easier. One of the new features is also the new editor-style.css. This style is applied to the built in editor and now editor in visual mode can display what really gets rendered on your screen<sup><a href="http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/#footnote_1_3670" id="identifier_1_3670" class="footnote-link footnote-identifier-link" title="WYSIWYRG &amp;#8211; What You See Is What You Really Get">2</a></sup>. The whole admin interface and dashboard were changed a little bit, but not as much as you would expect in a major release. We were hoping for more color schemes, unfortunately we are still stuck with blue and gray.</p>
<p>Another important feature in WordPress 3.0 will be menus. Menus give you the ability to create customized menus for your blog. With beta1 each menu item can contain existing pages, custom links and existing categories. This can, and we hope it will, change in the next beta. We really did miss an option to add a label item to the menu and we managed to kill our test blog by experimenting with the various menus. Right now you will have to create a new dummy custom link if you want group options in sub menus.</p>
<p align="center">
<div id="attachment_3685" class="wp-caption alignnone" style="width: 310px"><a href="http://static.twm-kd.com/twm-uploads/wp3_menus.png"><img class="size-medium wp-image-3685" title="Wordpress Menus" src="http://static.twm-kd.com/twm-uploads/wp3_menus-300x153.png" alt="" width="300" height="153" /></a><p class="wp-caption-text">Current Menu Editor</p></div>
</p>
<p>Menus will come in handy to those who want to organize their menu based structure on the front page. Now you can drag and drop and create sub menus easily. On the Twenty Ten theme the above menu will look like this:</p>
<p align="center">
<div id="attachment_3688" class="wp-caption alignnone" style="width: 310px"><a href="http://static.twm-kd.com/twm-uploads/wp3_menus_rendered1.png"><img class="size-medium wp-image-3688" title="Rendered Menus" src="http://static.twm-kd.com/twm-uploads/wp3_menus_rendered1-300x117.png" alt="" width="300" height="117" /></a><p class="wp-caption-text">Rendered Menus</p></div>
</p>
<p>Even in beta1 menus look promising and creating a little more complicated structure is not that difficult compared to previous WordPress versions.</p>
<p>More advanced writers will be happy about ability to add custom post types. Default theme does not have any support for that, but theme developers will be able to add various post types with many different parameters. Custom posts are described <a href="http://wpengineer.com/impressions-of-custom-post-type/" target="_blank">at wpengineer.com</a>.</p>
<p>Another big thing in 3.0 release is merge of WordPress and <a href="http://mu.wordpress.org/" target="_blank">WordPress MU</a>. WordPress MU was used for large sites that were providing WordPress as a service for many, many users. If you host only one blog for yourself then nothing will change for you. If you have multiple users with separate installations, then things will be a bit simpler from now on.</p>
<p>In the end we came to the thing called Canonical Plug-ins. There is this movement that is trying to unify plugin developers and create more dedicated community so that plugins don&#8217;t die when a single developer, who was developing it, leaves to chase other things in life. We are keeping our fingers crossed. Really!</p>
<p>All in all WordPress 3.0 looks promising so far. Not too many noticeable bugs and we managed to kill our blog only once when we were playing with the menus. Promised changes and some more work on this feature will most likely deal with these issues. Smooth and steady sailing into the beta2 and then final release that you can jump on.</p>
<ol class="footnotes"><li id="footnote_0_3670" class="footnote">We aren&#8217;t?</li><li id="footnote_1_3670" class="footnote">WYSIWYRG &#8211; What You See Is What You Really Get</li></ol>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/using-menus-in-wordpress-3-0/' rel='bookmark' title='Permanent Link: Using menus in WordPress 3.0'>Using menus in WordPress 3.0</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/wordpress-plugins-you-need-to-survive/' rel='bookmark' title='Permanent Link: WordPress plugins you need to survive'>WordPress plugins you need to survive</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/' rel='bookmark' title='Permanent Link: Optimizing WordPress &#8211; Tips for Speed'>Optimizing WordPress &#8211; Tips for Speed</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing KDE 4.4 in Ubuntu 9.10 Karmic Koala</title>
		<link>http://www.twm-kd.com/computers/software/installing-kde-4-4-in-ubuntu-9-10-karmic-koala/</link>
		<comments>http://www.twm-kd.com/computers/software/installing-kde-4-4-in-ubuntu-9-10-karmic-koala/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 19:13:46 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Desktop environment]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3578</guid>
		<description><![CDATA[Installing KDE in Ubuntu can sometimes be a little bit painful. We provided simple instructions on how to do this in only few simple steps.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/kubuntu-9-10-karmic-koala-preview/' rel='bookmark' title='Permanent Link: Kubuntu 9.10 Karmic Koala preview'>Kubuntu 9.10 Karmic Koala preview</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/diving-into-kde-4-3-survival-guide-for-ubuntu/' rel='bookmark' title='Permanent Link: Diving into KDE 4.3 &#8211; Survival guide for Ubuntu'>Diving into KDE 4.3 &#8211; Survival guide for Ubuntu</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/upgrade-ubuntu-10-04-lucid-lynx-to-10-10-maverick-meerkat/' rel='bookmark' title='Permanent Link: Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat'>Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 138px;">
<dt class="wp-caption-dt"><a href="http://commons.wikipedia.org/wiki/Image:KDE_logo.svg"><img title="K Desktop Environment" src="http://static.twm-kd.com/twm-uploads/128px-KDE_logo.svg_.png" alt="K Desktop Environment" width="128" height="128" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://commons.wikipedia.org/wiki/Image:KDE_logo.svg">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>In a little bit more than a month before the release of <a class="zem_slink" title="List of Ubuntu releases" rel="wikipedia" href="http://en.wikipedia.org/wiki/List_of_Ubuntu_releases">Ubuntu 10.04</a> Lucid Lynx I decided that I want to try how <a class="zem_slink" title="KDE" rel="homepage" href="http://www.kde.org/">KDE</a> 4.4 behaves and if I am ready to switch from Gnome to KDE again. My heart was always with KDE and Qt but after KDE 3.5 everything went downhill and I switched to Gnome. I really want to try the new KDE, but going to Beta software on my primary workstation is not an option and I will stick with Karmic Koala for a while after the release of Lucid Lynx which will be shipping with KDE 4.4. The only option for me and others like me is to install KDE desktop on top of existing <a class="zem_slink" title="Ubuntu (operating system)" rel="homepage" href="http://www.ubuntu.com/">Ubuntu</a> taking it from the backports repository. Here are simple step by step instructions on how to do this.<br />
<span id="more-3578"></span></p>
<p>First you need to add another software source. Clink on the System menu then select Administration sub-menu and run Software Sources. Select the Other Software tab and click Add then copy the following line into the input box.</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">deb http:<span style="color: #000000; font-weight: bold;">//</span>ppa.launchpad.net<span style="color: #000000; font-weight: bold;">/</span>kubuntu-ppa<span style="color: #000000; font-weight: bold;">/</span>backports<span style="color: #000000; font-weight: bold;">/</span>ubuntu karmic main</pre></pre></td></tr></table></div>
<p style="text-align: center;"><a href="http://static.twm-kd.com/twm-uploads/Screenshot-Software-Sources.png"><img class="size-medium wp-image-3647 aligncenter" title="Adding software source" src="http://static.twm-kd.com/twm-uploads/Screenshot-Software-Sources-300x202.png" alt="" width="300" height="202" /></a></p>
<p>Now select the Updates tab and enable unsuported updates for karmic backports.</p>
<p style="text-align: center;"><a href="http://static.twm-kd.com/twm-uploads/Screenshot-Software-Sources-1.png"><img class="size-medium wp-image-3648 aligncenter" title="Enabling unsupported updates" src="http://static.twm-kd.com/twm-uploads/Screenshot-Software-Sources-1-300x202.png" alt="" width="300" height="202" /></a></p>
<p>Close the Software Sources and open the terminal. It will make things easier, really. Type in the following commands:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update</pre></td></tr><tr><td class="odd_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> kubuntu-desktop</pre></td></tr><tr><td class="even_lines"><pre>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> dist-upgrade</pre></pre></td></tr></table></div>
<p>You will first perform an update, then you will perform basic install of kubuntu-desktop. Unfortunately some things are so deeply rooted inside the distribution that in the end you will want to perform dist-upgrade. The process will take some time, depending on the speed of your Internet connection and the speed of your computer.</p>
<p>There is no need to reboot after the process is completed. All you need to do is to logout, change your session to KDE and log back in. You should see KDE splash screen and then whole KDE after few moments.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=a2760bd7-30ee-4a47-b445-101d55bf9e84" alt="" /><span class="zem-script pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/kubuntu-9-10-karmic-koala-preview/' rel='bookmark' title='Permanent Link: Kubuntu 9.10 Karmic Koala preview'>Kubuntu 9.10 Karmic Koala preview</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/diving-into-kde-4-3-survival-guide-for-ubuntu/' rel='bookmark' title='Permanent Link: Diving into KDE 4.3 &#8211; Survival guide for Ubuntu'>Diving into KDE 4.3 &#8211; Survival guide for Ubuntu</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/upgrade-ubuntu-10-04-lucid-lynx-to-10-10-maverick-meerkat/' rel='bookmark' title='Permanent Link: Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat'>Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/installing-kde-4-4-in-ubuntu-9-10-karmic-koala/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.04 Lucid Lynx &#8211; What&#8217;s New?</title>
		<link>http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/</link>
		<comments>http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 07:57:16 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Canonical Ltd.]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid Lynx]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3581</guid>
		<description><![CDATA[Lucid Lynx is the new release of Ubuntu Linux operating system. We decided that it should be us testing it for you and telling you what's new and what's hot.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/upgrade-ubuntu-10-04-lucid-lynx-to-10-10-maverick-meerkat/' rel='bookmark' title='Permanent Link: Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat'>Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/installing-kde-4-4-in-ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Installing KDE 4.4 in Ubuntu 9.10 Karmic Koala'>Installing KDE 4.4 in Ubuntu 9.10 Karmic Koala</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/diving-into-kde-4-3-survival-guide-for-ubuntu/' rel='bookmark' title='Permanent Link: Diving into KDE 4.3 &#8211; Survival guide for Ubuntu'>Diving into KDE 4.3 &#8211; Survival guide for Ubuntu</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div class="wp-caption alignright" style="width: 154px"><a href="http://www.flickr.com/photos/44237541@N00/1991870530"><img class=" " title="Canadian Lynx" src="http://static.twm-kd.com/twm-uploads/1991870530_077df2ba51_m.jpg" alt="Canadian Lynx" width="144" height="124" /></a><p class="wp-caption-text">Image by digitalART2 via Flickr</p></div>
</div>
<p><a class="zem_slink" title="List of Ubuntu releases" rel="wikipedia" href="http://en.wikipedia.org/wiki/List_of_Ubuntu_releases">Lucid Lynx</a> is the new release of <a class="zem_slink" title="Ubuntu (operating system)" rel="homepage" href="http://www.ubuntu.com/">Ubuntu Linux operating system</a>. We decided that it should be us testing it for you and telling you what&#8217;s new and what&#8217;s hot. This release of Ubuntu will be marked 10.04 LTS. Ubuntu is released every six months so you are always up to date with your software. LTS versions are released every two years and <a href="http://www.canonical.com/" target="_blank">Canonical</a> will be providing support for three years for every LTS release (five for servers). Let&#8217;s see what was simmering for the past six months and is due to release at the end of the April.</p>
<p><span id="more-3581"></span></p>
<p>Here are the biggest changes that you will notice and care about:</p>
<ul>
<li><a class="zem_slink" title="GNOME" rel="homepage" href="http://www.gnome.org/">GNOME</a> 2.29.92 &#8211; desktop environment that is already showing its age was again updated, unfortunately nothing major is new in the Gnome camp and for Gnome 3.0 we will have to wait at least six more months if not a whole year. Other minor changes include new default colors and re-arrangement of the title bar buttons. All three of them are on the left side of the windows, Mac OS X style. Something you will need to get used to.</li>
<li><a class="zem_slink" title="KDE Software Compilation 4" rel="homepage" href="http://www.kde.org/">KDE SC 4.4</a> &#8211; No more backports, the latest and the greatest KDE release is included in Kubuntu spin-off.  KDE Software Compilation 4.4 was released in the beginning of February, barely catching Lucid Lynx feature freeze. More about changes in the <a href="http://kde.org/announcements/4.4/" target="_blank">official announcement</a>.</li>
<li> Kernel 2.6.32 &#8211; Latest kernel is most of the time a good thing. New drivers added and old drivers fixed.</li>
<li> Firefox default search engine is now Yahoo. You can still use Google, but Yahoo is now the default. Why? More income for Canonical. ;)</li>
<li> New graphic drivers &#8211; Nvidia users be happy, Lucid Lynx will come with new open source drivers and three different closed source drivers. Ati users will have to stick with the open source driver for now because new fglrx driver does not support X server that is shipped with Lucid Lynx.</li>
<li> Social networks &#8211; MeMenu panel for easy access to chat services and microblogging and new Gwibber microblogging client with support for many social networks. From now on only fire will force you to leave your house.</li>
</ul>
<p><strong>Installation &amp; First Impression<br />
</strong></p>
<p>Installation inside a VirtualBox was much slower compared to the installation of Kubuntu 9.10 Karmic Koala which we performed on the same hardware inside the same VirtualBox. Apart from that, there are no significant differences between Karmic and Lucid installer. Everything looks almost the same and ext4 is still the default file system. If there are any <em>under the hood</em> changes in the installer we did not notice them.</p>
<p>After the reboot, first thing you will notice is the new look. User interface evolved a little, but nothing revolutionary new. Screen locking is now enabled by default. We had to try and see how Gwibber and MeMenu work. After couple of hours we can say that both are still a little awkward to use and they both lack certain features.</p>
<p><strong>MeMenu</strong></p>
<p>MeMenu is an attempt to integrate social networks into the Gnome Desktop. You can add two types of accounts to MeMenu: chat accounts (AIM, Yahoo, Jabber, MSN Messenger, &#8230;) and broadcast accounts (Twitter, Flickr, Facebook, FriendFeed, &#8230;). From MeMenu you can then change online presence for chat accounts and you can send status updates to your broadcast accounts. Unfortunately the former happens with no visible feedback and you really don&#8217;t know if you actually posted anything or not, beside that, you do not know if you are changing your status on chat account or you are broadcasting something<sup><a href="http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/#footnote_0_3581" id="identifier_0_3581" class="footnote-link footnote-identifier-link" title="Sending your new status update to Twitter and other services is now called broadcasting.">1</a></sup>. Doing both at the same time is something that we will not like.</p>
<p>Another thing that bothered us is the fact that you cannot use MeMenu to start Empathy or Gwibber. It is even worse than that, MeMenu is inactive until you start Empathy by yourself. When you close Empathy MeMenu will still show you as online and you are still able to change your status and receive messages. The problem is that notifications about the new messages pop up as balloons and you cannot click on them<sup><a href="http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/#footnote_1_3581" id="identifier_1_3581" class="footnote-link footnote-identifier-link" title="In fact if you bring your mouse to the balloon it will disappear.">2</a></sup> to open chat window and you cannot open chat in MeMenu, you need to run Empathy again.</p>
<p>If you miss the balloon notification you missed the message. There is no indicator that you have messages waiting, again you need to open Empathy to see the blinking icon beside your contact.</p>
<p><strong>Gwibber</strong></p>
<p>Integration of Gwibber and MeMenu could be better. As we said before, there is no indication of what you are doing when you are entering text inside the input field in MeMenu. Gwibber by itself is a completely different story altogether. It is already usable but I would be careful before calling it beta.</p>
<p>It lacks a lot of features, for example sending direct messages on Twitter. You can see all your direct messages, received and sent, but you cannot send new direct messages with a simple click. There is no option to send direct message. If there is, it managed to stay hidden from us.</p>
<p>Beside that, there are no separate settings for retrieving public tweets, @ replies and direct messages. So if you set retrieval time to 1 minute all three types of tweets will be picked up every minute which means that you will reach your API limit in less than an hour<sup><a href="http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/#footnote_2_3581" id="identifier_2_3581" class="footnote-link footnote-identifier-link" title="Unless something has changed lately.">3</a></sup>. Preview of images uploaded on twitpic or on other picture posting sites would be nice too. Option to post images that are automatically uploaded to twitpic would be pushing it.</p>
<p>Gwibber is a nice start, but it still needs time to develop and we have to give it time since there are no decent and native Twitter clients for Linux. Adobe Air apps do not count.</p>
<p><strong>Is that it?<br />
</strong></p>
<p>Mostly yes, there are not many major changes, which is good, because we are looking at the LTS release. It appears that social networks are becoming a part of our working environments and if half a year ago cell phones started to support them on a larger scale, desktops are now following.</p>
<p>Among other changes it is also worth mentioning that HAL<sup><a href="http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/#footnote_3_3581" id="identifier_3_3581" class="footnote-link footnote-identifier-link" title="Hardware Abstraction Layer">4</a></sup> was thrown out and it was replaced by Devicekit which should result in faster boot. Gimp was removed from the default installation. You  can install it later at any time with Synaptic package manager or with command line utilities. Obligatory change in splash screen and GDM background is also here. The latest release is a step forward into the right direction, but we cannot help in feeling that <a class="zem_slink" title="List of Ubuntu releases" rel="wikipedia" href="http://en.wikipedia.org/wiki/List_of_Ubuntu_releases">Ubuntu 10.04</a> was rushed out at least half a year if not one whole year too soon. MeMenu and Gwibber need some more polishing and few features are still missing. Features that cannot be added after the feature freeze with beta1 release at our doorstep.</p>
<p>During the test we also noticed that VirtualBox&#8217;s Guest Additions cannot be installed on Lucid Lynx. Kernel modules fail to compile, but this is probably because of the new kernel and older version of VirtualBox.</p>
<p align="center">
<a href="http://static.twm-kd.com/twm-uploads/snapshot11.png"><img class="alignnone size-thumbnail wp-image-3622" title="New Ubuntu Look" src="http://static.twm-kd.com/twm-uploads/snapshot11-150x150.png" alt="" width="150" height="150" /></a> <a href="http://static.twm-kd.com/twm-uploads/snapshot4.png"><img class="alignnone size-thumbnail wp-image-3623" title="Default Gnome Terminal colors" src="http://static.twm-kd.com/twm-uploads/snapshot4-150x150.png" alt="" width="150" height="150" /></a>
</p>
<p align="center">
<a href="http://static.twm-kd.com/twm-uploads/snapshot3.png"><img class="alignnone size-thumbnail wp-image-3624" title="MeMenu" src="http://static.twm-kd.com/twm-uploads/snapshot3-150x150.png" alt="" width="150" height="150" /></a> <a href="http://static.twm-kd.com/twm-uploads/snapshot5.png"><img class="alignnone size-thumbnail wp-image-3626" title="Gwibber looks nice" src="http://static.twm-kd.com/twm-uploads/snapshot5-150x150.png" alt="" width="150" height="150" /></a></p>
<ol class="footnotes"><li id="footnote_0_3581" class="footnote">Sending your new status update to Twitter and other services is now called broadcasting.</li><li id="footnote_1_3581" class="footnote">In fact if you bring your mouse to the balloon it will disappear.</li><li id="footnote_2_3581" class="footnote">Unless something has changed lately.</li><li id="footnote_3_3581" class="footnote">Hardware Abstraction Layer</li></ol>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/upgrade-ubuntu-10-04-lucid-lynx-to-10-10-maverick-meerkat/' rel='bookmark' title='Permanent Link: Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat'>Upgrade Ubuntu 10.04 Lucid Lynx to 10.10 Maverick Meerkat</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/installing-kde-4-4-in-ubuntu-9-10-karmic-koala/' rel='bookmark' title='Permanent Link: Installing KDE 4.4 in Ubuntu 9.10 Karmic Koala'>Installing KDE 4.4 in Ubuntu 9.10 Karmic Koala</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/diving-into-kde-4-3-survival-guide-for-ubuntu/' rel='bookmark' title='Permanent Link: Diving into KDE 4.3 &#8211; Survival guide for Ubuntu'>Diving into KDE 4.3 &#8211; Survival guide for Ubuntu</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/ubuntu-10-04-lucid-lynx-whats-new/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizing WordPress &#8211; Tips for Speed</title>
		<link>http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/</link>
		<comments>http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 17:58:49 +0000</pubDate>
		<dc:creator>BigWhale</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hypertext Transfer Protocol]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3518</guid>
		<description><![CDATA[Optimizing Wordpress in a preparation of being slashdotted, digged, stumbled upon, twittered or whatever. What can be done with Wordpress and your servers.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/wordpress-plugins-you-need-to-survive/' rel='bookmark' title='Permanent Link: WordPress plugins you need to survive'>WordPress plugins you need to survive</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/zemanta-plugin-and-wordpress-27/' rel='bookmark' title='Permanent Link: Zemanta plugin and WordPress 2.7'>Zemanta plugin and WordPress 2.7</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/' rel='bookmark' title='Permanent Link: WordPress 3.0 &#8211; What&#8217;s new'>WordPress 3.0 &#8211; What&#8217;s new</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div class="wp-caption alignright" style="width: 220px"><a href="http://commons.wikipedia.org/wiki/Image:Wordpress-logo.png"><img class=" " title="WordPress" src="http://static.twm-kd.com/twm-uploads/300px-Wordpress-logo.png" alt="WordPress" width="210" height="48" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
</div>
<p><a class="zem_slink" title="WordPress" rel="homepage" href="http://wordpress.org">WordPress</a> is crap,  but it is the best crap we can get. When your website, with WordPress sitting in the back, starts to pick up traffic, it will slow down and become unresponsive. Adding hardware will help, but correctly implemented load balancing and load distribution across more than one computer can be tricky and expensive. Trying to optimize WordPress and the web server itself usually gives better short-term results. In the long run even this won&#8217;t help and it will just postpone the inevitable, you will have to cluster in one way or another. I am not going to talk about clustering and load balancing today, I will focus on optimizing your WordPress. Newbie friendly, yet hardcore, meaning that I will provide explanation for all the complicated stuff.<br />
<span id="more-3518"></span><br />
<strong>What is slowing you down?</strong></p>
<p>This is essential question with all optimizations. Figure out what is causing the slowdown! I have worked in IT for all my life and I was called to help with optimizations on all sorts of things. Let it be a local network or some internal database for a service provider, the procedure is always the same. Figuring out bottle necks and getting rid of them.</p>
<p>With WordPress, there is no big secret, PHP is slowing you down<sup><a href="http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/#footnote_0_3518" id="identifier_0_3518" class="footnote-link footnote-identifier-link" title="Author of this text firmly believes that PHP should rename itself to LOL, reasons will be provided at some other time">1</a></sup>. The first thing you can do, is to try to localize the bottleneck. It could be the new plug-in you just installed and it turned out that it does not scale as it should. Get rid of it or go around it. As with the most WordPress installations the slowdown will be more global. Everything will be slow, sluggish and unresponsive.</p>
<p><strong>Optimize where it makes sense</strong></p>
<p>Second thing that you need to be careful with. I had the pleasure of working with people who spend weeks on optimizing a function that was perhaps called once every few hours. Don&#8217;t go and optimize things that are accessed rarely, for example the <em>&#8216;My Life Story&#8217;</em> page on your blog. No real need unless it is blocking the site and you are sure that it is the cause of your troubles.</p>
<p><strong>WordPress plugins that will help you</strong></p>
<p>Now, lets take a look at couple of WordPress plugins that will greatly improve responsiveness of your blog.</p>
<p><em><a title="WP Super Cache" rel="homepage" href="http://wordpress.org/extend/plugins/wp-super-cache/" target="_blank">WP Super Cache</a></em> &#8211; Properly configured Super Cache plugin is a must. Since we know that PHP is slowing us down we need to take it out of the equation. This plugin will generate static HTML files and with a little help of the web server it will serve those static files to non-logged in visitors if they didn&#8217;t post any comments on your site. This accounts for the majority of the traffic.</p>
<p>Getting rid of the dynamic stuff is probably the most important thing that you can do and it will also matter the most. PHP is eating a lot of your resources away and compared to this, serving static pages is easier than eating pancakes.</p>
<p><em><a href="http://omninoggin.com/wordpress-plugins/wp-minify-wordpress-plugin/" target="_blank">WP Minify</a></em> &#8211; Scripts and style sheets can become quite large and you will probably end up with more than one of each. Minifiying them means erasing all the extra characters that are there for readability. Web browsers usually don&#8217;t need them.</p>
<p>Here is an example of ordinary CSS that comes with Sociable plugin and below it is the minified version:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="css" style="font-family:monospace;">div<span style="color: #6666ff;">.sociable</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">16px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr><tr><td class="odd_lines"><pre>&nbsp;</pre></td></tr><tr><td class="even_lines"><pre>span<span style="color: #6666ff;">.sociable_tagline</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr><tr><td class="odd_lines"><pre>span<span style="color: #6666ff;">.sociable_tagline</span> span <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14em</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr><tr><td class="even_lines"><pre>span<span style="color: #6666ff;">.sociable_tagline</span><span style="color: #3333ff;">:hover </span>span <span style="color: #00AA00;">&#123;</span></pre></td></tr><tr><td class="odd_lines"><pre>	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="even_lines"><pre>	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="odd_lines"><pre>	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-5em</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="even_lines"><pre>	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ffe</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="odd_lines"><pre>	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="even_lines"><pre>	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="odd_lines"><pre>	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.25em</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="even_lines"><pre><span style="color: #00AA00;">&#125;</span></pre></pre></td></tr></table></div>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="css" style="font-family:monospace;">div<span style="color: #6666ff;">.sociable</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">16px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr><tr><td class="odd_lines"><pre>span<span style="color: #6666ff;">.sociable_tagline</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr><tr><td class="even_lines"><pre>span<span style="color: #6666ff;">.sociable_tagline</span> span<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>width<span style="color: #00AA00;">:</span><span style="color: #933;">14em</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr><tr><td class="odd_lines"><pre>span<span style="color: #6666ff;">.sociable_tagline</span><span style="color: #3333ff;">:hover </span>span<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>display<span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>top<span style="color: #00AA00;">:</span><span style="color: #933;">-5em</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#ffe</span><span style="color: #00AA00;">;</span>border<span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>color<span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>line-<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.25em</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></pre></td></tr></table></div>
<p>It might not seem much, but CSS files and JavaScript files can grow pretty big. TWM website has CSS that is larger than 12kB, properly minimified is just a bit more than 9kB. Three kilobytes less for server to send and for the client to process.</p>
<p>WP Minify will, before the page is displayed, catch all the style sheet and java script files, glue them together, minifty them and then output them. The good part is that Minify plugin can work together with Super Cache plugin. Minified versions of your files are then cached and sent to the clients.</p>
<p>Make sure you run some tests before you start using it. Minify doesn&#8217;t work with slightly hacked <a class="zem_slink" title="Zemanta" rel="homepage" href="http://www.zemanta.com">Zemanta</a> plugin<sup><a href="http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/#footnote_1_3518" id="identifier_1_3518" class="footnote-link footnote-identifier-link" title="Using Zemanta loader in the blog footer.">2</a></sup> and WP-Cumulus plugin<sup><a href="http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/#footnote_2_3518" id="identifier_2_3518" class="footnote-link footnote-identifier-link" title="Here at TWM we still can&amp;#8217;t decide if we want to keep this plugin or not.">3</a></sup> for the pretty tag cloud. So make sure that it doesn&#8217;t make a mess with any of your Java Scripts files or it could in theory mess up your Style Sheets too.</p>
<p>Warning: If you are adding extra CSS or JS files in the configuration interface that need to be minified make sure that text area where you enter file names doesn&#8217;t end with an empty line. It will break the plugin.</p>
<p><strong>So much for the WordPress</strong></p>
<p>Not much more can be done in WordPress itself unless you are determined to hack into it. You could do that, but then you will have to do it each time you upgrade WordPress. And you will want to upgrade every now and then. Now, comes the hard part, optimizing general page performance. We did great with minifying everything and serving it as static content and this will matter the most on the server side.</p>
<p>The question now is where else can we gain some speed? Where are we losing precious CPU cycles and sometimes even more precious bandwidth? Maybe if we try to minimize number of requests to the web server itself?</p>
<p><em>Optimize your theme</em></p>
<p>Get rid of all the theme images if you can. That means, not getting rid of them entirely, but put them in a single static bitmap and then use it as CSS sprite. This will greatly reduce the number of requests on your web server. The whole procedure is too long to describe here, but Google will return plenty hits on CSS sprites. The theme you see here had more than twenty images and we were able to merge all of them in to a sprite. Now CSS is taking care of displaying the correct part of the image. Client has to make only one single request to download the bitmap. In our case the bitmap was also smaller than all of the images together. Win &#8211; Win!</p>
<p><em>Keep your redirects at minimum</em></p>
<p>Redirects are a convenient way to point the client in a different direction. If you change the permalink of a blog post, WordPress remembers that. Them it performs a 301 redirect to the new address if someone tries to access the old one. 301 is an HTTP response code that is followed by a new URL and tells the client to go look to the new address for content. It is also called a &#8216;search engine friendly&#8217; redirect. This is because search engines will most of the time remember that the location was moved permanently and they will use the new address.</p>
<p>Because of this, each redirected page will generate two hits on your web server. Avoid redirects and use them only when necessary.</p>
<p><em>Use trailing slashes</em></p>
<p>Make sure that you are using trailing slashes. When you are referencing something on your blog, a category for example, the URL should have a trailing slash. If it is lacking one Apache web server will automatically create a 301 redirect and add a trailing slash. And we learned above that redirects are not good, especially not the ones that are really unnecessary.</p>
<p><span style="color: #00ff00;">Right:</span></p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">http:<span style="color: #000000; font-weight: bold;">//</span>www.twm-kd.com<span style="color: #000000; font-weight: bold;">/</span>category<span style="color: #000000; font-weight: bold;">/</span>computers<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span></pre></pre></td></tr></table></div>
<p><span style="color: #ff0000;">Wrong:</span></p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">http:<span style="color: #000000; font-weight: bold;">//</span>www.twm-kd.com<span style="color: #000000; font-weight: bold;">/</span>category<span style="color: #000000; font-weight: bold;">/</span>computers<span style="color: #000000; font-weight: bold;">/</span>software</pre></pre></td></tr></table></div>
<p><em>Enable compression</em></p>
<p>Compressing plain text content can reduce payload up to 70% or even more and this saves precious bandwidth. Keep in mind that compressing small files, smaller than couple hundred bytes, can actually make them larger! Also if you are having CPU problems and your CPU can&#8217;t cope with the load, then you need to turn off the compression, but you will need to test this.</p>
<p>There is an option for this in WP Super Cache plugin. If you are not using Super Cache you will have to enable compression manually. To enable this across the site add the following line to your apache configuration:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="xml" style="font-family:monospace;">        SetOutputFilter DEFLATE</pre></td></tr><tr><td class="odd_lines"><pre>        BrowserMatch ^Mozilla/4\.0[678] no-gzip\</pre></td></tr><tr><td class="even_lines"><pre>        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html</pre></td></tr><tr><td class="odd_lines"><pre>        # Don't compress images</pre></td></tr><tr><td class="even_lines"><pre>        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|swf)$ no-gzip dont-vary</pre></pre></td></tr></table></div>
<p>If you are using Ubuntu Server or Debian GNU/Linux distribution then you will have to enable mod_deflate:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod deflate</pre></pre></td></tr></table></div>
<p>This will enable module deflate. Make sure that there are two symlinks in <em>/etc/apache2/mod-enabled</em>, <em>deflate.conf</em> and <em>deflate.load</em>. Then you will have to restart the web server.</p>
<p><em>Optimize your database</em></p>
<p>MySQL database can scale pretty well, but it has few problems here and there. One of them is not storing the data as efficiently as possible (for reading) and tables can get dirty. You will need to optimize them. If you are using phpMyAdmin for administration then you can do if from the main database view by checking the tables you want to optimize and then selecting optimize below in the operations. We here at TWM prefer the command line:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="sql" style="font-family:monospace;">$ mysql <span style="color: #66cc66;">-</span>u user <span style="color: #66cc66;">-</span>p wordpress</pre></td></tr><tr><td class="odd_lines"><pre>mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">OPTIMIZE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> wp_options;</pre></td></tr><tr><td class="even_lines"><pre><span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">-----------------------+----------+----------+----------+</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">TABLE</span>                 <span style="color: #66cc66;">|</span> Op       <span style="color: #66cc66;">|</span> Msg_type <span style="color: #66cc66;">|</span> Msg_text <span style="color: #66cc66;">|</span></pre></td></tr><tr><td class="even_lines"><pre><span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">-----------------------+----------+----------+----------+</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #66cc66;">|</span> wordpress<span style="color: #66cc66;">.</span>wp_options <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">OPTIMIZE</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">STATUS</span>   <span style="color: #66cc66;">|</span> OK       <span style="color: #66cc66;">|</span></pre></td></tr><tr><td class="even_lines"><pre><span style="color: #66cc66;">+</span><span style="color: #808080; font-style: italic;">-----------------------+----------+----------+----------+</span></pre></td></tr><tr><td class="odd_lines"><pre><span style="color: #cc66cc;">1</span> row <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #993333; font-weight: bold;">SET</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.02</span> sec<span style="color: #66cc66;">&#41;</span></pre></td></tr><tr><td class="even_lines"><pre>mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">OPTIMIZE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> wp_posts;</pre></td></tr><tr><td class="odd_lines"><pre>mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">OPTIMIZE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> wp_comments;</pre></pre></td></tr></table></div>
<p>Which tables to optimize? You can check this with SHOW TABLE STATUS; the data_free column will tell you how much space is allocated and not used by the table. With a lot of inserts, updates and deletes these numbers can grow and you want to avoid that. Depending on the traffic you will need to run optimize once a week or once a month.</p>
<p><em>Take care of proper caching of your static files</em></p>
<p>Your blog is more or less dynamic, but there are certain parts of your blog that are static and browsers can cache them. Images and theme files are two things that you can cache properly, even WordPress itself could be cached, but we mostly took care about them with Super Cache. Once I write a blog post, add images to it and publish it, I rarely change images that were attached to the post. That is why we can safely say that all the uploaded images can be cached for at least a year. Add the following lines to the <em>.htaccess</em> file in <em>/wp-content/uploads</em> directory:</p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="bash" style="font-family:monospace;">ExpiresActive On</pre></td></tr><tr><td class="odd_lines"><pre>ExpiresDefault <span style="color: #ff0000;">&quot;access plus 1 minutes&quot;</span></pre></td></tr><tr><td class="even_lines"><pre>ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>gif <span style="color: #ff0000;">&quot;access plus 1 years&quot;</span></pre></td></tr><tr><td class="odd_lines"><pre>ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>png <span style="color: #ff0000;">&quot;access plus 1 yearss&quot;</span></pre></td></tr><tr><td class="even_lines"><pre>ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>jpeg <span style="color: #ff0000;">&quot;access plus 1 years&quot;</span></pre></td></tr><tr><td class="odd_lines"><pre>ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>jpg <span style="color: #ff0000;">&quot;access plus 1 years&quot;</span></pre></pre></td></tr></table></div>
<p>Now you set the expiration date to one year in the future for all the images. If you decide to change an image inside the post just keep in mind that you will have to rename it, otherwise clients will not show the new image, but the old one that they still have it in the cache. Unless the client is specifically told to reload the page. For Firefox this is performed by holding shift key while clicking on the reload button.</p>
<p><strong>Using lightweight web servers</strong></p>
<p>You could use lighttpd and php fast cgi binary to render WordPress, this is an alternative solution but it needs more detailed description. Lighttpd is a replacement for Apache 2 web server. It is small and fast, but it lacks support for certain fetaures. WordPress can run with lighttpd, but you will need to deal with different URL rewriting rules that need to be fixed for SEO friendly permalinks and for Super Cache to work. This can be done, but it will be the subject of another post.</p>
<p><strong>Client side optimization</strong></p>
<p>We pretty much dealt with the server side and not much more can be done there. We can still do some optimization for the clients. Web page rendering is a process that is quite complex and web page developers can (and should) help clients with rendering. A very good tool for benchmarking load time and render time of your web page is Firebug add-on for Firefox. Combine it with Google&#8217;s Page Speed add-on and you have everything you need to help you with optimizations.</p>
<p><em>Optimize your images</em></p>
<p>Try to avoid HTML or CSS resizing of images. Bigger images will need more time to download and then browser will have to resize them. Much easier is to resize them first with some resizing and optimizing tool. You will also get better results and better quality.</p>
<p><em>Avoid third-party service providers</em></p>
<p>WordPress can be extended by a number of plugins, add-ons, themes and various other hacks. The problem with third-party service providers is that their services usually come with some cost. Clients will have to contact their servers and download their content which might not be as optimized as your web site is. This also means that the clients will have to perform at least one extra DNS lookup which takes some time and will need more requests to fetch all the content.</p>
<p><em>No complicated CSS</em></p>
<p>CSS rules are very inefficient sometimes so try to avoid too much nesting and don&#8217;t use eval in CSS. Avoid things like this:</p>
<p><span style="color: #ff0000;">Wrong:</span></p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#mylist</span> ul li ul li <span style="color: #00AA00;">&#123;</span></pre></td></tr><tr><td class="odd_lines"><pre>  <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="even_lines"><pre><span style="color: #00AA00;">&#125;</span></pre></pre></td></tr></table></div>
<p><span style="color: #00ff00;">Right:</span></p>
<div class="wp_syntax"><table><tr><td class="even_lines"><pre><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.inner-list</span> <span style="color: #00AA00;">&#123;</span></pre></td></tr><tr><td class="odd_lines"><pre>  <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="even_lines"><pre><span style="color: #00AA00;">&#125;</span></pre></td></tr><tr><td class="odd_lines"><pre>&nbsp;</pre></td></tr><tr><td class="even_lines"><pre><span style="color: #6666ff;">.outer-list</span> <span style="color: #00AA00;">&#123;</span></pre></td></tr><tr><td class="odd_lines"><pre>  <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span></pre></td></tr><tr><td class="even_lines"><pre><span style="color: #00AA00;">&#125;</span></pre></pre></td></tr></table></div>
<p>Use class selectors, they will make CSS a little bit longer, but client will render it much faster. If you minify it, the difference will be just a few bytes. Unfortunately you are limited with WordPress here. Writing efficient CSS for auto generated sidebar widgets is a pain since HTML returned by WordPress isn&#8217;t something they should be proud of. However, it is somewhat manageable.</p>
<p>Also make sure that you don&#8217;t have any leftover CSS rules in your file and you are not using it. Note that Page Speed will tell you that you have a lot of unused CSS, but keep in mind that not all of the CSS is used on the first page or on the other pages in your blog. Splitting this code in separate files is an idea that we didn&#8217;t try yet.</p>
<p><strong>Speed, this is what you need</strong></p>
<p>Load time for an average blog, with a decent internet connection<sup><a href="http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/#footnote_3_3518" id="identifier_3_3518" class="footnote-link footnote-identifier-link" title="And  hardware that wasn&amp;#8217;t assembled by Moses">4</a></sup>, should not be much more than a second or two. When there is no other traffic on the site. This should be a general guideline. When you start picking up traffic your server should be able to scale and if you are lucky enough the first bottleneck will be your network and that is good enough to shift the blame to your ISP, right? ;)</p>
<p>Next stage would be offloading static content to a third-party provider or a different server that you have dedicated for serving static content. Replacing Apache2 with lighttpd web server could also be a next step then in the end we will have to separate web server and database server. We will describe all this in one of the future posts here.</p>
<ol class="footnotes"><li id="footnote_0_3518" class="footnote">Author of this text firmly believes that PHP should rename itself to LOL, reasons will be provided at some other time</li><li id="footnote_1_3518" class="footnote">Using Zemanta loader in the blog footer.</li><li id="footnote_2_3518" class="footnote">Here at TWM we still can&#8217;t decide if we want to keep this plugin or not.</li><li id="footnote_3_3518" class="footnote">And  hardware that wasn&#8217;t assembled by Moses</li></ol>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/software/wordpress-plugins-you-need-to-survive/' rel='bookmark' title='Permanent Link: WordPress plugins you need to survive'>WordPress plugins you need to survive</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/zemanta-plugin-and-wordpress-27/' rel='bookmark' title='Permanent Link: Zemanta plugin and WordPress 2.7'>Zemanta plugin and WordPress 2.7</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/software/wordpress-3-0-whats-new/' rel='bookmark' title='Permanent Link: WordPress 3.0 &#8211; What&#8217;s new'>WordPress 3.0 &#8211; What&#8217;s new</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/optimizing-wordpress-tips-for-speed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Eclipse runs &#8220;File Search&#8221; when pressing AltGr+G</title>
		<link>http://www.twm-kd.com/computers/software/eclipse-runs-file-search-when-pressing-altgrg/</link>
		<comments>http://www.twm-kd.com/computers/software/eclipse-runs-file-search-when-pressing-altgrg/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 09:38:52 +0000</pubDate>
		<dc:creator>RRunner</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[AltGr+G]]></category>
		<category><![CDATA[CTRL+Alt+G]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Keyboard shortcut]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://www.twm-kd.com/?p=3426</guid>
		<description><![CDATA[Eclipse has many problems. Some are created by users and some by Eclipse developers. If you are troubles by strange key mappings than this post can solve your problems.
Related posts:<ol><li><a href='http://www.twm-kd.com/computers/eclipse-galileo-and-svn-support/' rel='bookmark' title='Permanent Link: Eclipse Galileo and SVN support'>Eclipse Galileo and SVN support</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/eclipse-code-assist-code-completion-content-assist-hang-up/' rel='bookmark' title='Permanent Link: Eclipse Code Assist / Code Completion / Content Assist hang-up'>Eclipse Code Assist / Code Completion / Content Assist hang-up</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/programming-computers/xmlbeans-scomp-fails-with-java-io-ioexception-createprocess-error2-the-system-cannot-find-the-file-specified/' rel='bookmark' title='Permanent Link: XMLbeans scomp fails with &#8220;java.io.IOException: CreateProcess error=2, The system cannot find the file specified&#8221;'>XMLbeans scomp fails with &#8220;java.io.IOException: CreateProcess error=2, The system cannot find the file specified&#8221;</a> <small>...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 310px;">
<dt class="wp-caption-dt"><a href="http://commons.wikipedia.org/wiki/Image:KB_Slovene.svg"><img title="Croatian and Slovenian keyboard layout" src="http://static.twm-kd.com/twm-uploads/300px-KB_Slovene.svg_.png" alt="Croatian and Slovenian keyboard layout" width="300" height="100" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://commons.wikipedia.org/wiki/Image:KB_Slovene.svg">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>Did you ever have any problems with <a class="zem_slink" title="Eclipse (software)" rel="homepage" href="http://www.eclipse.org/">Eclipse</a>? With initial versions of Galileo<sup><a href="http://www.twm-kd.com/computers/software/eclipse-runs-file-search-when-pressing-altgrg/#footnote_0_3426" id="identifier_0_3426" class="footnote-link footnote-identifier-link" title="should be corrected in 3.5">1</a></sup> and in previously released Gynamed there was a problem with preassigned keyboard shortcuts on some locale&#8217;s<sup><a href="http://www.twm-kd.com/computers/software/eclipse-runs-file-search-when-pressing-altgrg/#footnote_1_3426" id="identifier_1_3426" class="footnote-link footnote-identifier-link" title="Slovenian and Hungarian, if my memory serves me">2</a></sup>. The problem that Eclipse created when using Slovene keyboard layout was that while programmer wanted to type the <em>]</em> key, Eclipse run File Search action.</p>
<p>Slovenian users are not to blame that their keyboard has <em>]</em> key mapped to AltGr+G key combination. And Eclipse developers could browse through <a href="http://en.wikipedia.org/wiki/Keyboard_layout">Wikipedia </a>to discover what obscure keyboard layouts exist.</p>
<p>Any competent programmer will notice that with the default key mapping Eclipse guards programmers from using too many arrays since typically array is marked with <em>[]</em> key combination. They are advancing object oriented design and programming. But in some cases arrays actually make your code faster and optimize memory usage and fragmentation.</p>
<p>To discover how to remedy the problem read on.<span id="more-3426"></span></p>
<p>Fortunately Eclipse has built in keyboard mapping manager. Until Eclipse developers don not remove the mapping or replace it with something more appropriate you can do the following:</p>
<ol>
<li>Open <em>Window-&gt;Preferences-&gt;General-&gt;Keys</em></li>
<li>Sort table by <em>Binding</em> and find the one that is bothering you<sup><a href="http://www.twm-kd.com/computers/software/eclipse-runs-file-search-when-pressing-altgrg/#footnote_2_3426" id="identifier_2_3426" class="footnote-link footnote-identifier-link" title="In my case CTRL+ALT+G">3</a></sup>. Unbind all commands that are bind to the combination. If you don&#8217;t know which combination you should be searching for use <em>Binding</em> text box and type in the key that is bothering you.</li>
</ol>
<p>There you have it problem is solved. File search gone by removing the CTRL+ALT+G or AltGr+G key combination from Eclipse key mapping. If you can not live without the combination you could replace it with something more appropriate.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=90f21331-b0ab-4d92-9d9b-fb247b3c94c8" alt="" /><span class="zem-script pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<ol class="footnotes"><li id="footnote_0_3426" class="footnote">should be corrected in 3.5</li><li id="footnote_1_3426" class="footnote">Slovenian and Hungarian, if my memory serves me</li><li id="footnote_2_3426" class="footnote">In my case <em>CTRL+ALT+G</em></li></ol>
<p>Related posts:<ol><li><a href='http://www.twm-kd.com/computers/eclipse-galileo-and-svn-support/' rel='bookmark' title='Permanent Link: Eclipse Galileo and SVN support'>Eclipse Galileo and SVN support</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/eclipse-code-assist-code-completion-content-assist-hang-up/' rel='bookmark' title='Permanent Link: Eclipse Code Assist / Code Completion / Content Assist hang-up'>Eclipse Code Assist / Code Completion / Content Assist hang-up</a> <small>...</small></li>
<li><a href='http://www.twm-kd.com/computers/programming-computers/xmlbeans-scomp-fails-with-java-io-ioexception-createprocess-error2-the-system-cannot-find-the-file-specified/' rel='bookmark' title='Permanent Link: XMLbeans scomp fails with &#8220;java.io.IOException: CreateProcess error=2, The system cannot find the file specified&#8221;'>XMLbeans scomp fails with &#8220;java.io.IOException: CreateProcess error=2, The system cannot find the file specified&#8221;</a> <small>...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.twm-kd.com/computers/software/eclipse-runs-file-search-when-pressing-altgrg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
