<?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; GNOME</title>
	<atom:link href="http://www.doknowevil.net/category/computers/software/operating-systems/linux/gnome-linux-operating-systems-software-computers/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>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>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>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>Make Screencasts in Ubuntu with gtk-recordmydesktop</title>
		<link>http://www.doknowevil.net/2009/05/30/make-screencasts-in-ubuntu-with-gtk-recordmydesktop/</link>
		<comments>http://www.doknowevil.net/2009/05/30/make-screencasts-in-ubuntu-with-gtk-recordmydesktop/#comments</comments>
		<pubDate>Sat, 30 May 2009 22:43:38 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=422</guid>
		<description><![CDATA[Yeah, the name sounds cliche but man oh man is this app slick. Compared to some of the others I tried, this one _just_worked_ and had the options I needed, plus more. sudo apt-get install gtk-recordmydesktop You can select a specific window or an arbitrary area and it compresses to ogv automatically. Here&#8217;s a quick]]></description>
			<content:encoded><![CDATA[<p>Yeah, the name sounds cliche but man oh man is this app slick.  Compared to some of the others I tried, this one _just_worked_ and had the options I needed, plus more.</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> gtk-recordmydesktop</pre></div></div>

<p><a href="http://www.doknowevil.net/wp-content/uploads/2009/05/screenshot-recordmydesktop-1.png" rel="shadowbox[post-422];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2009/05/screenshot-recordmydesktop-1-300x120.png" alt="screenshot-recordmydesktop-1" title="screenshot-recordmydesktop-1" width="300" height="120" class="alignnone size-medium wp-image-424" /></a></p>
<p>You can select a specific window or an arbitrary area and it compresses to ogv automatically.</p>
<p>Here&#8217;s a quick video I recorded in seconds &#8212; <a href="http://z.nexuizninjaz.com/videos/nst.ogv">http://z.nexuizninjaz.com/videos/nst.ogv</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2009/05/30/make-screencasts-in-ubuntu-with-gtk-recordmydesktop/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
<enclosure url="http://z.nexuizninjaz.com/videos/nst.ogv" length="3649452" type="video/ogg" />
		</item>
		<item>
		<title>Inspecting GTK dialogs with Parasite</title>
		<link>http://www.doknowevil.net/2009/05/20/inspecting-gtk-dialogs-with-parasite/</link>
		<comments>http://www.doknowevil.net/2009/05/20/inspecting-gtk-dialogs-with-parasite/#comments</comments>
		<pubDate>Wed, 20 May 2009 19:49:00 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[inspect]]></category>
		<category><![CDATA[parasite]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=383</guid>
		<description><![CDATA[Parasite is a program much like Firebug, except this is for GTK based applications. By opening a program with parasite enabled, you can literally click elements of the GUI to reveal their properties. The installation is pretty simple, open a terminal, clone the git repo, compile install and run. I like to make a folder]]></description>
			<content:encoded><![CDATA[<p><a href="http://chipx86.github.com/gtkparasite/" title="Parasite - Inspect GTK dialogs">Parasite</a> is a program much like <a href="http://getfirebug.com/" title="Firebug" target="_blank">Firebug</a>, except this is for GTK based applications.</p>
<p>By opening a program with parasite enabled, you can literally click elements of the GUI to reveal their properties.</p>
<p><a href="http://www.doknowevil.net/wp-content/uploads/2009/04/parasite.png" rel="shadowbox[post-383];player=img;"><img src="http://www.doknowevil.net/wp-content/uploads/2009/04/parasite-300x210.png" alt="parasite" title="parasite" width="300" height="210" class="alignnone size-medium wp-image-384" /></a></p>
<p>The installation is pretty simple, open a terminal, clone the git repo, compile install and run.  I like to make a folder for software I checkout from SVN or Git in my home dir so I don&#8217;t get things all messy.  You need git to clone, so if you don&#8217;t have it installed already:</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> git-core</pre></div></div>

<p>Clone it:</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">mkdir</span> ~<span class="sy0">/</span>git_software <span class="sy0">&amp;&amp;</span> <span class="kw3">cd</span> ~<span class="sy0">/</span>git_software <span class="sy0">&amp;&amp;</span> git clone git:<span class="sy0">//</span>github.com<span class="sy0">/</span>chipx86<span class="sy0">/</span>gtkparasite</pre></div></div>

<p>Compile and install it:</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="sy0">/</span>autogen.sh <span class="sy0">&amp;&amp;</span> <span class="kw2">make</span> <span class="sy0">&amp;&amp;</span> <span class="kw2">sudo</span> <span class="kw2">make</span> <span class="kw2">install</span></pre></div></div>

<p>I run 64bit, so I had to do the following command to get things working:</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">cp</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>lib<span class="sy0">/</span>gtk-<span class="nu0">2.0</span> <span class="sy0">/</span>usr<span class="sy0">/</span>lib64<span class="sy0">/</span> <span class="re5">-r</span></pre></div></div>

<p>Try it out (prefix an application name with GTK_MODULES=gtkparasite):</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="re2">GTK_MODULES</span>=gtkparasite gedit</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2009/05/20/inspecting-gtk-dialogs-with-parasite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reverting two Ubuntu features &#8216;removed&#8217; in 9.04</title>
		<link>http://www.doknowevil.net/2009/05/16/reverting-two-ubuntu-features-removed-in-904/</link>
		<comments>http://www.doknowevil.net/2009/05/16/reverting-two-ubuntu-features-removed-in-904/#comments</comments>
		<pubDate>Sat, 16 May 2009 17:29:09 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Organization]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/?p=396</guid>
		<description><![CDATA[Ubuntu Jaunty 9.04 has many improvements on the prior release of Intrepid 8.10, however 2 things were removed that I didn&#8217;t agree with. They are pretty easy to change back so I wanted to share them with you all. Update Notifier in system tray I guess the idea behind this change was intended to make]]></description>
			<content:encoded><![CDATA[<p>Ubuntu Jaunty 9.04 has many improvements on the prior release of Intrepid 8.10, however 2 things were removed that I didn&#8217;t agree with.  They are pretty easy to change back so I wanted to share them with you all.</p>
<h2>Update Notifier in system tray</h2>
<p>I guess the idea behind this change was intended to make updates more obvious&#8230; but to power-users like myself, I consider it an annoyance.  Every time I&#8217;d run apt-get, a &#8220;update yo shiz&#8221; window would pop up above my terminal and anger me.  I&#8217;m not the stupid windows user Ubuntu&#8217;s starting to treat me like.  I just don&#8217;t have time for updates that require a restart in the middle of the day when I&#8217;m trying to get some work done.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">gconftool <span class="re5">-s</span> <span class="re5">--type</span> bool <span class="sy0">/</span>apps<span class="sy0">/</span>update-notifier<span class="sy0">/</span>auto_launch <span class="kw2">false</span></pre></div></div>

<p><a href="https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/332945">tip from launchpad</a></p>
<h2>Ctrl+Alt+Backspace</h2>
<p>This would classically restart X&#8230; but for some reason they removed this as well?!?! Whatever, here&#8217;s how to fix it.</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">aptitude</span> <span class="kw2">install</span> dontzap <span class="sy0">&amp;&amp;</span> <span class="kw2">sudo</span> dontzap –d</pre></div></div>

<p><a href="http://chrisjohnston.org/2009/re-enable-ctrl-alt-backspace-904">tip from Chris Johnston</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2009/05/16/reverting-two-ubuntu-features-removed-in-904/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
