<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Cretaceous Labs</title>
	
	<link>http://cretaceouslabs.com/blog</link>
	<description />
	<lastBuildDate>Sun, 10 Oct 2010 20:02:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CretaceousLabsBlog" /><feedburner:info uri="cretaceouslabsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Rails 3 console and “no such file to load”</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/x3k2FzlEsiA/</link>
		<comments>http://cretaceouslabs.com/blog/2010/10/rails-3-console-file-load/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 20:02:50 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=227</guid>
		<description><![CDATA[If you happen to load gems in your ~/.irbrc , make sure to add a gem dependency on them in your Rails apps&#8217; Gemfile.
For example, I just started using Awesome Print in IRB. However, when I ran rails console , this error occurred:
no such file to load -- ap
After searching Google, I learned that Awesome [...]]]></description>
			<content:encoded><![CDATA[<p>If you happen to load gems in your <em>~/.irbrc</em> , make sure to add a gem dependency on them in your Rails apps&#8217; <em>Gemfile</em>.</p>
<p>For example, I just started using <a title="Awesome Print Ruby Gem" href="https://rubygems.org/gems/awesome_print">Awesome Print</a> in IRB. However, when I ran <em>rails console</em> , this error occurred:</p>
<pre>no such file to load -- ap</pre>
<p>After searching Google, I learned that <a title="Awesome Print Ruby Gem" href="https://rubygems.org/gems/awesome_print">Awesome Print</a> needs to be listed in my <em>Gemfile</em> . Easy enough:</p>
<pre>## ~/.irbrc
require 'rubygems'
require 'ap'

## ~/src/rails_3_app/Gemfile
group :development do
  gem 'awesome_print'
end</pre>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/x3k2FzlEsiA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/10/rails-3-console-file-load/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2010/10/rails-3-console-file-load/</feedburner:origLink></item>
		<item>
		<title>PostgreSQL grants on all tables</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/prOF3wED77c/</link>
		<comments>http://cretaceouslabs.com/blog/2010/09/postgresql-grants-tables/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 15:39:09 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=216</guid>
		<description><![CDATA[As much as I love PostgreSQL, its system of managing user privileges is a pain in the ass. PostgreSQL has no equivalent to MySQL&#8217;s method of granting a privilege on all of the tables in a database, including tables that you create in the future.
In MySQL, it&#8217;s as easy as:
GRANT SELECT ON db_name.* TO user@hostname;
The [...]]]></description>
			<content:encoded><![CDATA[<p>As much as I love PostgreSQL, its system of managing user privileges is a pain in the ass. PostgreSQL has no equivalent to MySQL&#8217;s method of granting a privilege on all of the tables in a database, including tables that you create in the future.</p>
<p>In MySQL, it&#8217;s as easy as:</p>
<pre>GRANT SELECT ON db_name.* TO user@hostname;</pre>
<p>The best that I&#8217;ve been able to achieve with PostgreSQL is this abomination:</p>
<pre>$ cat generate_grants.txt
SELECT 'grant select on '||schemaname||'.'||tablename||' to user_name;'
FROM pg_tables
WHERE schemaname IN ('public')
ORDER BY schemaname, tablename;
$
$ cat generate_grants.txt | psql -U nickh -W -d database \|
grep '^ grant' &gt;grants.txt
$
$ head -2 grants.txt
 grant select on public.table1 to user_name;
 grant select on public.table2 to user_name;
$
$ cat grants.txt | psql -U nickh -W -d database</pre>
<p>*shudder*</p>
<p>Thanks to <a title="Ben Williams' blog post" href="http://bensbrain.blogspot.com/2004/08/postgres-grant-on-all-tables-in.html">Ben Williams&#8217; blog post</a> for the initial query to generate the GRANT statements.</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/prOF3wED77c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/09/postgresql-grants-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2010/09/postgresql-grants-tables/</feedburner:origLink></item>
		<item>
		<title>Deploy a specific revision with Capistrano</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/0xJUWNijoOM/</link>
		<comments>http://cretaceouslabs.com/blog/2010/08/deploy-specific-revision-capistrano/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 19:50:49 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Capistrano]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=195</guid>
		<description><![CDATA[Just about every website that I release, be it at work or at home, is stored in a Git repository, and deployed using Capistrano.
I&#8217;ve been debugging this PHP application at work that was written by a 3rd-party. After cleaning up the XSS and SQL injection vulnerabilities in it, we found a new bug. It&#8217;s minor, [...]]]></description>
			<content:encoded><![CDATA[<p>Just about every website that I release, be it at work or at home, is stored in a <a title="Git" href="http://git-scm.com/">Git</a> repository, and deployed using <a title="Capistrano" href="http://capify.org/">Capistrano</a>.</p>
<p>I&#8217;ve been debugging this PHP application at work that was written by a 3rd-party. After cleaning up the XSS and SQL injection vulnerabilities in it, we found a new bug. It&#8217;s minor, yet important.</p>
<p>While tracking down the offending line, I needed to deploy various revisions of the website. It turns out that it&#8217;s really easy to do this with <a title="Capistrano" href="http://capify.org/">Capistrano</a>:</p>
<pre>$ cap -S revision=3f30b6de3c55a8347e5f3de3b43193591e6c7322 beta deploy</pre>
<p>One thing I noticed was the need to provide the full SHA-1 object name (AKA revision ID, commit ID). Normally with Git, you can provide the first few characters of a commit ID. For example:</p>
<pre>$ git checkout 3f30b6de</pre>
<p>instead of</p>
<pre>$ git checkout 3f30b6de3c55a8347e5f3de3b43193591e6c7322</pre>
<p>I guess Capistrano&#8217;s a bit more picky!</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/0xJUWNijoOM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/08/deploy-specific-revision-capistrano/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2010/08/deploy-specific-revision-capistrano/</feedburner:origLink></item>
		<item>
		<title>Answers are for losers</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/d8H7Cnj04Zg/</link>
		<comments>http://cretaceouslabs.com/blog/2010/04/answers-losers/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 15:10:44 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=156</guid>
		<description><![CDATA[What do you want: questions, or answers? Most people want answers. There&#8217;s a problem you need to solve, and the answer&#8217;ll let you continue working. That&#8217;s fine. That&#8217;s valid.
But is it interesting?
I was talking with @ghuber about a new idea I had. Without going into details, it&#8217;d pigeon-hole me into That Answer Guy.
How do you [...]]]></description>
			<content:encoded><![CDATA[<p>What do you want: questions, or answers? Most people want answers. There&#8217;s a problem you need to solve, and the answer&#8217;ll let you continue working. That&#8217;s fine. That&#8217;s valid.</p>
<p>But is it interesting?</p>
<p>I was talking with <a title="@ghuber on Twitter" href="http://twitter.com/ghuber">@ghuber</a> about a new idea I had. Without going into details, it&#8217;d pigeon-hole me into That Answer Guy.</p>
<blockquote><p>How do you solve X? Here you go! The answer&#8217;s ABC.</p></blockquote>
<p style="text-align: left;">BOR-fucking-ING. If you&#8217;re That Answer Guy, you&#8217;re giving away valuable resources, but not actively facilitating much further discussion or innovation. Your community&#8217;ll appreciate the answer. Kudos to you. Thanks, Teach!<img class="aligncenter size-full wp-image-175" style="border: 0" title="The Answer Man movie poster" src="http://cretaceouslabs.com/blog/wp-content/uploads/2010/03/The_Answer_Man_movie_poster1.png" alt="The Answer Man movie poster" width="250" height="316" /></p>
<p>But it doesn&#8217;t make you <em>interesting</em>.</p>
<p>Instead, you want to ask questions. Lots of questions. Oddball questions. Edge-case questions. What happens if I turn this to 11? What if I mix <a title="monorail cat" href="http://icanhascheezburger.com/2007/01/12/monorail-cat-2/">lolcats</a> with quantum theory?</p>
<p>Think of it this way: Who do you want <a title="Giles' presentation at FutureRuby" href="http://gilesbowkett.blogspot.com/2008/10/archaeopteryx-rubyfringe-presentation.html">presenting</a> at a <a title="FutureRuby" href="http://futureruby.com/">conference</a>? Who do you want to shoot the shit with over a beer? Who thinks of wacky stuff? The guy who knows how to do X when you have Y, or the guy who asks interesting questions and ponders new ways of doing things?</p>
<p>The latter, damn it!</p>
<p>That Answer Guy is useful and appreciated. He definitely is. But the role&#8217;s limited. It confines you. It defines what questions you ask, and what problems you solve.</p>
<p>Ask more questions. Write more software. Pursue tangents. And talk about it.</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/d8H7Cnj04Zg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/04/answers-losers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2010/04/answers-losers/</feedburner:origLink></item>
		<item>
		<title>If Plasma dies, here’s what to do</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/v-ILeVHaRv8/</link>
		<comments>http://cretaceouslabs.com/blog/2010/01/if-plasma-dies-heres-what-to-do/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 17:45:18 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=145</guid>
		<description><![CDATA[Every now and then, the Plasma desktop in KDE 4 crashes on me. Usually, it restarts itself. Sometimes, it doesn&#8217;t.
If you&#8217;re cursed with the latter scenario, there&#8217;s an easy solution.
Note: As avocadohead kindly mentioned in the comments, KDE &#62;= 4.3 has renamed &#8220;plasma&#8221; to &#8220;plasma-desktop&#8221;. So if you&#8217;re using KDE 4.3 or later, replace &#8220;plasma&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then, the Plasma desktop in KDE 4 crashes on me. Usually, it restarts itself. Sometimes, it doesn&#8217;t.</p>
<p>If you&#8217;re cursed with the latter scenario, there&#8217;s an easy solution.</p>
<p><strong>Note</strong>: As avocadohead kindly mentioned in the comments, KDE &gt;= 4.3 has renamed &#8220;plasma&#8221; to &#8220;plasma-desktop&#8221;. So if you&#8217;re using KDE 4.3 or later, replace &#8220;plasma&#8221; with &#8220;plasma-desktop&#8221; in the commands below.</p>
<p>By default, KDE sets the keyboard shortcut for &#8220;Run Command&#8221; to ALT+F2. So hit ALT+F2, and type this, and hit enter:</p>
<pre>kbuildsycoca4 &amp;&amp; kquitapp plasma &amp;&amp; kstart plasma</pre>
<p>Plasma should pop back to life.</p>
<p>That command is actually three commands:</p>
<ol>
<li><em>kbuildsycoca4</em> rebuilds KDE&#8217;s system configuration cache.</li>
<li><em>kquitapp plasma</em> ensures that Plasma&#8217;s no longer running, instead of just, say, hung.</li>
<li><em>kstart plasma</em> starts Plasma.</li>
</ol>
<p>It took me a while to figure this out. Thanks to <a href="http://eumenidae.blogspot.com/2008/12/kill-and-restart-plasma.html">this post</a>, I learned about <em>kstart</em>. From what I&#8217;ve read, it seems that running <em>kquitapp plasma</em> and <em>kstart plasma</em> from the CLI works for some people. Unfortunately, they fail for me on the CLI:</p>
<pre>[nickh@chameleon ~] kquitapp plasma
&lt;unknown program name&gt;(7282)/: "Application plasma could not be found using service org.kde.plasma and path /MainApplication."
[nickh@chameleon ~]
[nickh@chameleon ~] kstart plasma
Qt: Session management error: Could not open network socket
kstart(7394) main: Omitting both --window and --windowclass arguments is not recommended
[nickh@chameleon ~] &lt;unknown program name&gt;(7397)/ checkComposite: Plasma has an argb visual 0x9ca7300 71303169
&lt;unknown program name&gt;(7397)/ checkComposite: Plasma can use COMPOSITE for effects on 0x9ca6c18
plasma(7398): KUniqueApplication: Cannot find the D-Bus session server

plasma(7397): KUniqueApplication: Pipe closed unexpectedly.

[nickh@chameleon ~]</pre>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/v-ILeVHaRv8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2010/01/if-plasma-dies-heres-what-to-do/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2010/01/if-plasma-dies-heres-what-to-do/</feedburner:origLink></item>
		<item>
		<title>Matching Printable Characters</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/lDeSyd2x6WA/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:10:17 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=138</guid>
		<description><![CDATA[Who doesn&#8217;t love regular expressions? They&#8217;re fucking awesome. I use&#8217;em at least 10 times per day.
Sometimes, there&#8217;re restrictions on what patterns you can use. I wanted to change a regex for validating passwords. Originally, it allowed letters, numbers, and a seemingly random collection of special characters. How lame is this?:
^[A-Za-z0-9]{1}[A-Za-z0-9_\\.\\!\@\#\-]{0,255}$
Not only are the allowed special [...]]]></description>
			<content:encoded><![CDATA[<p>Who doesn&#8217;t love regular expressions? <a href="/blog/wp-content/uploads/2009/11/dino-riders.jpg" alt="Dino-Riders: They're fucking awesome">They&#8217;re fucking awesome.</a> I use&#8217;em at least 10 times per day.</p>
<p>Sometimes, there&#8217;re restrictions on what patterns you can use. I wanted to change a regex for validating passwords. Originally, it allowed letters, numbers, and a seemingly random collection of special characters. How lame is this?:</p>
<pre>^[A-Za-z0-9]{1}[A-Za-z0-9_\\.\\!\@\#\-]{0,255}$</pre>
<p>Not only are the allowed special characters arbitrary, but they&#8217;re escaping characters in a character class, and using &#8220;{1}&#8221;.</p>
<p>I tried changing the regex to this:</p>
<pre>^[[:print:]]{0,255}$</pre>
<p>Unfortunately, that wasn&#8217;t considered &#8220;valid&#8221; by the system in question. Luckily, there&#8217;s a fairly concise alternative:</p>
<pre>^[\x20-\x7E]{0,255}$</pre>
<p>If you find a system that lacks support for POSIX character classes, check out <a href="http://en.wikipedia.org/wiki/Regular_expression#POSIX_character_classes" alt="POSIX character classes on Wikipedia">this Wikipedia article</a>.</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/lDeSyd2x6WA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/11/matching-printable-characters/</feedburner:origLink></item>
		<item>
		<title>Displaying Your ViM Colour Scheme</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/fT54xI7njSA/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/displaying-vim-colour-scheme-2/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 18:08:32 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[ViM]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=133</guid>
		<description><![CDATA[I posted this mostly because I&#8217;m always forgetting it, and also because it&#8217;s a pain in the ass to search for on Google. I usually try &#8220;:echo g:colorscheme&#8221;, which fails miserably.
If you&#8217;re playing around with colour schemes in ViM and want to figure out which one is being used at the moment, simply type:
:echo g:colors_name
]]></description>
			<content:encoded><![CDATA[<p>I posted this mostly because I&#8217;m always forgetting it, and also because it&#8217;s a pain in the ass to search for on Google. I usually try &#8220;:echo g:colorscheme&#8221;, which fails miserably.</p>
<p>If you&#8217;re playing around with colour schemes in ViM and want to figure out which one is being used at the moment, simply type:</p>
<pre>:echo g:colors_name</pre>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/fT54xI7njSA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/displaying-vim-colour-scheme-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/11/displaying-vim-colour-scheme-2/</feedburner:origLink></item>
		<item>
		<title>When Gnome and Firefox Are Dead Slow</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/yYONswdLA0M/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/gnome-firefox-dead-slow/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 22:52:29 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Xorg]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=120</guid>
		<description><![CDATA[I&#8217;ve had Ubuntu Karmic Koala installed on my MacBook Pro Core2Duo for 2-3 weeks now. Almost everything&#8217;s been working perfectly. However, whenever I&#8217;d start a second Gnome session and run Firefox, the machine would slow to a crawl, and X&#8217;s CPU usage would skyrocket..we&#8217;re talking &#62;80% here.
I scoured Google for all sorts of things:

Gnome second [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had Ubuntu Karmic Koala installed on my MacBook Pro Core2Duo for 2-3 weeks now. Almost everything&#8217;s been working perfectly. However, whenever I&#8217;d start a second Gnome session and run Firefox, the machine would slow to a crawl, and X&#8217;s CPU usage would skyrocket..we&#8217;re talking &gt;80% here.</p>
<p>I scoured Google for all sorts of things:</p>
<ul>
<li>Gnome second session is slow</li>
<li>Gnome X is slow</li>
<li>Gnome Xorg is slow</li>
<li>Gnome Firefox slow</li>
<li>X second session is slow</li>
<li>Etc.</li>
</ul>
<p>I found <a title="Ubuntu Bug: Very slow when more then one user is logged in" href="http://www.mail-archive.com/universe-bugs@lists.ubuntu.com/msg154538.html">several</a> <a title="Bug Report: Very slow when more then one user is logged in" href="https://bugs.launchpad.net/ubuntu/+source/meta-gnome2/+bug/474655">other</a> <a title="Bug report: [HD3470] second X session is slow" href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/359092">reports</a> <a title="Bug report: MASTER: no DRI on the second user session" href="https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/297322">of</a> <a title="Bug report: radeonhd, second simultaneous x session is slow" href="http://bugs.freedesktop.org/show_bug.cgi?id=18290">this</a>, but no solutions.</p>
<p>Eventually, I stumbled upon <a title="Blog post: Slow Firefox – High Xorg CPU usage – Debian and Ubuntu – SOLVED" href="http://blog.kelsin.net/2009/02/24/slow-firefox-high-xorg-cpu-usage-debian-and-ubuntu-solved/">this blog post</a>, which purports to have solved the problem. I gave it a shot, and holy shit, it worked!</p>
<p>Just to be verbose, here&#8217;s what I did:</p>
<ol>
<li>Open /etc/X11/xorg.conf .</li>
<li>Add this line to the &#8220;Device&#8221; section:
<pre>Option "AccelMethod" "XAA"</pre>
<p>So my &#8220;Device&#8221; section now looks like this:</p>
<pre>Section "Device"
  Identifier  "Configured Video Device"
  Option      "AccelMethod" "XAA"
EndSection</pre>
</li>
<li>Save the file and log-out of Gnome.</li>
<li>Switch to tty1 by hitting CTRL+ALT+F1 .</li>
<li>Restart GDM:
<pre>$ sudo /etc/init.d/gdm restart</pre>
</li>
</ol>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/yYONswdLA0M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/gnome-firefox-dead-slow/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/11/gnome-firefox-dead-slow/</feedburner:origLink></item>
		<item>
		<title>Copying Between GNU Screen buffers</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/nfHXtncCHRU/</link>
		<comments>http://cretaceouslabs.com/blog/2009/11/copying-gnu-screen-buffers/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 22:06:52 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[GNU Screen]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/?p=67</guid>
		<description><![CDATA[GNU Screen is one of those tools that makes you think &#8220;How the %&#38;@# did I live without this for so long?!&#8221; If you work on command lines regularly, GNU Screen is a must.
In my desktop environment, I run Konsole and Yakuake, with a different Screen session in each[1]. A few days ago, I noticed [...]]]></description>
			<content:encoded><![CDATA[<p>GNU Screen is one of those tools that makes you think &#8220;How the %&amp;@# did I live without this for so long?!&#8221; If you work on command lines regularly, GNU Screen is a must.</p>
<p>In my desktop environment, I run Konsole and <a href="http://en.wikipedia.org/wiki/Yakuake">Yakuake</a>, with a different Screen session in each<a href="#end-note-1">[1]</a>. A few days ago, I noticed that I was using the mouse to copy text between these Screen sessions. How inefficient is that?</p>
<p>It turns out that there&#8217;s a really easy way to copy text between different Screen sessions.</p>
<p>Note: I use CTRL-J as my escape command.</p>
<p>Copy some text to the first Screen&#8217;s buffer, and type <em>^J:writebuf</em> . Now switch to your other Screen session, and type <em>^J:readbuf</em> . Your second Screen session has just grabbed what you copied in your first Screen session. Paste it wherever you want, and Bob&#8217;s your uncle.</p>
<p><a name="end-note-1"></a><span class="end-note">[1] These Screen sessions are different on purpose. My Yakuake session is for &#8220;throw-away&#8221; tasks that don&#8217;t necessarily pertain to any tasks that I&#8217;m currently working on.</span></p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/nfHXtncCHRU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/11/copying-gnu-screen-buffers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/11/copying-gnu-screen-buffers/</feedburner:origLink></item>
		<item>
		<title>Linux Mint Is Weird</title>
		<link>http://feedproxy.google.com/~r/CretaceousLabsBlog/~3/EWrXv60pEHY/</link>
		<comments>http://cretaceouslabs.com/blog/2009/10/linux-mint-is-weird/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 01:12:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://cretaceouslabs.com/blog/2009/10/linux-mint-is-weird/</guid>
		<description><![CDATA[I have a MacBook Pro. I bought it back in 2007 when I was living in Australia. It&#8217;s awesome. I love it, especially the keyboard. Unfortunately, Mac OS X has pissed me off way too many times. So I jumped ship to Linux Mint 7.
Out of the box, Mint 7 supports my Mac&#8217;s Atheros wifi [...]]]></description>
			<content:encoded><![CDATA[<p>I have a MacBook Pro. I bought it back in 2007 when I was living in Australia. It&#8217;s awesome. I love it, especially the keyboard. Unfortunately, Mac OS X has pissed me off way too many times. So I jumped ship to Linux Mint 7.</p>
<p>Out of the box, Mint 7 supports my Mac&#8217;s Atheros wifi card <strong>and</strong> ATI video card. That&#8217;s something that not even Ubuntu managed to do. Needless to say, I was impressed.</p>
<p>After installing and configuring most of Mint 7, things were looking pretty good. As some of you know, I customize KDE heavily. Shortcuts, panels, virtual desktops, colour schemes, etc. Once all of that&#8217;s configured as I like it, I don&#8217;t touch&#8217;em: they&#8217;re perfect (for me).</p>
<p>Mint 7 ships with KDE 4 though, which uses Plasma. Trying to get Plasma configured just right is like trying to fine-tune a space ship: it sounds like fun, but it just Ain&#8217;t Gonna Happen <sup>(tm)</sup>.</p>
<p>While trying to configure Plasma, I ran <i>sudo aptitude safe-upgrade</i>, and went to bed. I awoke to hell. Well, desktop hell. None of my panels were showing, the <a href="http://sidux.files.wordpress.com/2009/04/plasma_cashew2.png">Plasma &#8220;cashew&#8221;</a> was missing, and right-clicking on the desktop did nothing. <strong>Fark!</strong></p>
<p>To make a long story short, Steely in #LinuxMint.com on irc.spotchat.org saved me. He corrected my sources.list , and after running mintupdate, life was peachy!</p>
<p>Apparently, one is <strong>not</strong> supposed to use aptitude&#8217;s <i>safe-upgrade</i> tool, because it&#8217;ll install packages that Linux Mint doesn&#8217;t want you to.</p>
<p>How/why/what/?!?</p>
<pre>&lt;steely&gt; mint will fix packages or omit items until they get what they consider a stable base

&lt;steely&gt; mint uses updates levels 1 to 5 and mintupdate is set to use levels 1 to 3 by default, 4 and 5 has kernel and driver and other package updates

&lt;steely&gt; if you use mintupdate you will rarely have problems but if you use the terminal it ignores levels and can introduce packages that conflict with mint's patches / fixes</pre>
<p>
So there you have it. When running Linux Mint, <strong>use <i>mintUpdate</i>, not <i>aptitude</i>, to perform upgrades</strong>.</p>
<p>In case anyone else is plagued by this problem, the solution is to comment out this line in /etc/apt/sources.list :</p>
<pre>deb http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu jaunty main</pre>
<p>and uncomment this line:</p>
<pre>deb http://archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse</pre>
<p>Next, use <i>mintUpdate</i> to upgrade the rest of your packages, reboot, and pray to whichever god(s) you believe in.</p>
<img src="http://feeds.feedburner.com/~r/CretaceousLabsBlog/~4/EWrXv60pEHY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cretaceouslabs.com/blog/2009/10/linux-mint-is-weird/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://cretaceouslabs.com/blog/2009/10/linux-mint-is-weird/</feedburner:origLink></item>
	</channel>
</rss>

