<?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>Schadenfreude &#187; xorg</title>
	<atom:link href="http://www.ralree.com/tag/xorg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Sun, 28 Feb 2010 04:18:37 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hardy Heron on the M1530</title>
		<link>http://www.ralree.com/2008/05/03/hardy-heron-on-the-m1530/</link>
		<comments>http://www.ralree.com/2008/05/03/hardy-heron-on-the-m1530/#comments</comments>
		<pubDate>Sat, 03 May 2008 05:53:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gutsy]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2008/05/03/hardy-heron-on-the-m1530</guid>
		<description><![CDATA[So, I upgraded my Ubuntu installation from Gutsy to Hardy today on my precious laptop.  It went pretty well except for the nvidia driver.  I ended up having to copy one of my old configurations over xorg.conf to actually make it work.  Just so anyone who has the same problem again (including [...]]]></description>
			<content:encoded><![CDATA[<p>So, I upgraded my Ubuntu installation from Gutsy to Hardy today on my precious laptop.  It went pretty well except for the nvidia driver.  I ended up having to copy one of my old configurations over xorg.conf to actually make it work.  Just so anyone who has the same problem again (including myself) can fix it without being really lucky, here&#8217;s a link:</p>
<p><a href="http://ralree.info/assets/2008/5/3/xorg.conf.working.bak"><strong>A working xorg.conf for Gutsy and Hardy on the M1530</strong></a></p>
<p>It ends up looking like this:</p>
<p><a href="http://ralree.info/assets/2008/5/3/Screenshot.png"><img src="http://ralree.info/assets/2008/5/3/Screenshot_medium.png" alt=""/></a></p>
<p>The above was done with <strong>emerald</strong> and <strong>Compiz Fusion</strong>.</p>
<h2>Horray!</h2>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2008/05/03/hardy-heron-on-the-m1530/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding bad JPEGs with Xorg hacks in Ubuntu</title>
		<link>http://www.ralree.com/2007/11/25/finding-bad-jpegs-with-xorg-hacks-in-ubuntu/</link>
		<comments>http://www.ralree.com/2007/11/25/finding-bad-jpegs-with-xorg-hacks-in-ubuntu/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 00:46:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[qiv]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/11/25/finding-bad-jpegs-with-xorg-hacks-in-ubuntu</guid>
		<description><![CDATA[So, I have all these JPEGs, and I want to know which ones are corrupt (specifically, ones that end prematurely).  qiv will spit out the following to STDERR when it finds one:

Premature end of JPEG file

So, this is nice, except it&#8217;s entirely unscriptable.  The solution I found was using the following script to [...]]]></description>
			<content:encoded><![CDATA[<p>So, I have all these JPEGs, and I want to know which ones are corrupt (specifically, ones that end prematurely).  <a href="http://www.klografx.net/qiv/">qiv</a> will spit out the following to <code>STDERR</code> when it finds one:</p>
<pre><code>
Premature end of JPEG file
</code></pre>
<p>So, this is nice, except it&#8217;s <strong><em>entirely unscriptable</strong></em>.  The solution I found was using the following script to the display the images in sequence:</p>
<pre><code>
perl -e 'for(glob("*.png *.jpg")){$output = `qiv "$_" 2&gt;&#038;1;`; if($output =~ /Premature/){print $_, "\n";}}'
</code></pre>
<p>All this does is mix <code>STDERR</code> with <code>STDOUT</code> for a <code>qiv</code> of the file, and check the output for the word &#8220;Premature&#8221;.  If it finds the word, it prints the filename.  Simple.</p>
<p>The only problem is that <code>qiv</code> doesnt have a way to just check whether a JPEG file is corrupt (and if there is a command line utility that does, please let me know).  To make it go thru the list, I wrote this little gem:</p>
<pre><code>
while(true); do xte "key q"; done
</code></pre>
<p>All this does is send the <code>q</code> key to the Xserver infinitely.  All I have to do is put focus on the first <code>qiv</code> window to make it and all subsequent <code>qiv</code> windows receive q&#8217;s.  So, just run it, and click on the window.  Then there are lots of flashes, and eventually that perl script will print out the names of the bad files.  It&#8217;s totally ghetto, but it&#8217;s the best I&#8217;ve got right now.  The point of this post is to hopefully find new ways to do this more programmatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/11/25/finding-bad-jpegs-with-xorg-hacks-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gutsy Fusion Pain</title>
		<link>http://www.ralree.com/2007/10/21/gutsy-fusion-pain/</link>
		<comments>http://www.ralree.com/2007/10/21/gutsy-fusion-pain/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 03:26:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fusion]]></category>
		<category><![CDATA[gutsy]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/21/gutsy-fusion-pain</guid>
		<description><![CDATA[I couldn&#8217;t get my stupid mouse to work properly, so I took action and edited my xorg.conf!

Section "InputDevice"
  Identifier  "Configured Mouse"
  Driver    "mouse"
  Option    "CorePointer"
  Option    "Device"  "/dev/input/mice"
  Option    "Protocol"  "ExplorerPS/2"
  Option   [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t get my stupid mouse to work properly, so I took action and edited my xorg.conf!</p>
<pre><code>
Section "InputDevice"
  Identifier  "Configured Mouse"
  Driver    "mouse"
  Option    "CorePointer"
  Option    "Device"  "/dev/input/mice"
  Option    "Protocol"  "ExplorerPS/2"
  Option    "Buttons"   "7"
  Option    "ZAxisMapping"  "4 5"
  Option    "Emulate3Buttons" "false"
EndSection
</code></pre>
<p>Also, Compiz Fusion seemed to keep control of my Windows key after I disabled all it&#8217;s bindings for it, and wouldn&#8217;t let it go until I restarted X.  Oh well, my Amarok rating global hotkeys work again now!</p>
<p>The fonts are a little screwy in Gutsy &#8211; I&#8217;m going to check someone&#8217;s Feisty/Edgy install to see what I have set badly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/10/21/gutsy-fusion-pain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automagic blending of wallpapers using RMagick</title>
		<link>http://www.ralree.com/2007/07/24/automagic-blending-of-wallpapers-using-rmagick/</link>
		<comments>http://www.ralree.com/2007/07/24/automagic-blending-of-wallpapers-using-rmagick/#comments</comments>
		<pubDate>Tue, 24 Jul 2007 00:00:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rmagick]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[wallpaper]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/automagic-blending-of-wallpapers-using-rmagick</guid>
		<description><![CDATA[I wanted a program that let me blend random wallpapers from a directory together and set them every minute with increasing opacity on one image, and then to select a new random image and repeat the process.  I did this using RMagick and some Ruby.
Make the following tree:

~/.wallmold/
  current.yml

Fill current.yml with this:

---
file2: someimage
wallpaperdir: [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted a program that let me blend random wallpapers from a directory together and set them every minute with increasing opacity on one image, and then to select a new random image and repeat the process.  I did this using RMagick and some Ruby.</p>
<p>Make the following tree:</p>
<pre><code>
~/.wallmold/
  current.yml
</code></pre>
<p>Fill <code>current.yml</code> with this:</p>
<pre><code>
---
file2: someimage
wallpaperdir: wallpaper directory
dissolution: 0.1
file1: anotherimage
</code></pre>
<p>Replacing the image names and directory with the proper stuffs, full path on directory and relative on image names.  Here&#8217;s mine:</p>
<pre><code>
---
file2: w09.jpg
wallpaperdir: /home/hank/MyDocs/Wallpapers
dissolution: 0.8
file1: Looking_Forward.jpg
</code></pre>
<p>Then, get this, make it executable, and put it somewhere:</p>
<pre><code>
#!/usr/bin/env ruby
# Wallmold - a wallpaper melding script
require 'RMagick'
require 'yaml'

class Array
  def randomize
   arr=self.dup
   arr.collect { arr.slice!(rand(arr.length)) }
  end

  def randomize!
   arr=self.dup
   result = arr.collect { arr.slice!(rand(arr.length)) }
   self.replace result
  end
end

# Load State
configpath = "#{ENV['HOME']}/.wallmold/current.yml"
configfile = File.open(configpath, 'r')
config = YAML.load(configfile)
out = "#{ENV['HOME']}/.wallmold/dissolve.jpg"

# Open the Wallpaper directory
dir = Dir.open(config['wallpaperdir'])
newconfig = config

if config['dissolution'] == 0.9
  # Get new images
  files = dir.to_a.randomize

  newconfig['file1'] = config['file2']
  newconfig['file2'] = files.pop
  newconfig['dissolution'] = 0.1
else
  newconfig['file1'] = config['file1']
  newconfig['file2'] = config['file2']
  newconfig['dissolution'] = config['dissolution'] + 0.1
end

bgnd = Magick::Image.read(dir.path+"/"+newconfig['file1']).first
overlay = Magick::Image.read(dir.path+"/"+newconfig['file2']).first

# Make the first image is the same size as the second
bgnd.crop_resized!(overlay.columns, overlay.rows)

composited = bgnd.dissolve(overlay, newconfig['dissolution'])
composited.write(out)

`fbsetbg #{out}`

# Write new config
configfile.close
configfile = File.open(configpath, 'w')
configfile.puts newconfig.to_yaml
</code></pre>
<p>Now, just edit your crontab:</p>
<pre><code>
* * * * * DISPLAY=:0 ruby -r rubygems /home/hank/bin/wallmold.rb &gt; /dev/null 2&gt;&#038;1
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/07/24/automagic-blending-of-wallpapers-using-rmagick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Killing Caps Lock</title>
		<link>http://www.ralree.com/2007/03/22/killing-caps-lock/</link>
		<comments>http://www.ralree.com/2007/03/22/killing-caps-lock/#comments</comments>
		<pubDate>Thu, 22 Mar 2007 12:44:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[annoyances]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/killing-caps-lock</guid>
		<description><![CDATA[As seen here:

    Option  "XkbOptions"    "ctrl:nocaps"

Horray.  Awesomeness.  Changes the caps lock key to a control key in Linux via xorg.conf.
]]></description>
			<content:encoded><![CDATA[<p>As seen <a href="http://wiki.linuxquestions.org/wiki/Swap_Caps_Lock_and_Ctrl">here</a>:</p>
<pre><code>
    Option  "XkbOptions"    "ctrl:nocaps"
</code></pre>
<p>Horray.  Awesomeness.  Changes the caps lock key to a control key in Linux via <code>xorg.conf</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/03/22/killing-caps-lock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xorg Screen Rotation with RandR and Nvidia</title>
		<link>http://www.ralree.com/2007/01/23/xorg-screen-rotation-with-randr-and-nvidia/</link>
		<comments>http://www.ralree.com/2007/01/23/xorg-screen-rotation-with-randr-and-nvidia/#comments</comments>
		<pubDate>Tue, 23 Jan 2007 03:52:01 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/xorg-screen-rotation-with-randr-and-nvidia</guid>
		<description><![CDATA[To get rotation to work, jam this into the device section of xorg.conf:

Option “RandRRotation” “true”

Then you can use xrandr to rotate the screen:

xrandr -o left # Also 'normal', 'inverted', and 'right'

It rocks on my 21&#8221; Samsung LCD.
]]></description>
			<content:encoded><![CDATA[<p>To get rotation to work, jam this into the device section of <strong>xorg.conf</strong>:</p>
<pre><code>
Option “RandRRotation” “true”
</code></pre>
<p>Then you can use <strong>xrandr</strong> to rotate the screen:</p>
<pre><code>
xrandr -o left # Also 'normal', 'inverted', and 'right'
</code></pre>
<p>It rocks on my 21&#8221; Samsung LCD.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/01/23/xorg-screen-rotation-with-randr-and-nvidia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.343 seconds -->
