<?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>dragffy.com &#187; Linux</title>
	<atom:link href="http://dragffy.com/blog/posts/category/operating-system/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://dragffy.com/blog</link>
	<description>The development, documentation, and blogging domain of Gabriel Dragffy.</description>
	<lastBuildDate>Wed, 27 Jan 2010 14:23:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Effectively repair MySQL Tables</title>
		<link>http://dragffy.com/blog/posts/effectively-repair-mysql-tables</link>
		<comments>http://dragffy.com/blog/posts/effectively-repair-mysql-tables#comments</comments>
		<pubDate>Wed, 27 Jan 2010 14:23:44 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=148</guid>
		<description><![CDATA[$ cd /var/lib/mysql
find -type f -name '*.MYI' -exec myisamchk --silent --force --fast --update-state --key_buffer_size=64M --sort_buffer_size=64M --read_buffer_size=1M --write_buffer_size=1M {} \;
]]></description>
			<content:encoded><![CDATA[<p><code>$ cd /var/lib/mysql</code></p>
<p><code>find -type f -name '*.MYI' -exec myisamchk --silent --force --fast --update-state --key_buffer_size=64M --sort_buffer_size=64M --read_buffer_size=1M --write_buffer_size=1M {} \;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/effectively-repair-mysql-tables/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access denied for user &#8216;debian-sys-maint&#8217;@&#039;localhost&#8217; (using password: YES)</title>
		<link>http://dragffy.com/blog/posts/access-denied-for-user-debian-sys-maintlocalhost-using-password-yes</link>
		<comments>http://dragffy.com/blog/posts/access-denied-for-user-debian-sys-maintlocalhost-using-password-yes#comments</comments>
		<pubDate>Tue, 26 Jan 2010 09:26:59 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=146</guid>
		<description><![CDATA[Find your debian-sys-maint password in /etc/mysql/debian.cnf.
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '
' WITH GRANT OPTION;
Replace 
 with your debian-sys-maint password.
]]></description>
			<content:encoded><![CDATA[<p>Find your debian-sys-maint password in <code>/etc/mysql/debian.cnf.</p>
<p></code><code>GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '
<password>' WITH GRANT OPTION;</password></code></p>
<p>Replace <code>
<password></password></code> with your debian-sys-maint password.</p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/access-denied-for-user-debian-sys-maintlocalhost-using-password-yes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clicking on a GVFS link opens in Firefox</title>
		<link>http://dragffy.com/blog/posts/clicking-on-a-gvfs-link-opens-in-firefox</link>
		<comments>http://dragffy.com/blog/posts/clicking-on-a-gvfs-link-opens-in-firefox#comments</comments>
		<pubDate>Thu, 22 Oct 2009 16:52:30 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=140</guid>
		<description><![CDATA[For some reason servers that I connected to using FTP  with gnome-vfs would open in Firefox. Odd really.
I fiddled about and eventually developed a filesystem level fix. Just go to  the folder:
~/.gconf/desktop/gnome/url-handlers
And delete the ftp folder!
]]></description>
			<content:encoded><![CDATA[<p>For some reason servers that I connected to using FTP  with gnome-vfs would open in Firefox. Odd really.</p>
<p>I fiddled about and eventually developed a filesystem level fix. Just go to  the folder:<br />
<code>~/.gconf/desktop/gnome/url-handlers</code><br />
And delete the <code>ftp</code> folder!</p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/clicking-on-a-gvfs-link-opens-in-firefox/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VirtualBox 3 Transparent Background on Ubuntu Jaunty</title>
		<link>http://dragffy.com/blog/posts/virtualbox-3-transparent-background-on-ubuntu-jaunty</link>
		<comments>http://dragffy.com/blog/posts/virtualbox-3-transparent-background-on-ubuntu-jaunty#comments</comments>
		<pubDate>Tue, 30 Jun 2009 15:53:28 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=132</guid>
		<description><![CDATA[I upgraded to VirtualBox 3 and then my windows guest went wrong.
First of all, you have make sure the latest version of compiz installed. 
Go to CompizConfigs Settings Manager and look for &#8220;Windows Rules&#8221; under Windows Management category. Enable &#8220;Windows Rules&#8221; and go to &#8220;No ARGB visuals&#8221; use Window Class, click Grab and then click [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded to VirtualBox 3 and then my windows guest went wrong.</p>
<p>First of all, you have make sure the latest version of compiz installed. </p>
<p>Go to CompizConfigs Settings Manager and look for &#8220;Windows Rules&#8221; under Windows Management category. Enable &#8220;Windows Rules&#8221; and go to &#8220;No ARGB visuals&#8221; use Window Class, click Grab and then click in virtualbox window.</p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/virtualbox-3-transparent-background-on-ubuntu-jaunty/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using APG to generate secure, pronuncable passwords.</title>
		<link>http://dragffy.com/blog/posts/using-apg-to-generate-secure-pronuncable-passwords</link>
		<comments>http://dragffy.com/blog/posts/using-apg-to-generate-secure-pronuncable-passwords#comments</comments>
		<pubDate>Fri, 12 Jun 2009 15:28:20 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=130</guid>
		<description><![CDATA[The following command will generate several passwords with the following properties:

Length of 10 characters
Contain a mixture of upper and lowercase characters
Contain at least 1 number
Completely random most likely not in the dictionary (expect by random luck)
Pronounceable

This makes these passwords easier to remember but very difficult to brute force. They are ideal as passwords for logging [...]]]></description>
			<content:encoded><![CDATA[<p>The following command will generate several passwords with the following properties:</p>
<ul>
<li>Length of 10 characters</li>
<li>Contain a mixture of upper and lowercase characters</li>
<li>Contain at least 1 number</li>
<li>Completely random most likely not in the dictionary (expect by random luck)</li>
<li>Pronounceable</li>
</ul>
<p>This makes these passwords easier to remember but very difficult to brute force. They are ideal as passwords for logging in to machines, servers, routers, etc.</p>
<p><code><br />
$ apg -m 10 -x 10 -a 0 -M NCL -t<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/using-apg-to-generate-secure-pronuncable-passwords/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SSHFS with Bazaar (Bzr) or Git</title>
		<link>http://dragffy.com/blog/posts/using-sshfs-with-bazaar-bzr-or-git</link>
		<comments>http://dragffy.com/blog/posts/using-sshfs-with-bazaar-bzr-or-git#comments</comments>
		<pubDate>Thu, 04 Jun 2009 11:00:36 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Revision Control]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=128</guid>
		<description><![CDATA[I use SSHFS to mount remote drives locally. The remote computers don&#8217;t have Bzr installed, and it&#8217;s difficult to get them up to date enough to install the latest Bzr. Therefore, I execute Bzr on my local computer on the mounted filesystem. Using default mount options for SSHFS leads to errors in both Git and [...]]]></description>
			<content:encoded><![CDATA[<p>I use SSHFS to mount remote drives locally. The remote computers don&#8217;t have Bzr installed, and it&#8217;s difficult to get them up to date enough to install the latest Bzr. Therefore, I execute Bzr on my local computer on the mounted filesystem. Using default mount options for SSHFS leads to errors in both Git and Bzr, this is because (I believe) SSHFS doesn&#8217;t directly support file renaming. It is possible to avoid these problems by using the <code>-oworkaround=rename</code> switch with the mount command.</p>
<p>As an example my mount command looks similar to this:<br />
<code>sshfs -oworkaround=rename user@computer1:/var/www /media/computer1</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/using-sshfs-with-bazaar-bzr-or-git/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Virtual Hosts on OS X Leopard</title>
		<link>http://dragffy.com/blog/posts/apache-virtual-hosts-on-os-x-leopard</link>
		<comments>http://dragffy.com/blog/posts/apache-virtual-hosts-on-os-x-leopard#comments</comments>
		<pubDate>Sun, 31 May 2009 13:42:49 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=124</guid>
		<description><![CDATA[If you develop multiple sites and you need virtual hosting functionality, scroll down to the end of the /private/etc/apache2/httpd.conf file and uncomment the following:
# Include /private/etc/apache2/extra/httpd-vhosts.conf
Next, you’ll need to setup whatever virtual hosts you have in the virtual hosts file /private/etc/apache2/extra/httpd-vhosts.conf
You need to make an entry in the httpd-vhosts.conf file like so:

&#60;virtualhost *:80&#62;
   [...]]]></description>
			<content:encoded><![CDATA[<p>If you develop multiple sites and you need virtual hosting functionality, scroll down to the end of the <code>/private/etc/apache2/httpd.conf</code> file and uncomment the following:</p>
<p><code># Include /private/etc/apache2/extra/httpd-vhosts.conf</code></p>
<p>Next, you’ll need to setup whatever virtual hosts you have in the virtual hosts file <code>/private/etc/apache2/extra/httpd-vhosts.conf</code></p>
<p>You need to make an entry in the httpd-vhosts.conf file like so:</p>
<pre>
&lt;virtualhost *:80&gt;
   ServerName beta-site-1.com
   ServerAlias www.beta-site-1.com
   ServerAdmin webmaster@beta-site-1.com
   ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
   CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common

   DocumentRoot "/Library/WebServer/beta-site-1"
   ScriptAlias /cgi-bin/ "/Library/WebServer/beta-site-1/cgi-bin"
   <directory "/Library/WebServer/beta-site-1">
     Options FollowSymLinks MultiViews Includes
     AllowOverride All
     Order allow,deny
     Allow from all
   </directory>
&lt;/virtualhost&gt;
</pre>
<p>The examples provided by Apple  in the vhosts file are slightly incorrect and if you use the CustomLog lines as is you will get errors the following errors if you run: <code>apachectl -t -D DUMP_VHOSTS</code>:<br />
<code>Syntax error on line 40 of /private/etc/apache2/extra/httpd-vhosts.conf:<br />
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)</code></p>
<p>This is because<br />
<code>CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log common</code></p>
<p>Should actually read:<br />
<code>CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/apache-virtual-hosts-on-os-x-leopard/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting Java plugin to work in FireFox 3 on Ubuntu 9.04 Jaunty Jackalope</title>
		<link>http://dragffy.com/blog/posts/getting-java-plugin-to-work-in-firefox-3-on-ubuntu-904-jaunty-jackalope</link>
		<comments>http://dragffy.com/blog/posts/getting-java-plugin-to-work-in-firefox-3-on-ubuntu-904-jaunty-jackalope#comments</comments>
		<pubDate>Wed, 27 May 2009 16:25:53 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=114</guid>
		<description><![CDATA[Ensure that you have the package sun-java6-jre installed and then run the following command from a terminal:
sudo ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so  /usr/lib/firefox-3.0.10/plugins/
You will need to restart FireFox after this and Java should be working for FireFox now.
]]></description>
			<content:encoded><![CDATA[<p>Ensure that you have the package <code>sun-java6-jre</code> installed and then run the following command from a terminal:<br />
<code>sudo ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so  /usr/lib/firefox-3.0.10/plugins/</code></p>
<p>You will need to restart FireFox after this and Java should be working for FireFox now.</p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/getting-java-plugin-to-work-in-firefox-3-on-ubuntu-904-jaunty-jackalope/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.04 Jaunty Jackalope Gnome Session Problems</title>
		<link>http://dragffy.com/blog/posts/ubuntu-904-jaunty-jackalope-gnome-session-problems</link>
		<comments>http://dragffy.com/blog/posts/ubuntu-904-jaunty-jackalope-gnome-session-problems#comments</comments>
		<pubDate>Wed, 27 May 2009 15:09:46 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=112</guid>
		<description><![CDATA[A few weeks back I tried out the Gnome sessions. Gnome should automatically restore the programs you were last using when you log back in. However, it did not work well at all and I turned it off. This is when the problem began &#8211; everytime I logged back a whole bunch of the same [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks back I tried out the Gnome sessions. Gnome should automatically restore the programs you were last using when you log back in. However, it did not work well at all and I turned it off. This is when the problem began &#8211; everytime I logged back a whole bunch of the same applications automatically launched causing all sorts of mischief. No matter what I tried I could not get Gnome to turn sessions off again.</p>
<p>In the beginning I clicked on System -> Preferences -> Startup Applications and then selected the Options tab. Here, you may check a box labelled &#8220;Automatically remember running applications when logging out&#8221;. This will activate Gnome sessions. In my case, however, deselecting this did not turn Gnome sessions off.</p>
<p>After much hunting around, with no help from the Internet, I finally found the files that needed deleting to stop Gnome launching various apps at startup. You need to open your home folder in Nautilus and press CTRL+H &#8211; this lets you view hidden files and folders (hidden files/folders begin with a dot &#8220;.&#8221;). Navigate the following path <code>.config/gnome-session/saved-session</code> and delete all the files there. You can move them to the trash can for safety. Having done this, the next time you login you should just get a blank desktop.</p>
<p>I&#8217;ve taken the time to write this in the hope that anyone else suffering from the same bug can solve it more quickly than I. This should be reported as a bug on launchpad.net if it isn&#8217;t already there.</p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/ubuntu-904-jaunty-jackalope-gnome-session-problems/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An alternative img() helper function for CodeIgniter</title>
		<link>http://dragffy.com/blog/posts/an-alternative-img-helper-function-for-codeigniter</link>
		<comments>http://dragffy.com/blog/posts/an-alternative-img-helper-function-for-codeigniter#comments</comments>
		<pubDate>Wed, 20 May 2009 09:59:47 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=103</guid>
		<description><![CDATA[It is my opinion that CodeIgniter&#8217;s default img() function that comes in the HTML Helper could have been easier to use. As it is if you want to give your image a name css class you have to define an array consisting of these attributes. 
That takes up space and makes the code less readable [...]]]></description>
			<content:encoded><![CDATA[<p>It is my opinion that CodeIgniter&#8217;s default img() function that comes in the HTML Helper could have been easier to use. As it is if you want to give your image a name css class you have to define an array consisting of these attributes. </p>
<p>That takes up space and makes the code less readable for non-PHP programmers. Since I work closely with a web designer who is good with HTML but gets lost in PHP I want to leverage the pragmatic power of PHP to automate repetitive tasks (like typing out an entire HTML image tag), but at the same time the result needs to be obvious to a non-programmer but also shorter than the HTML equivalent. I feel the img() helper in CodeIgniter falls short of both these requirements.</p>
<p>CodeIgniter&#8217;s img() helper also takes a second parameter, a boolean, this decides whether the index.php file is included in the image path, good if you are using a media controller. For 99.9% of my sites I don&#8217;t need these. Therefore I wrote my own helper.</p>
<p>The file is called <code>MY_html_helper.php</code> and lives inside the folder <code>system/application/helpers</code>. As with other extensions to the CI core the prefix <code>MY_</code> is determined in your config file, so change <code>MY_</code> to whatever it should be. Add the following code to the file:</p>
<pre>
&lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');

function img($imgName, $attrs=FALSE)
{
	$CI =&amp; get_instance();

	if (strpos($imgName, 'http') === 0) return;

	$imgPath = $CI-&gt;config-&gt;item('base_url');

	if ( ! $imgDir = $CI-&gt;config-&gt;item('image_dir')) $imgDir = 'assets/images/';

	$img = $imgPath.$imgDir.$imgName;

	$str = '&lt;img src=&quot;'.$img.'&quot; ';

	if ($attrs) $str .= $attrs.&quot; &quot;;

	$str .= &quot;/&gt;&quot;;

	return $str;
}
</pre>
<p>All you have to make sure you do is load the html helper: <code>$this->load->helper('html');</code> in your controller,<br />
or put it in the array of helpers in <code>system/application/config/autoload.php</code>.</p>
<p>The helper assumes images live in the folder <code>assets/images</code> which lives alongside the <code>system</code> folder. If this is not where you put your images then you can specify an alternative directory in your config.php file. Simply add a line that looks like this to config.php: <code>$config['image_dir'] = 'alternative/path/images/';</code>. Don&#8217;t forget the trailing slash at the end. This <code>alternative</code> folder would live at the very top level of your application, alongside <code>index.php</code>.</p>
<p>Using the helper is easy and straightforward: <code>&lt;?=img('example.gif')?&gt;</code></p>
<p>Will produce <code>&lt;img src=&quot;http://mysite.com/assets/images/example.gif&quot; /&gt;</code>.</p>
<p>Any additional attributes you want in the html tag can be written as per usual as the second parameter. For example if you want to give the image an alt attribute and class:<br />
<code>&lt;?=img('example.gif', 'class=&quot;myclass&quot; alt=&quot;Example Image&quot;')?&gt;</code></p>
<p>Will produce:</p>
<pre>&lt;img src=&quot;http://mysite.com/assets/images/example.gif&quot; class=&quot;myclass&quot; alt=&quot;Example Image&quot; /&gt;</pre>
<p>The only hard part about this is making sure you get the single and double quotes correct in the second parameter.</p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/an-alternative-img-helper-function-for-codeigniter/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
