<?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>Do Know Evil - A Blog by Tyler Mulligan &#187; open source</title>
	<atom:link href="http://www.doknowevil.net/category/computers/software/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doknowevil.net</link>
	<description>Tips and Tricks About Computers, Web Development, Linux, the Internet and the Like</description>
	<lastBuildDate>Thu, 29 Jul 2010 03:37:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Compiz 0.9.0 Released &#8211; Completely Rewritten in C++</title>
		<link>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/</link>
		<comments>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 02:44:16 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Application Management]]></category>
		<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=738</guid>
		<description><![CDATA[I was doing some in depth research / code hacking regarding the support of multi-headed output (dual monitors) on Linux. I won&#8217;t get into details but my video is being output to my monitors as &#8220;one screen&#8221; with a virtual distinctions handled by the window manager. Because of this, figuring out which of the monitors]]></description>
			<content:encoded><![CDATA[<p>I was doing some in depth research / code hacking regarding the support of multi-headed output (dual monitors) on Linux.  I won&#8217;t get into <a href="http://forum.compiz.org/viewtopic.php?f=89&#038;t=13362" title="managing windows across dual monitors in compiz?">details</a> but my video is being output to my monitors as &#8220;one screen&#8221; with a virtual distinctions handled by the window manager.  Because of this, figuring out which of the monitors you are on isn&#8217;t as straight forward as you might think.  Originally I was looking for a way to access the c functions in compiz through python but that point is now moot (likely for the better).</p>
<p>The <a href="http://lists.freedesktop.org/archives/compiz/2010-July/003429.html">first unstable release of the Compiz 0.9 series</a>, completely rewritten in C++.  As said, this &#8220;brings a whole new developer API, splits rendering into plugins, switches the buildsystem from automake to cmake and brings minor functionality improvements. This release represents the first developer and tester preview of what will eventually make the 0.10.x stable series. Please note that as such, it is not yet ready for general use as there are a number of known  ssues, regressions and incomplete functionality.&#8221;</p>
<p>Here is a <b>SLIGHTLY DATED</b> graph I got <a href="http://santiance.com/2009/10/compiz-code-comparison/">from Santiance.com</a>.</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2010/07/compiz_comparison_chart.png" rel="shadowbox[post-738];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2010/07/compiz_comparison_chart.png" alt="" title="compiz_comparison_chart" width="776" height="449" class="alignnone size-full wp-image-739" /></a></p>
<p>This is a really interesting turning point for the project and I&#8217;m glad I came across this while doing my research for multi-head handling in compiz. Knowing where the future lies could drastically change where I put my efforts in developing to support them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/07/04/compiz-0_9_0-released-completely-rewritten-in-c-plus-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>scp-notifications for GNOME and Ubuntu &#8211; Expanding on My Original Python Script</title>
		<link>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/</link>
		<comments>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 00:11:15 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Desktop Mods]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[The Internet]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[libnotify]]></category>
		<category><![CDATA[notification-daemon]]></category>
		<category><![CDATA[pynotify]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=698</guid>
		<description><![CDATA[I&#8217;ve only been coding Python for ~12 hours total, so don&#8217;t expect this to be perfect. Knowing what I know about creating/testing other software and doing my best to scour through very light pynotify documentation, I&#8217;ve begun to build out this script to be more useful / portable / configurable. As the Version 0.6 indicates,]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve only been coding Python for ~12 hours total, so don&#8217;t expect this to be perfect.  Knowing what I know about creating/testing other software and doing my best to scour through very light pynotify documentation, I&#8217;ve begun to build out this script to be more useful / portable / configurable.  As the Version 0.6 indicates, I&#8217;m not quite at my goal yet and there is still more to learn to bring it up to that point.</p>
<p>I&#8217;m releasing this early on my blog just in case I caught any people yesterday who&#8217;ve been experimenting with my research / code so far.  I&#8217;ll share it on github when I evolve it just a bit more.</p>
<p><a href="http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv">Video of it in Action</a></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="co1">#!/usr/bin/env python</span>
<span class="co1">#</span>
<span class="co1"># Title: scp-notifications</span>
<span class="co1"># Author: Tyler Mulligan (tyler@detrition.net)</span>
<span class="co1"># Date: 06/26/2010</span>
<span class="co1"># Version: 0.6</span>
<span class="co1"># Description:</span>
<span class="co1"># Used in combination with an event, such as an action or cronjob, this script</span>
<span class="co1"># will scp the latest file from a folder to your server.</span>
<span class="co1">#</span>
<span class="co1"># Optionally, it can copy the url to your clipboard and/or show a popup with a</span>
<span class="co1"># link to the file after succesfully uploading</span>
<span class="co1">#</span>
<span class="co1"># Orginally developed to be piped to from compiz screenshot tool</span>
<span class="co1"># http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv</span>
<span class="co1">#</span>
<span class="co1"># The MIT License</span>
<span class="co1">#</span>
<span class="co1"># Copyright (c) 2010 Tyler Mulligan</span>
<span class="co1">#</span>
<span class="co1"># Permission is hereby granted, free of charge, to any person obtaining a copy</span>
<span class="co1"># of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
<span class="co1"># in the Software without restriction, including without limitation the rights</span>
<span class="co1"># to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
<span class="co1"># copies of the Software, and to permit persons to whom the Software is</span>
<span class="co1"># furnished to do so, subject to the following conditions:</span>
<span class="co1">#</span>
<span class="co1"># The above copyright notice and this permission notice shall be included in</span>
<span class="co1"># all copies or substantial portions of the Software.</span>
<span class="co1">#</span>
<span class="co1"># THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<span class="co1"># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<span class="co1"># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
<span class="co1"># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<span class="co1"># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
<span class="co1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
<span class="co1"># THE SOFTWARE</span>
<span class="co1">#</span>
&nbsp;
<span class="kw1">import</span> pygtk
pygtk.<span class="me1">require</span><span class="br0">&#40;</span><span class="st0">'2.0'</span><span class="br0">&#41;</span>
<span class="kw1">import</span> pynotify
<span class="kw1">import</span> gtk
<span class="kw1">import</span> <span class="kw3">sys</span>
<span class="kw1">import</span> <span class="kw3">os</span>
<span class="kw1">import</span> <span class="kw3">subprocess</span>
&nbsp;
<span class="co1"># Set Variables</span>
<span class="co1">#####################################</span>
<span class="kw3">user</span> = <span class="st0">&quot;user&quot;</span>
host = <span class="st0">&quot;server.com&quot;</span>
<span class="co1"># All should have trailing slashes</span>
lfolder = <span class="st0">&quot;/home/user/screenshots/&quot;</span>
hfolder = <span class="st0">&quot;/home/remote_user/screenshots/&quot;</span>
httplink = <span class="st0">&quot;http://&quot;</span>+host+<span class="st0">&quot;/screenshots/&quot;</span>
&nbsp;
&nbsp;
<span class="co1"># Display</span>
<span class="co1">#####################################</span>
t1 = <span class="nu0">5000</span> <span class="co1"># timeout for screenshot upload dialog</span>
t2 = <span class="nu0">3000</span> <span class="co1"># timeout for screenshot preview</span>
t3 = <span class="nu0">7000</span> <span class="co1"># timeout for link dialog</span>
&nbsp;
screenshot_preview = <span class="nu0">1</span> <span class="co1"># If using with the compiz screenshot plugin, you may want this</span>
popup_link = <span class="nu0">1</span> <span class="co1"># another popup</span>
copy_to_clipboard = <span class="nu0">0</span> <span class="co1"># automatically copy text to keyboard</span>
&nbsp;
<span class="co1"># Position</span>
<span class="co1">#####################################</span>
&nbsp;
<span class="co1"># Get screensize &lt; &lt; used for relative positioning</span>
display = gtk.<span class="me1">gdk</span>.<span class="me1">display_get_default</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
screen = display.<span class="me1">get_default_screen</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
x = screen.<span class="me1">get_width</span><span class="br0">&#40;</span><span class="br0">&#41;</span> - <span class="nu0">1</span>
y = screen.<span class="me1">get_height</span><span class="br0">&#40;</span><span class="br0">&#41;</span> - <span class="nu0">1</span>
&nbsp;
<span class="co1"># 0 for Automatic Placement</span>
<span class="st0">&quot;&quot;&quot;
x1 = 0
y1 = 0
x2 = 0
y2 = 0
x3 = 0
y3 = 0
&quot;&quot;&quot;</span>
<span class="co1"># Define Relative Position (assuming top-right)</span>
x1 = x-<span class="nu0">1</span>
y1 = <span class="nu0">12</span>
x2 = x1
y2 = y1 + <span class="nu0">100</span>
x3 = x-<span class="nu0">1</span>
y3 = <span class="nu0">12</span>
<span class="co1"># Define Static (1920 puts it on my second monitor)</span>
<span class="st0">&quot;&quot;&quot;
x1 = 1919
y1 = 12
x2 = x1
y2 = y1 + 100
x3 = 1920
y3 = 12
&quot;&quot;&quot;</span>
<span class="co1">#####################################</span>
&nbsp;
<span class="kw1">def</span> upload_cb<span class="br0">&#40;</span>n, action<span class="br0">&#41;</span>:
    <span class="kw1">assert</span> action == <span class="st0">&quot;upload&quot;</span> 
&nbsp;
    <span class="kw3">subprocess</span>.<span class="me1">call</span><span class="br0">&#40;</span><span class="br0">&#91;</span><span class="st0">&quot;scp&quot;</span>, <span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">join</span><span class="br0">&#40;</span>lfolder, f<span class="br0">&#41;</span>, <span class="st0">'%s@%s:%s'</span> <span class="sy0">%</span> <span class="br0">&#40;</span><span class="kw3">user</span>, host, hfolder<span class="br0">&#41;</span><span class="br0">&#93;</span><span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># setup URL in </span>
    <span class="kw1">if</span> copy_to_clipboard:
        clipboard = gtk.<span class="me1">clipboard_get</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
        clipboard.<span class="me1">set_text</span><span class="br0">&#40;</span>httplink + f<span class="br0">&#41;</span>
        <span class="co1"># make our data available to other applications</span>
        clipboard.<span class="me1">store</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># Notification: Link for the clicking</span>
    <span class="kw1">if</span> popup_link:
        n3 = pynotify.<span class="me1">Notification</span><span class="br0">&#40;</span><span class="st0">&quot;Here is your link&quot;</span>,<span class="st0">&quot;&lt;a href='&quot;</span> + httplink + f + <span class="st0">&quot;'&gt;&quot;</span> + httplink + f + <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span>
&nbsp;
        helper = gtk.<span class="me1">Button</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
        icon = helper.<span class="me1">render_icon</span><span class="br0">&#40;</span>gtk.<span class="me1">STOCK_DIALOG_INFO</span>, gtk.<span class="me1">ICON_SIZE_DIALOG</span><span class="br0">&#41;</span>
        n3.<span class="me1">set_icon_from_pixbuf</span><span class="br0">&#40;</span>icon<span class="br0">&#41;</span>
&nbsp;
        n3.<span class="me1">set_urgency</span><span class="br0">&#40;</span>pynotify.<span class="me1">URGENCY_NORMAL</span><span class="br0">&#41;</span>
        <span class="kw1">if</span> x3:
            n3.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;x&quot;</span>, x3<span class="br0">&#41;</span>
        <span class="kw1">if</span> y3:
            n3.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;y&quot;</span>, y3<span class="br0">&#41;</span>
        n3.<span class="me1">set_timeout</span><span class="br0">&#40;</span>t3<span class="br0">&#41;</span>
        n3.<span class="me1">connect</span><span class="br0">&#40;</span><span class="st0">&quot;closed&quot;</span>,closen3_cb<span class="br0">&#41;</span>
&nbsp;
        <span class="kw1">if</span> <span class="kw1">not</span> n3.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>:
            <span class="kw1">print</span> <span class="st0">&quot;Failed to send notification&quot;</span>
            <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
        closen1_cb<span class="br0">&#40;</span>n1<span class="br0">&#41;</span>
        closen2_cb<span class="br0">&#40;</span>n2<span class="br0">&#41;</span>
&nbsp;
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Notification 1 was closed</span>
<span class="kw1">def</span> closen1_cb<span class="br0">&#40;</span>n<span class="br0">&#41;</span>:
    n1.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    <span class="kw1">if</span> screenshot_preview:
        n2.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Notification 2 was closed</span>
<span class="kw1">def</span> closen2_cb<span class="br0">&#40;</span>n<span class="br0">&#41;</span>:
    n2.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Notification 2 was closed</span>
<span class="kw1">def</span> closen3_cb<span class="br0">&#40;</span>n<span class="br0">&#41;</span>:
    n3.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># The Ignore button was clicked</span>
<span class="kw1">def</span> ignore_cb<span class="br0">&#40;</span>n, action<span class="br0">&#41;</span>:
    <span class="kw1">assert</span> action == <span class="st0">&quot;ignore&quot;</span>
&nbsp;
    closen1_cb<span class="br0">&#40;</span>n1<span class="br0">&#41;</span>
    closen2_cb<span class="br0">&#40;</span>n2<span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Main</span>
<span class="kw1">def</span> main<span class="br0">&#40;</span><span class="br0">&#41;</span>:
    gtk.<span class="me1">main</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># Init</span>
<span class="kw1">if</span> __name__ == <span class="st0">'__main__'</span>:
    <span class="kw1">if</span> <span class="kw1">not</span> pynotify.<span class="me1">init</span><span class="br0">&#40;</span><span class="st0">&quot;Notifier 'scp' Option&quot;</span><span class="br0">&#41;</span>:
        <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># Get latest file and build uri</span>
    start = <span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">abspath</span><span class="br0">&#40;</span>lfolder<span class="br0">&#41;</span>
    f = <span class="kw2">max</span><span class="br0">&#40;</span><span class="br0">&#91;</span><span class="br0">&#40;</span><span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">getmtime</span><span class="br0">&#40;</span><span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">join</span><span class="br0">&#40;</span>start,p<span class="br0">&#41;</span><span class="br0">&#41;</span>,p<span class="br0">&#41;</span>
         <span class="kw1">for</span> p <span class="kw1">in</span> <span class="kw3">os</span>.<span class="me1">listdir</span><span class="br0">&#40;</span>start<span class="br0">&#41;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>
    uri = lfolder + f
&nbsp;
    <span class="co1"># Notification: Upload to Server</span>
    n1 = pynotify.<span class="me1">Notification</span><span class="br0">&#40;</span><span class="st0">&quot;Upload to Server?&quot;</span>,<span class="st0">&quot;Copy the file '&quot;</span> + f + <span class="st0">&quot;' to the server?&quot;</span><span class="br0">&#41;</span>
&nbsp;
    helper = gtk.<span class="me1">Button</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    icon = helper.<span class="me1">render_icon</span><span class="br0">&#40;</span>gtk.<span class="me1">STOCK_DIALOG_QUESTION</span>, gtk.<span class="me1">ICON_SIZE_DIALOG</span><span class="br0">&#41;</span>
    n1.<span class="me1">set_icon_from_pixbuf</span><span class="br0">&#40;</span>icon<span class="br0">&#41;</span>
&nbsp;
    n1.<span class="me1">set_urgency</span><span class="br0">&#40;</span>pynotify.<span class="me1">URGENCY_NORMAL</span><span class="br0">&#41;</span>
    <span class="kw1">if</span> x1:
        n1.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;x&quot;</span>, x1<span class="br0">&#41;</span>
    <span class="kw1">if</span> y1:
        n1.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;y&quot;</span>, y1<span class="br0">&#41;</span>
    n1.<span class="me1">set_timeout</span><span class="br0">&#40;</span>t1<span class="br0">&#41;</span>
    n1.<span class="me1">add_action</span><span class="br0">&#40;</span><span class="st0">&quot;upload&quot;</span>, <span class="st0">&quot;Yes, Upload&quot;</span>, upload_cb<span class="br0">&#41;</span>
    n1.<span class="me1">add_action</span><span class="br0">&#40;</span><span class="st0">&quot;ignore&quot;</span>, <span class="st0">&quot;Ignore&quot;</span>, ignore_cb<span class="br0">&#41;</span>
    n1.<span class="me1">connect</span><span class="br0">&#40;</span><span class="st0">&quot;closed&quot;</span>,closen1_cb<span class="br0">&#41;</span>
&nbsp;
    <span class="kw1">if</span> <span class="kw1">not</span> n1.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>:
        <span class="kw1">print</span> <span class="st0">&quot;Failed to send notification&quot;</span>
        <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># Notification: Screenshot Preview</span>
    <span class="kw1">if</span> screenshot_preview:
        n2 = pynotify.<span class="me1">Notification</span><span class="br0">&#40;</span><span class="st0">&quot;Screenshot Preview&quot;</span>, <span class="st0">&quot;&quot;</span>, uri<span class="br0">&#41;</span>
        n2.<span class="me1">set_urgency</span><span class="br0">&#40;</span>pynotify.<span class="me1">URGENCY_LOW</span><span class="br0">&#41;</span>
        <span class="kw1">if</span> x2:
            n2.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;x&quot;</span>, x2<span class="br0">&#41;</span>
        <span class="kw1">if</span> y2:
            n2.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;y&quot;</span>, y2<span class="br0">&#41;</span>
        n2.<span class="me1">set_timeout</span><span class="br0">&#40;</span>t2<span class="br0">&#41;</span>
        n2.<span class="me1">connect</span><span class="br0">&#40;</span><span class="st0">&quot;closed&quot;</span>,closen2_cb<span class="br0">&#41;</span>
&nbsp;
        <span class="kw1">if</span> <span class="kw1">not</span> n2.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>:
            <span class="kw1">print</span> <span class="st0">&quot;Failed to send notification&quot;</span>
            <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
    main<span class="br0">&#40;</span><span class="br0">&#41;</span></pre></div></div>

<p>I also rigged up a quick gallery script to parse the incoming images http://interwebninja.com/screenshots/ &#8212; I used <a href="http://scriptandstyle.com/automatically-generate-a-photo-gallery-from-a-directory-of-images">AutoGeneratingGallery</a> for this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/06/26/scp-notifications-for-gnome-and-ubuntu-expanding-on-my-original-python-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv" length="2797703" type="video/ogg" />
		</item>
		<item>
		<title>Ubuntu Notifications (osd-notify) Sucks, notifications-daemon Rocks &#8211; Exploiting the Goodness with Compiz</title>
		<link>http://www.doknowevil.net/2010/06/25/ubuntu-notifications-osd-notify-sucks-notifications-daemon-rocks-exploiting-the-goodness-with-compiz/</link>
		<comments>http://www.doknowevil.net/2010/06/25/ubuntu-notifications-osd-notify-sucks-notifications-daemon-rocks-exploiting-the-goodness-with-compiz/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 04:47:40 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[markedwontfix]]></category>
		<category><![CDATA[notifications]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=677</guid>
		<description><![CDATA[Introduction The long name for this blog used to be &#8220;Tyler Mulligan&#8217;s Tips and Tricks for Increasing your Efficiency&#8220;. I love finding ways to increase my efficiency and let computers do the work while I focus on more interests aspects of what the computer is providing me with. When I recognize an issue, I find]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>The long name for this blog used to be &#8220;<a href="http://www.doknowevil.net" target="_blank">Tyler Mulligan&#8217;s Tips and Tricks for Increasing your Efficiency</a>&#8220;.  I love finding ways to increase my efficiency and let computers do the work while I focus on more interests aspects of what the computer is providing me with.  When I recognize an issue, I find a way to cut out time by streamlining the process for the most accurate repetition, like any programmer would/should/could.</p>
<p>I noticed myself taking a lot of screenshots with compiz&#8217; built in screenshot tool (I can hold a hotkey and drag a box to take newspaper style clippings).  This is very fast and simple, I highly recommend enabling this option and getting used to it.  However, I don&#8217;t care much for clicking around on clunky websites to upload images.</p>
<p>This is where my adventure starts&#8230; when I find out <a href="http://ubuntuforums.org/showthread.php?t=1517950" title="notify-osd doesn't display popup balloons">a very useful feature was deprecated and not replaced in Ubuntu</a>.  I don&#8217;t use the new notification area, it has too much I don&#8217;t need, I never liked the behavior of these new osd-notify notifications which I found out now are even more worthless (sorry team).</p>
<h2>Using Sane Notifications in Ubuntu</h2>
<p>After <a href="http://ubuntuforums.org/showpost.php?p=8559795&#038;postcount=8">reinstalling the GNOME default notifications system in Ubuntu</a> I was able to use SANE notifications that actually&#8230; KICK ASS!  I don&#8217;t understand how osd-notify is better than these which even comes with it&#8217;s own notification properties panel.  Maybe it&#8217;s an under the hood thing&#8230;</p>
<p>Regardless, there is no doubt in my mind that notifications that you hover, can still slightly see but click through but cannot perform any actions, even a close, are just plan stupid and annoying..</p>
<p><img src="http://interwebninja.com/compiz-screenshots/screenshot5.png" title="Screenshot taken with Tyler Mulligan's Notification 'scp' Option python script for ubuntu and other Linux based operating systems" /><br />
Screenshot of the script I ended up writing using the &#8220;better&#8221; notification system to ask me if I want to upload the screenshot I just took to the server.</p>
<h2>Linking the notifications</h2>
<p>I linked the notifications the following way:</p>
<p><img src="http://interwebninja.com/compiz-screenshots/screenshot3.png" title="Screenshot taken with Tyler Mulligan's Notification 'scp' Option python script for ubuntu and other Linux based operating systems" /></p>
<h2>Python Script for Notification that Prompts for File Upload to Server</h2>
<p>Knowing diddly squat about Python, I chugged forward with my classic notification popups that allow for interaction as it had the most activity around it and some examples available in /usr/share/doc/python-notify/examples/</p>
<p>I ended coming up with the following script thanks to some help from a few people in #python on irc.freenode.org</p>
<p>This is outside of the scope of this blogpost but this script assumes you have setup passwordless ssh to your server.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="co1">#!/usr/bin/env python</span>
<span class="co1">#</span>
<span class="co1"># Title: Notification 'scp' Option</span>
<span class="co1"># Author: Tyler Mulligan (tyler@detrition.net)</span>
<span class="co1"># Date: 06/25/2010</span>
<span class="co1"># Description:</span>
<span class="co1"># Used in combination with an event, such as an action or cron</span>
<span class="co1"># the latest file from a folder will be scped to your server and will copy</span>
<span class="co1"># the http location of the that file to your clipboard</span>
<span class="co1">#</span>
<span class="co1"># Orginally developed to be piped to from compiz screenshot tool</span>
<span class="co1">#</span>
<span class="co1">#</span>
<span class="co1"># The MIT License</span>
<span class="co1">#</span>
<span class="co1"># Copyright (c) 2010 Tyler Mulligan</span>
<span class="co1">#</span>
<span class="co1"># Permission is hereby granted, free of charge, to any person obtaining a copy</span>
<span class="co1"># of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
<span class="co1"># in the Software without restriction, including without limitation the rights</span>
<span class="co1"># to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
<span class="co1"># copies of the Software, and to permit persons to whom the Software is</span>
<span class="co1"># furnished to do so, subject to the following conditions:</span>
<span class="co1">#</span>
<span class="co1"># The above copyright notice and this permission notice shall be included in</span>
<span class="co1"># all copies or substantial portions of the Software.</span>
<span class="co1">#</span>
<span class="co1"># THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<span class="co1"># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<span class="co1"># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
<span class="co1"># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<span class="co1"># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
<span class="co1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
<span class="co1"># THE SOFTWARE</span>
<span class="co1">#</span>
&nbsp;
<span class="kw1">import</span> pygtk
pygtk.<span class="me1">require</span><span class="br0">&#40;</span><span class="st0">'2.0'</span><span class="br0">&#41;</span>
<span class="kw1">import</span> gtk
<span class="kw1">import</span> pynotify
<span class="kw1">import</span> <span class="kw3">sys</span>
<span class="kw1">import</span> <span class="kw3">os</span>
<span class="kw1">import</span> <span class="kw3">subprocess</span>
&nbsp;
<span class="kw3">user</span> = <span class="st0">&quot;user&quot;</span>
host = <span class="st0">&quot;server.com&quot;</span>
lfolder = <span class="st0">&quot;/home/user/screenshots/&quot;</span>
hfolder = <span class="st0">&quot;/home/remote_user/screenshots/&quot;</span>
httplink = <span class="st0">&quot;http://&quot;</span>+host+<span class="st0">&quot;/screenshots/&quot;</span>
timeout = <span class="nu0">5000</span>
&nbsp;
<span class="co1"># Set position</span>
display = gtk.<span class="me1">gdk</span>.<span class="me1">display_get_default</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
screen = display.<span class="me1">get_default_screen</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
x = screen.<span class="me1">get_width</span><span class="br0">&#40;</span><span class="br0">&#41;</span> - <span class="nu0">1</span>
y = screen.<span class="me1">get_height</span><span class="br0">&#40;</span><span class="br0">&#41;</span> - <span class="nu0">1</span>
<span class="co1">#x = 1919</span>
<span class="co1">#y = 12</span>
&nbsp;
<span class="kw1">def</span> upload_cb<span class="br0">&#40;</span>n, action<span class="br0">&#41;</span>:
    <span class="kw1">assert</span> action == <span class="st0">&quot;upload&quot;</span>
&nbsp;
    start = <span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">abspath</span><span class="br0">&#40;</span>lfolder<span class="br0">&#41;</span>
    f = <span class="kw2">max</span><span class="br0">&#40;</span><span class="br0">&#91;</span><span class="br0">&#40;</span><span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">getmtime</span><span class="br0">&#40;</span><span class="kw3">os</span>.<span class="me1">path</span>.<span class="me1">join</span><span class="br0">&#40;</span>start,x<span class="br0">&#41;</span><span class="br0">&#41;</span>,x<span class="br0">&#41;</span>
          <span class="kw1">for</span> x <span class="kw1">in</span> <span class="kw3">os</span>.<span class="me1">listdir</span><span class="br0">&#40;</span>start<span class="br0">&#41;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>
&nbsp;
	<span class="co1"># setup URL in clipboard</span>
    clipboard = gtk.<span class="me1">clipboard_get</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    clipboard.<span class="me1">set_text</span><span class="br0">&#40;</span>httplink + f<span class="br0">&#41;</span>
    <span class="co1"># make our data available to other applications</span>
    clipboard.<span class="me1">store</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
    <span class="kw3">os</span>.<span class="me1">system</span><span class="br0">&#40;</span><span class="st0">'scp &quot;%s&quot; &quot;%s@%s:%s&quot;'</span> <span class="sy0">%</span> <span class="br0">&#40;</span>lfolder + f, <span class="kw3">user</span>, host, hfolder<span class="br0">&#41;</span> <span class="br0">&#41;</span>.<span class="me1">wait</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
    n.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="kw1">def</span> ignore_cb<span class="br0">&#40;</span>n, action<span class="br0">&#41;</span>:
    <span class="kw1">assert</span> action == <span class="st0">&quot;ignore&quot;</span>
    n.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
    gtk.<span class="me1">main_quit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
&nbsp;
<span class="kw1">if</span> __name__ == <span class="st0">'__main__'</span>:
    <span class="kw1">if</span> <span class="kw1">not</span> pynotify.<span class="me1">init</span><span class="br0">&#40;</span><span class="st0">&quot;Notifier 'scp' Option&quot;</span><span class="br0">&#41;</span>:
        <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
	<span class="co1"># Setup Popup</span>
    n = pynotify.<span class="me1">Notification</span><span class="br0">&#40;</span><span class="st0">&quot;Upload to Server?&quot;</span><span class="br0">&#41;</span>
    n.<span class="me1">set_urgency</span><span class="br0">&#40;</span>pynotify.<span class="me1">URGENCY_NORMAL</span><span class="br0">&#41;</span>
    n.<span class="me1">set_timeout</span><span class="br0">&#40;</span>timeout<span class="br0">&#41;</span>                          
    n.<span class="me1">set_category</span><span class="br0">&#40;</span><span class="st0">&quot;device&quot;</span><span class="br0">&#41;</span>
    n.<span class="me1">add_action</span><span class="br0">&#40;</span><span class="st0">&quot;upload&quot;</span>, <span class="st0">&quot;Yes, Upload&quot;</span>, upload_cb<span class="br0">&#41;</span>
    n.<span class="me1">add_action</span><span class="br0">&#40;</span><span class="st0">&quot;ignore&quot;</span>, <span class="st0">&quot;Ignore&quot;</span>, ignore_cb<span class="br0">&#41;</span>
&nbsp;
    <span class="co1"># Set position</span>
    n.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;x&quot;</span>, x<span class="br0">&#41;</span>
    n.<span class="me1">set_hint</span><span class="br0">&#40;</span><span class="st0">&quot;y&quot;</span>, y<span class="br0">&#41;</span>
&nbsp;
    <span class="kw1">if</span> <span class="kw1">not</span> n.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>:
        <span class="kw1">print</span> <span class="st0">&quot;Failed to send notification&quot;</span>
        <span class="kw3">sys</span>.<span class="me1">exit</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span>
&nbsp;
    gtk.<span class="me1">main</span><span class="br0">&#40;</span><span class="br0">&#41;</span></pre></div></div>

<p>edit: I updated the script with some position information &#8212; I love that I can put the notifications ANYWHERE on my screen.  I also variablized the timeout.</p>
<p>edit 2: Here is a video of my improved script in action &#8212; I&#8217;ll post the source later</p>
<p>http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv</p>
<h2>Going Beyond</h2>
<p>The Compiz example is just something that server my immediate needs.  The possibilities are however endless.  You can for example, link this script to a cron job asking you if you want to sync some other sort of file.  Or perhaps you&#8217;d like to add multiple buttons to give yourself a folder / server choice.</p>
<p>Happy hacking</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/06/25/ubuntu-notifications-osd-notify-sucks-notifications-daemon-rocks-exploiting-the-goodness-with-compiz/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://cankill.us/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv" length="687321" type="video/ogg" />
<enclosure url="http://interwebninja.com/videos/compiz-screenshot-piped-to-notification-daemon-for-upload.ogv" length="687321" type="video/ogg" />
		</item>
		<item>
		<title>Some Issues I found with Dual Monitors in KDE</title>
		<link>http://www.doknowevil.net/2010/05/13/some-issues-i-found-with-dual-monitors-in-kde/</link>
		<comments>http://www.doknowevil.net/2010/05/13/some-issues-i-found-with-dual-monitors-in-kde/#comments</comments>
		<pubDate>Thu, 13 May 2010 15:49:09 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Window Management]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[dual monitors]]></category>
		<category><![CDATA[kde 4.4]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=613</guid>
		<description><![CDATA[I had originally made a thread on ubuntu forums essentially asking how to change the way kde or more specifically kwin treats dual monitors. When trying out KDE 4.4, I was trying to establish a similar workflow to what I have in my GNOME/compiz setup. I use dual monitors and heavily use the expo compiz]]></description>
			<content:encoded><![CDATA[<p>I had originally made a <a href="http://ubuntuforums.org/showthread.php?t=1416445" target="_blank">thread on ubuntu forums</a> essentially asking how to change the way kde or more specifically kwin treats dual monitors.</p>
<p>When trying out KDE 4.4, I was trying to establish a similar workflow to what I have in my GNOME/compiz setup.  I use dual monitors and heavily use the expo compiz plugin (equivalent to kwin&#8217;s &#8216;desktop grid&#8217;).  However, the behavior in KDE is a bit odd to me.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/JYzBGBy6bE8&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JYzBGBy6bE8&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object><br />
(not my video but gives you an idea about the effect, see below for how I lay mine out)</p>
<p>In compiz, I have 4 virtual desktops with dimensions that spanned both monitors.</p>
<pr>[    ] | [    ]<br />
[    ] | [    ]</p>
<p>In KDE however, each monitor is considered it&#8217;s own &#8220;activity&#8221; and as such, I have 8 virtual desktops</p>
<pre>[ ][ ] | [ ][ ]
[ ][ ] | [ ][ ]</pre>
<p>This in and of itself isn&#8217;t all so bad.  What bothers me however, is how they behave.</p>
<p>Labeling the virtual desktops..</p>
<pre>[1][2] | [1][2]
[3][4] | [3][4]</pre>
<p>When I click virtual desktop [1] on the left monitor, [1] on the right monitor zooms with it.  The behavior I&#8217;m used to in compiz would be to have both [1][2] on the left desktop zoom if I were to click [1].</p>
<p>Sure, this behavior &#8220;makes sense&#8221; knowing how KDE treats multiple monitors as separate activities but even after setting up matching desktop backgrounds on the monitors, I find it confusing to my workflow.</p>
<p><a href="http://pics.nexuizninjaz.com/viewer.php?file=gu6b56r305xemr7esym.png" rel="shadowbox[post-613];player=img;"><img src="http://pics.nexuizninjaz.com/images/gu6b56r305xemr7esym_thumb.png" /></a></p>
<p>What&#8217;s more, is that KDE seems to know this is what I want&#8230; but ignores this fact when creating activities:</p>
<p><img src="http://pics.nexuizninjaz.com/images/t8ds66c2d39fpe93fxl6.png" /></p>
<p>Has anyone come up with a clever solution to achieve this? I didn&#8217;t see anything about it planned for 4.5.</p>
<p>If it matters, I&#8217;m using twinview.</pr>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/05/13/some-issues-i-found-with-dual-monitors-in-kde/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reseting your system wide cursor theme in ubuntu</title>
		<link>http://www.doknowevil.net/2010/05/11/reseting-your-system-wide-cursor-theme-in-ubuntu/</link>
		<comments>http://www.doknowevil.net/2010/05/11/reseting-your-system-wide-cursor-theme-in-ubuntu/#comments</comments>
		<pubDate>Wed, 12 May 2010 03:26:46 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[mouse]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=607</guid>
		<description><![CDATA[If you installed KDE in ubuntu (GNOME based), you may have noticed that when you log back into GNOME, you keep the KDE cursor theme. To fix this, use update-alternatives like so: 0025&#124;z@zentury ~$ sudo update-alternatives --config x-cursor-theme There are 7 choices for the alternative x-cursor-theme &#40;providing /usr/share/icons/default/index.theme&#41;. &#160; Selection Path Priority Status ------------------------------------------------------------ *]]></description>
			<content:encoded><![CDATA[<p>If you installed KDE in ubuntu (GNOME based), you may have noticed that when you log back into GNOME, you keep the KDE cursor theme.  To fix this, use update-alternatives like so:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">0025<span class="sy0">|</span>z<span class="sy0">@</span>zentury ~$ <span class="kw2">sudo</span> update-alternatives <span class="re5">--config</span> x-cursor-theme
There are <span class="nu0">7</span> choices <span class="kw1">for</span> the alternative x-cursor-theme <span class="br0">&#40;</span>providing <span class="sy0">/</span>usr<span class="sy0">/</span>share<span class="sy0">/</span>icons<span class="sy0">/</span>default<span class="sy0">/</span>index.theme<span class="br0">&#41;</span>.
&nbsp;
  Selection    Path                                     Priority   Status
<span class="re5">------------------------------------------------------------</span>
<span class="sy0">*</span> <span class="nu0">0</span>            <span class="sy0">/</span>etc<span class="sy0">/</span>X11<span class="sy0">/</span>cursors<span class="sy0">/</span>oxy-white.theme          <span class="nu0">50</span>        auto mode
  <span class="nu0">1</span>            <span class="sy0">/</span>etc<span class="sy0">/</span>X11<span class="sy0">/</span>cursors<span class="sy0">/</span>core.theme               <span class="nu0">30</span>        manual mode
  <span class="nu0">2</span>            <span class="sy0">/</span>etc<span class="sy0">/</span>X11<span class="sy0">/</span>cursors<span class="sy0">/</span>handhelds.theme          <span class="nu0">20</span>        manual mode
  <span class="nu0">3</span>            <span class="sy0">/</span>etc<span class="sy0">/</span>X11<span class="sy0">/</span>cursors<span class="sy0">/</span>oxy-white.theme          <span class="nu0">50</span>        manual mode
  <span class="nu0">4</span>            <span class="sy0">/</span>etc<span class="sy0">/</span>X11<span class="sy0">/</span>cursors<span class="sy0">/</span>redglass.theme           <span class="nu0">20</span>        manual mode
  <span class="nu0">5</span>            <span class="sy0">/</span>etc<span class="sy0">/</span>X11<span class="sy0">/</span>cursors<span class="sy0">/</span>whiteglass.theme         <span class="nu0">20</span>        manual mode
  <span class="nu0">6</span>            <span class="sy0">/</span>usr<span class="sy0">/</span>share<span class="sy0">/</span>icons<span class="sy0">/</span>DMZ-Black<span class="sy0">/</span>cursor.theme   <span class="nu0">30</span>        manual mode
  <span class="nu0">7</span>            <span class="sy0">/</span>usr<span class="sy0">/</span>share<span class="sy0">/</span>icons<span class="sy0">/</span>DMZ-White<span class="sy0">/</span>cursor.theme   <span class="nu0">50</span>        manual mode
&nbsp;
Press enter to keep the current choice<span class="br0">&#91;</span><span class="sy0">*</span><span class="br0">&#93;</span>, or <span class="kw3">type</span> selection number:</pre></div></div>

<p>press &#8220;7&#8243; for the default</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/05/11/reseting-your-system-wide-cursor-theme-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>[SOLVED] konversation has no window decorations in GNOME and forces fullscreen</title>
		<link>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/</link>
		<comments>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/#comments</comments>
		<pubDate>Mon, 10 May 2010 04:29:40 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[konversation]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[irc chat]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=585</guid>
		<description><![CDATA[This was a very annoying bug for me to deal with and it almost caused me to switch to kde 4 earlier than planned. Luckily I was able to pull up a fix which is simple to replicate but was a pain in the arse to solve. To fix this, go into CompizConfig Settings Manager]]></description>
			<content:encoded><![CDATA[<p>This was a very annoying bug for me to deal with and it <a href="http://www.doknowevil.net/2010/02/23/in-search-of-better-window-management">almost caused me to switch to kde 4 earlier than planned</a>.  Luckily I was able to pull up a fix which is simple to replicate but was a pain in the arse to solve.</p>
<p>To fix this, go into CompizConfig Settings Manager >> Workarounds >> uncheck &#8220;Legacy Fullscreen Support&#8221; as the red circle in the screenshot below indicates.</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2010/05/to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this.png" rel="shadowbox[post-585];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2010/05/to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this.png" alt="" title="to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this" width="1015" height="625" class="alignnone size-full wp-image-586" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fastest way to install the media essentials in ubuntu</title>
		<link>http://www.doknowevil.net/2010/05/07/fastest-way-to-install-the-media-essentials-in-ubuntu/</link>
		<comments>http://www.doknowevil.net/2010/05/07/fastest-way-to-install-the-media-essentials-in-ubuntu/#comments</comments>
		<pubDate>Sat, 08 May 2010 02:37:13 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=593</guid>
		<description><![CDATA[If you&#8217;re coming from Windows, or like me, find yourself living in a live CD while you figure out which step went wrong; you&#8217;ll be interested in the essential media codecs, flash, java, Microsoft fonts, etc. I thought I&#8217;d share the way I did this as quickly as possible in in Ubuntu 10.04 using the]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re coming from Windows, or like me, find yourself living in a live CD while you figure out which step went wrong; you&#8217;ll be interested in the essential media codecs, flash, java, Microsoft fonts, etc.</p>
<p>I thought I&#8217;d share the way I did this as quickly as possible in in <a href="http://www.ubuntu.com" target="_blank">Ubuntu 10.04</a> using the command line.</p>
<p>Open up terminal, using ctrl+alt+t (Which I&#8217;m very happy about as this has been my default since 8.04). Alternativelty from the main menu -> Applications > Accessories > Terminal</p>
<p>Make a backup in case you&#8217;re scared, then remove the comments from repositories you need to unlock to access the restricted (proprietary) packages.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">ubuntu<span class="sy0">@</span>ubuntu:~$ <span class="kw2">sudo</span> <span class="kw2">cp</span> <span class="sy0">/</span>etc<span class="sy0">/</span>apt<span class="sy0">/</span>sources.list .
ubuntu<span class="sy0">@</span>ubuntu:~$ <span class="kw2">sudo</span> <span class="kw2">sed</span> <span class="re5">-i</span> <span class="st_h">'s/^# deb/deb/'</span> <span class="sy0">/</span>etc<span class="sy0">/</span>apt<span class="sy0">/</span>sources.list</pre></div></div>

<p>We do this be matching the first 2 characters with &#8216;# &#8216; and replacing them with &#8221; (nothing).  See the diff below (> indicate original lines, < are changed).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">&nbsp;
ubuntu<span class="sy0">@</span>ubuntu:~$ <span class="kw2">diff</span> sources.list <span class="sy0">/</span>etc<span class="sy0">/</span>apt<span class="sy0">/</span>sources.list
<span class="nu0">18</span>,23c18,<span class="nu0">23</span>
<span class="sy0">&lt;</span> <span class="co0"># deb http://archive.ubuntu.com/ubuntu lucid universe</span>
<span class="sy0">&lt;</span> <span class="co0"># deb-src http://archive.ubuntu.com/ubuntu lucid universe</span>
<span class="sy0">&lt;</span> <span class="co0"># deb http://archive.ubuntu.com/ubuntu lucid-updates universe</span>
<span class="sy0">&lt;</span> <span class="co0"># deb-src http://archive.ubuntu.com/ubuntu lucid-updates universe</span>
<span class="sy0">&lt;</span> <span class="co0"># deb http://security.ubuntu.com/ubuntu lucid-security universe</span>
<span class="sy0">&lt;</span> <span class="co0"># deb-src http://security.ubuntu.com/ubuntu lucid-security universe</span>
<span class="re5">---</span>
<span class="sy0">&gt;</span> deb http:<span class="sy0">//</span>archive.ubuntu.com<span class="sy0">/</span>ubuntu lucid universe
<span class="sy0">&gt;</span> deb-src http:<span class="sy0">//</span>archive.ubuntu.com<span class="sy0">/</span>ubuntu lucid universe
<span class="sy0">&gt;</span> deb http:<span class="sy0">//</span>archive.ubuntu.com<span class="sy0">/</span>ubuntu lucid-updates universe
<span class="sy0">&gt;</span> deb-src http:<span class="sy0">//</span>archive.ubuntu.com<span class="sy0">/</span>ubuntu lucid-updates universe
<span class="sy0">&gt;</span> deb http:<span class="sy0">//</span>security.ubuntu.com<span class="sy0">/</span>ubuntu lucid-security universe
<span class="sy0">&gt;</span> deb-src http:<span class="sy0">//</span>security.ubuntu.com<span class="sy0">/</span>ubuntu lucid-security universe
<span class="nu0">30</span>,35c30,<span class="nu0">35</span>
<span class="sy0">&lt;</span> <span class="co0"># deb http://archive.ubuntu.com/ubuntu lucid multiverse</span>
<span class="sy0">&lt;</span> <span class="co0"># deb-src http://archive.ubuntu.com/ubuntu lucid multiverse</span>
<span class="sy0">&lt;</span> <span class="co0"># deb http://archive.ubuntu.com/ubuntu lucid-updates multiverse</span>
<span class="sy0">&lt;</span> <span class="co0"># deb-src http://archive.ubuntu.com/ubuntu lucid-updates multiverse</span>
<span class="sy0">&lt;</span> <span class="co0"># deb http://security.ubuntu.com/ubuntu lucid-security multiverse</span>
<span class="sy0">&lt;</span> <span class="co0"># deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse</span>
<span class="re5">---</span>
<span class="sy0">&gt;</span> deb http:<span class="sy0">//</span>archive.ubuntu.com<span class="sy0">/</span>ubuntu lucid multiverse
<span class="sy0">&gt;</span> deb-src http:<span class="sy0">//</span>archive.ubuntu.com<span class="sy0">/</span>ubuntu lucid multiverse
<span class="sy0">&gt;</span> deb http:<span class="sy0">//</span>archive.ubuntu.com<span class="sy0">/</span>ubuntu lucid-updates multiverse
<span class="sy0">&gt;</span> deb-src http:<span class="sy0">//</span>archive.ubuntu.com<span class="sy0">/</span>ubuntu lucid-updates multiverse
<span class="sy0">&gt;</span> deb http:<span class="sy0">//</span>security.ubuntu.com<span class="sy0">/</span>ubuntu lucid-security multiverse
<span class="sy0">&gt;</span> deb-src http:<span class="sy0">//</span>security.ubuntu.com<span class="sy0">/</span>ubuntu lucid-security multiverse
<span class="sy0">&gt;</span>
&nbsp;
&nbsp;
<span class="sy0">&lt;</span>pre <span class="re2">lang</span>=<span class="st0">&quot;bash&quot;</span><span class="sy0">&gt;</span></pre></div></div>

<p>Now that we uncommented these lines, they will be read next time we update, so lets go ahead and do that now.  Once that is done, we can install the extras.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">ubuntu<span class="sy0">@</span>ubuntu:~$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> update
ubuntu<span class="sy0">@</span>ubuntu:~$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> ubuntu-restricted-extras</pre></div></div>

<p>Rock and roll.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/05/07/fastest-way-to-install-the-media-essentials-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RabbitVCS is the new Nautilus SVN</title>
		<link>http://www.doknowevil.net/2010/05/04/rabbitvcs-is-the-new-nautilus-svn/</link>
		<comments>http://www.doknowevil.net/2010/05/04/rabbitvcs-is-the-new-nautilus-svn/#comments</comments>
		<pubDate>Wed, 05 May 2010 01:59:14 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[nautilus]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=579</guid>
		<description><![CDATA[I should have written about this months ago. Readers have replied to my previous post about nautilus svn, which I claimed to be the first that didn&#8217;t suck. This is the evolution of it, RabbitVCS (Version Control System), which aims to use the same intuitive, integrated gui for other version control systems, such as git]]></description>
			<content:encoded><![CDATA[<p>I should have written about this months ago.  Readers have <a href="http://www.doknowevil.net/2009/04/28/nautilussvn-finally-an-svn-gui-for-linux-that-doesnt-totally-suck/">replied to my previous post about nautilus svn</a>, which I claimed to be the first that didn&#8217;t suck.  This is the evolution of it, <a href="http://www.rabbitvcs.org">RabbitVCS (Version Control System)</a>, which aims to use the same intuitive, integrated gui for other version control systems, such as <a href="http://en.wikipedia.org/wiki/Git_%28software%29" target="_blank">git</a> (check the <a href="http://wiki.rabbitvcs.org/wiki/about/roadmap">rabbitvcs roadmap</a> for details on expected support for different versioning system.</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2010/05/context_menu.png" rel="shadowbox[post-579];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2010/05/context_menu.png" alt="" title="context_menu" width="827" height="559" class="alignnone size-full wp-image-580" /></a><br />
credit to rabbitvcs for the screenshot</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/05/04/rabbitvcs-is-the-new-nautilus-svn/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Packages for nautilus you wish were installed by default in ubuntu</title>
		<link>http://www.doknowevil.net/2010/05/04/packages-for-nautilus-you-wish-were-installed-by-default-in-ubuntu/</link>
		<comments>http://www.doknowevil.net/2010/05/04/packages-for-nautilus-you-wish-were-installed-by-default-in-ubuntu/#comments</comments>
		<pubDate>Wed, 05 May 2010 01:46:27 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Application Management]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Freeware]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=550</guid>
		<description><![CDATA[Intro Thanks to a tip I picked up at Tombuntu about nautilus, after following up on a trick to add files to mocp through nautilus scripts trackback link from Hilltop Yodler (great article), when doing a google search for GiS for nautilus-actions (apt-get install nautilus-actions). I learned about 3 kick ass additions to the nautilus]]></description>
			<content:encoded><![CDATA[<h2>Intro</h2>
<p>Thanks to <a href="http://tombuntu.com/index.php/2007/07/12/install-useful-nautilus-menu-items/" title="See code block below" target="_blank">a tip I picked up at Tombuntu about nautilus</a>, after following up on a <a href="http://www.doknowevil.net/2009/11/08/using-nautilus-scripting-abilities-to-integrate-right-click-file-enqueues-with-mocp/">trick to add files to mocp through nautilus scripts</a> <a href="http://www.hilltopyodeler.com/blog/?p=279" title="more tricks to add files to with nautilus">trackback link from Hilltop Yodler (great article)</a>, when doing a google search for <a href="http://images.google.com/imgres?imgurl=http://linux.softpedia.com/screenshots/Nautilus-actions_2.png&#038;imgrefurl=http://linux.softpedia.com/progScreenshots/Nautilus-actions-Screenshot-4311.html&#038;usg=__HIOtTlLu0P59ZnwHEDslrgllk-Y=&#038;h=478&#038;w=610&#038;sz=166&#038;hl=en&#038;start=1&#038;sig2=To1WEzfgc0FLl-hS6ZIqjQ&#038;um=1&#038;itbs=1&#038;tbnid=jucsR2NLXFKcuM:&#038;tbnh=107&#038;tbnw=136&#038;prev=/images%3Fq%3Dnautilus%2Bactions%26um%3D1%26hl%3Den%26client%3Dfirefox-a%26sa%3DN%26rls%3Dcom.ubuntu:en-US:official%26tbs%3Disch:1&#038;ei=tLrgS-bUNcL98Ab0hPmlBw" title="LOL, this url _ What's a GiS for?">GiS for</a> <a href="http://www.grumz.net/?q=node/387" title="Nautilus Actions _ nautilus-actions">nautilus-actions</a> (apt-get install nautilus-actions).  I learned about 3 kick ass additions to the nautilus menu.  I realized <a href="http://fedoraproject.org/" target="_blank">Fedora Linux</a> and <a href="http://www.linuxmint.com/" target="_blank">Linux Mint</a> had some of these in their context menus but didn&#8217;t make the connection to <a href="http://www.ubuntu.com" target="_blank">ubuntu</a> until now.</p>
<h2>On with the Show</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> nautilus-open-terminal nautilus-image-converter nautilus-gksu</pre></div></div>

<p>for some kick ass options in the context (right click) menu of nautilus (your default file manager in ubuntu). For more information, check out the tombuntu article I linked above.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">pkill nautilus</pre></div></div>

<p>to restart nautilus and have the new packages in your context menu</p>
<h2>More</h2>
<p>If you&#8217;re interested in this, you&#8217;ll probably also like <a href="http://www.doknowevil.net/2010/05/04/adding-context-right-click-menu-options-to-nautilus-ubuntus-default-file-manager-with-nautilus-actions">my article about nautilus-actions</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/05/04/packages-for-nautilus-you-wish-were-installed-by-default-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding context (right click) menu options to nautilus (Ubuntu&#8217;s default file manager) with nautilus-actions</title>
		<link>http://www.doknowevil.net/2010/05/04/adding-context-right-click-menu-options-to-nautilus-ubuntus-default-file-manager-with-nautilus-actions/</link>
		<comments>http://www.doknowevil.net/2010/05/04/adding-context-right-click-menu-options-to-nautilus-ubuntus-default-file-manager-with-nautilus-actions/#comments</comments>
		<pubDate>Wed, 05 May 2010 01:46:22 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Application Management]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[nautilus]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=562</guid>
		<description><![CDATA[Intro Previously, I had written about enqueuing files with nautilus scripts. Since then, I have learned (and forgotten about) nautilus-actions. Which is a similar way to attack the issue but it using a more intuitive and decoration approach, as well as having the ability to be on the first level of the context menu hierarchy.]]></description>
			<content:encoded><![CDATA[<h2>Intro</h2>
<p>Previously, I had <a href="http://www.doknowevil.net/2009/11/08/using-nautilus-scripting-abilities-to-integrate-right-click-file-enqueues-with-mocp">written about enqueuing files with nautilus scripts</a>.  Since then, I have learned (and forgotten about) nautilus-actions.  Which is a similar way to attack the issue but it using a more intuitive and decoration approach, as well as having the ability to be on the first level of the context menu hierarchy.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> nautilus-actions
nautilus-actions-config</pre></div></div>

<p>The approach to getting the example of enqueuing files to mocp accomplished is a bit different using this approach as you don&#8217;t need to go through the script as you did before (though you can if you want, it&#8217;s an unnecessary step).  Here, as my screenshot shows, I directly call mocp from /usr/bin with the -a flag and use the $M variable the legend provided me with to pass a list of files and their full paths to mocp.</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2010/05/enqueue-to-moc-with-nautilus-actions.png" rel="shadowbox[post-562];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2010/05/enqueue-to-moc-with-nautilus-actions-1024x640.png" alt="" title="enqueue-to-moc-with-nautilus-actions" width="1024" height="640" class="alignnone size-large wp-image-570" /></a></p>
<p>You&#8217;ll also want to change the conditions on the Conditions tab.  I set it to allow multiple files from both folders and files.  The default is to allow only a single file.</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2010/05/nautilus-actions_conditions.png" rel="shadowbox[post-562];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2010/05/nautilus-actions_conditions.png" alt="" title="nautilus-actions_conditions" width="460" height="430" class="alignnone size-full wp-image-571" /></a></p>
<h2>More</h2>
<p>This article was inspired by <a href="http://www.hilltopyodeler.com/blog/?p=279">Making Life Easier With Scripts For Nautilus</a>. If you&#8217;re interested in this article, you&#8217;ll probably also like <a href="http://www.doknowevil.net/2010/05/04/apackages-for-nautilus-you-wish-were-installed-by-default-in-ubuntu">my article about nautilus packages you wish were installed by default in ubuntu</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2010/05/04/adding-context-right-click-menu-options-to-nautilus-ubuntus-default-file-manager-with-nautilus-actions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
