<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Daemon Dancing in the Dark</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/" />
    <link rel="self" type="application/atom+xml" href="http://linux.amazingdev.com/blog/atom.xml" />
    <id>tag:linux.amazingdev.com,2010-10-20:/blog/1</id>
    <updated>2012-10-18T13:40:50Z</updated>
    <subtitle>Wherein one man comments upon his journey to Open OS (and Free Beer) nirvana.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 5.031</generator>

<entry>
    <title>chvt magic</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/001599.html" />
    <id>tag:linux.amazingdev.com,2012:/blog//1.1599</id>

    <published>2012-10-18T13:35:47Z</published>
    <updated>2012-10-18T13:40:50Z</updated>

    <summary>Arch Linux logo (Photo credit: Wikipedia)Found out about a nice new command - chvt. I am using Synergy these days instead of my KVM (something that will be the subject of another, much longer post), which doesn&apos;t send Ctrl-Alt-Fn to the client machines. Which normally isn&apos;t a problem, because it...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<div class="zemanta-img mt-image-left" style="margin: 1em; display: block; float: left; width: 75px;"><a href="http://commons.wikipedia.org/wiki/File:Archlinux-vert-dark.svg" target="_blank"><img class="zemanta-img-configured" src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Archlinux-vert-dark.svg/75px-Archlinux-vert-dark.svg.png" alt="Arch Linux logo" height="57" width="75" /></a><p class="zemanta-img-attribution" style="font-size:0.8em">Arch Linux logo (Photo credit: <a target="_blank" href="http://commons.wikipedia.org/wiki/File:Archlinux-vert-dark.svg">Wikipedia</a>)</p></div>Found out about a nice new command - chvt. I am using <a class="zem_slink" href="http://synergy-foss.org/" title="Synergy (software)" rel="homepage" target="_blank">Synergy</a> these days instead of my KVM (something that will be the subject of another, much longer post), which doesn't send Ctrl-Alt-Fn to the client machines. Which normally isn't a problem, because it only works if you are running X, so it wouldn't work anyway from a virtual terminal.<br /><br />But in this case, it is a virtual machine running <a class="zem_slink" href="http://www.archlinux.org/" title="Arch Linux" rel="homepage" target="_blank">Arch Linux</a> (the Synergy client machine is running Windows 7), so changing <a class="zem_slink" href="http://en.wikipedia.org/wiki/Virtual_terminal" title="Virtual terminal" rel="wikipedia" target="_blank">virtual terminals</a> would be fine. So I needed to find a way to change virtual terminals besides using the Ctrl-Alt-Fn keystrokes.<br /><br />Enter the 'chvt' command. It needs to be run as the superuser, so issuing this command swaps the virtual terminal to terminal 2:<br /><br /><code>$ sudo chvt 2</code><br /><br />So now I can swap virtual terminals in virtual machines even if I can't get the fancy keystrokes to go through to them.<br /><br /><a href="http://linux.die.net/man/1/chvt">chvt(1): change foreground virtual terminal - Linux man page</a>

<div><br /></div>

<div style="margin-top:10px;height:15px" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/?px" title="Enhanced by Zemanta"><img style="border:none;float:right" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=e4ccec05-a96f-40cc-89a2-f2579114ba89" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>Shuffling Wallpaper</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/001598.html" />
    <id>tag:linux.amazingdev.com,2012:/blog//1.1598</id>

    <published>2012-10-10T15:16:27Z</published>
    <updated>2012-10-10T16:03:12Z</updated>

    <summary>I was looking into getting a little more random for my wallpaper and decided to write a quickie little commandline to get a couple new random pictures from my wallpaper directory. Looking at how the conkyPhotoRandom script from conky-colors does it, I came up with: $ find /home/jdarnold/data/wallpapers -type f...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Command Help" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<div class="zemanta-img mt-image-center" style="margin: 1em auto; display: block; float: none; width: 300px;"><a href="http://commons.wikipedia.org/wiki/File:PNG_transparency_demonstration_1.png" target="_blank"><img class="zemanta-img-configured" src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/300px-PNG_transparency_demonstration_1.png" alt="English: PNG transparency demonstration 24bit ..." height="225" width="300" /></a></div>I was looking into getting a little more random for my wallpaper and decided to write a quickie little commandline to get a couple new random pictures from my wallpaper directory. Looking at how the conkyPhotoRandom script from <a href="http://helmuthdu.deviantart.com/art/CONKY-COLORS-244793180">conky-colors</a> does it, I came up with:<br /><br />

<code>$ find /home/jdarnold/data/wallpapers -type f \( -name "*.jpg" -or -name "*.png" -or&nbsp; -name "*.JPG" \) -print0 | shuf -z -n2 |xargs -0 feh --bg-scale</code>

<br /><br />The cool part of this is the <i>shuf</i> command, which I didn't know about (or, just as likely, knew but forgot about). So this feeds a list of files from my wallpaper folder and randomly chooses two of them. I use 2 because I have 2 monitors, each displaying 1920x1080 and the '<a href="http://feh.finalrewind.org/">feh</a>' command takes two files and scales them for my background. Maybe I'll just set this as an alias and do it whenever I think of it.<br /><br />Edited: Of course, you have to take into account spaces in the filenames. So I had to add the various options that use \0 as a line delimiter, rather than \n. In this case, -print0 tells <i>find</i> to end each line with a \0, -z tells <i>shuf</i> the lines end in \0, as does the -0 option for <i>xargs</i>.<br /><br /><a href="http://linux.die.net/man/1/shuf">shuf(1): make random permutations - Linux man page</a><br /><br />

<fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://whatsonmypc.wordpress.com/2012/09/29/wallpaper89/" target="_blank">Wallpaper of the Week (#89)</a> (whatsonmypc.wordpress.com)</li><li class="zemanta-article-ul-li"><a href="http://www.webupd8.org/2012/10/keep-yout-desktop-fresh-with-variety.html" target="_blank">Keep Yout Desktop Fresh With Variety Wallpaper Changer</a> (webupd8.org)</li></ul></fieldset>

<div style="margin-top:10px;height:15px" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/?px" title="Enhanced by Zemanta"><img style="border:none;float:right" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=ea8c519d-af4e-41a1-8b4d-a40313d61468" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>Off To Goomwwm Land</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/001597.html" />
    <id>tag:linux.amazingdev.com,2012:/blog//1.1597</id>

    <published>2012-10-03T18:17:07Z</published>
    <updated>2012-10-03T18:52:02Z</updated>

    <summary>I decided to try a new window manager [1], just because I hadn&apos;t wasted enough time on just fiddling with Conky [2]. I&apos;m not really into a tiling window managers, even though I have plenty of display space (2 1920x1080 monitors). I had been reading in the Arch forums about...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p style="text-align: left;">I decided to try a new <a href="http://xwinman.org/intro.php">window manager</a> [1], just because I hadn't wasted enough time on just fiddling with <a href="http://conky.sourceforge.net/">Conky</a> [2]. I'm not really into a <a class="zem_slink" href="http://en.wikipedia.org/wiki/Tiling_window_manager" title="Tiling window manager" rel="wikipedia" target="_blank">tiling window managers</a>, even though I have plenty of display space (2 1920x1080 monitors). I had been reading in the Arch forums about <a href="https://bbs.archlinux.org/viewtopic.php?id=144038">GOOMWWM</a> [3] (Get Out Of My Way <a class="zem_slink" href="http://en.wikipedia.org/wiki/Window_manager" title="Window manager" rel="wikipedia" target="_blank">Window Manager</a>) and looking at the <a href="http://aerosuidae.net/goomwwm/">goomwwm</a> web page for it[4] made me think that despite its newness, it looked relatively complete, especially with <a href="http://en.wikipedia.org/wiki/Xinerama">Xinerama</a> [5] support for my dual monitor setup. So I decided to give it a try.</p>
Trying a new window manager isn't really that big a deal, especially if you are like me and are <del>lazy</del> hardcore enough to not bother to install a login manager like <a href="slim.berlios.de">SLiM</a> and just log in to a text terminal and type <em>startx</em> to bring up X. You just change the window manager that gets exec'd at the end of your .xinitc script to be the one you want. So I changed<br /><br /><blockquote>exec ck-launch-session dbus-launch openbox-session<br /></blockquote>to be<br /><br /><blockquote>exec ck-launch-session dbus-launch `which goomwwm`<br /></blockquote>and off I went! To be honest, I'm not really sure (a) what the "ck-launch-session dbus-launch" part of the command does or (b) if I really need it (as I just copied it from the <a href="https://wiki.archlinux.org/index.php/Openbox">openbox Arch wiki page</a>), but I left it in there for safety's sake.<br /><br />But with nothing set up, it merely brings you to a blank, black screen. And, as I didn't have '<a href="http://www.archlinux.org/packages/community/x86_64/dmenu/">dmenu</a>' [6] installed (it should be, I think, at least an optional dependency, as it is prominently featured in the <a href="http://aerosuidae.net/goomwwm/tutorial">GOOMWWM tutorial</a> [7]), I couldn't really do anything!<br /><br />So I went back to the command line and installed <em>dmenu</em> and followed the tutorial, and lo, it was good. Window control is a little more painful with the mouse as you have to hold down the Mod key (left Windows key by default) but is a snap with the keyboard, so that's okay. The concept of tags for windows that correspond to desktops in other window managers again takes some getting used to but works very well in practice. It's especially nice to be able to bring up a window on another "desktop" by merely clicking on it.<br /><br />So then I spent way too much time getting things somewhat customized. I still like blue for a desktop color, so I went over to The Paper Wall to find a few interesting wallpapers and settled on a <a href="http://thepaperwall.com/wallpaper.php?view=5cddb00435b4ffd1a4d7a08d351723dcee9a3f7d&amp;fol=nature">blue forest</a> [8] as my left desktop and a nice <a href="http://thepaperwall.com/wallpaper.php?view=3b66596749f5d2b44356207bc05a9be32eaa9219&amp;fol=cityscape">waterfront view of Boston</a> [9] as my right desktop.<br /><br />Then I went a Conky customizing, which is an endless time sink if there ever was one. Luckily, I discovered this great Conky customizing script called '<a href="https://github.com/helmuthdu/conky_colors">conky-colors</a>' [10]. Basically, you pass in a <span style="color: #999999;">few</span> (or more!) parameters and it creates a stock Conky config file with support scripts and everything. I eventually settled on this for a conky-colors command line:<br /><br /><blockquote>$ conky-colors --cputemp --theme=human --arch --cpu=4 --proc=5 --clementine=vinyl --calendar --nvidia --hd=default --weather=USMA0245 --photord --network --unit=F --clock=modern --side=left<br /></blockquote>And then I modified away, mostly to just get the right colors (<span style="color: #3366ff;">more blue</span>!). That's the panel on the left side of the right hand screen. It shows system info, a calendar and clock, a random picture from a folder, what my media player (Clementine) is currently playing, and some more system stats.<br /><br />Then I finally found a script that generated a good Conky weather forecast pane in conkywx[11]. There were a few bumps in the road, but I got them ironed out with the help of the author in the Arch forums and now I have a nice weather panel in the lower right.
<br /><br />So now I just need to get used to goomwwm. I like being able to quickly and easily use the keyboard to move and resize the windows, and even fill the blank space. It can behave a little like a tiling window manager, with commands for windows to swap position, share a position, etc, which I haven't played with much.<br /><br />It also has a unique idea about "desktops". You can tag any window with a number between 1 and 9 and then hit Alt-F[1-9] to bring all those windows with that tag number to the front. The others are still there but just behind. So it is easy to assign windows to different tags and swap between them, but you can also use very easily use windows with other tags by just clicking on them. And goomwwm tells other tools (like Conky) that the tag selected is the "desktop". Works pretty well.<br /><br />[1] <a href="http://xwinman.org/intro.php">http://xwinman.org/intro.php</a><br />[2] <a href="http://conky.sourceforge.net/">http://conky.sourceforge.net/</a><br />[3] <a href="https://bbs.archlinux.org/viewtopic.php?id=144038">https://bbs.archlinux.org/viewtopic.php?id=144038</a><br />[4] <a href="http://aerosuidae.net/goomwwm/">http://aerosuidae.net/goomwwm/</a><br />[5] <a href="http://en.wikipedia.org/wiki/Xinerama">http://en.wikipedia.org/wiki/Xinerama</a><br />[6] <a href="http://www.archlinux.org/packages/community/x86_64/dmenu/">http://www.archlinux.org/packages/community/x86_64/dmenu/</a><br />[7] <a href="http://aerosuidae.net/goomwwm/tutorial">http://aerosuidae.net/goomwwm/tutorial</a><br />[8] <a href="http://thepaperwall.com/wallpaper.php?view=5cddb00435b4ffd1a4d7a08d351723dcee9a3f7d&amp;fol=nature">http://thepaperwall.com/wallpaper.php?view=5cddb00435b4ffd1a4d7a08d351723dcee9a3f7d&amp;fol=nature</a><br />[9] <a href="http://thepaperwall.com/wallpaper.php?view=3b66596749f5d2b44356207bc05a9be32eaa9219&amp;fol=cityscape">http://thepaperwall.com/wallpaper.php?view=3b66596749f5d2b44356207bc05a9be32eaa9219&amp;fol=cityscape</a><br />[10] <a href="https://github.com/helmuthdu/conky_colors">https://github.com/helmuthdu/conky_colors</a><br />[11] <a href="https://bitbucket.org/plikhari/conkywx_pub/overview">https://bitbucket.org/plikhari/conkywx_pub/overview</a><br /><br />My October screenshots. Click to embiggen.<br /><br />Clean:<br /><a href="http://minus.com/l7Z6OSw4c4LVG"><img class="aligncenter" title="Clean desktop" src="http://i.minus.com/j7Z6OSw4c4LVG_xs.jpg" alt="" height="138" width="230" /></a>
<br /><br />Dirty:<br /><a class="aligncenter" title="Dirty desktop" href="http://minus.com/lWZ3FeH5sSN9K"><img class="aligncenter" title="Dirty desktop" src="http://i.minus.com/jWZ3FeH5sSN9K_xs.jpg" alt="" height="138" width="230" /></a><fieldset class="zemanta-related"><legend class="zemanta-related-title"><br />Related articles</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://freshfoo.com/blog/tiling_addiction" target="_blank">Tiling addiction</a> (freshfoo.com)</li><li class="zemanta-article-ul-li"><a href="http://vincent.bernat.im/en/blog/2012-awesome-wm.html" target="_blank">Switching to the awesome window manager</a> (vincent.bernat.im)</li><li class="zemanta-article-ul-li"><a href="http://www.ubuntuvibes.com/2012/08/dwm-adds-tiled-window-management-to-vim.html" target="_blank">DWM Adds Tiled Window Management to Vim</a> (ubuntuvibes.com)</li><li class="zemanta-article-ul-li"><a href="http://anthonyvenable110.wordpress.com/2012/08/28/openbox-a-lightweight-uber-flexible-desktop-for-linux/" target="_blank">Openbox - a lightweight uber-flexible desktop for Linux</a> (anthonyvenable110.wordpress.com)</li></ul></fieldset>

<div style="margin-top:10px;height:15px" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/?px" title="Enhanced by Zemanta"><img style="border:none;float:right" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=669d144c-7134-489c-9c61-f0f333c55404" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>My Broken Hardware</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/001594.html" />
    <id>tag:linux.amazingdev.com,2012:/blog//1.1594</id>

    <published>2012-08-17T02:50:16Z</published>
    <updated>2012-08-17T02:59:09Z</updated>

    <summary>So I had a hard drive disaster last week. This came hard on the heels of my 14 month old video card biting the dust. I should have know there was something up, when my Windows installation went belly up. I had been getting tons of errors whenever my Arch...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[So I had a hard drive disaster last week. This came hard on the heels of my 14 month old video card biting the dust. I should have know there was something up, when my Windows installation went belly up. I had been getting tons of errors whenever my Arch boot would do a fsck, but I still soldiered on.<br /><br />And then my video card died. First X Windows on Arch would freeze when I tried to run it, then even Windows started getting weird artifacts and tears, until finally it just would boot into 640x480 256 color mode. Do you even remember how ugly that is?<br /><br />So I bought a new nVidia <a class="zem_slink" href="http://www.evga.com/" title="EVGA Corporation" rel="homepage" target="_blank">EVGA</a> 560ti card. My EVGA 560 was just past the warranty - 14 months (although it sure felt like less). I wanted to upgrade a little bit but I surely didn't need cutting edge, so I went with the 560ti. I like the 560 - it seems to be powerful enough to play the most recent games, yet only requires one slot and no funky power options necessary.<br /><br />But I broke Windows somehow. Soon I got the dreaded "<a href="http://answers.microsoft.com/en-us/windows/forum/windows_7-system/windows-7-black-screen-when-booting-up/93a2c6e2-9418-4f45-b217-2a152fcce665">black screen of death</a>" (bet you didn't know there was one of those) where it boots but then after the splash screen goes away, it just shows black. And even a Microsoft MVP says you might have to reinstall Windows to fix it. <br /><br />And I tried <b>everything</b> to fix my Windows install, all to no avail. But as I only have Windows 7 installed to play games, and the games are all installed on another partition (and these days, most save games are actually in the cloud, esp. for Steam), I figured it wouldn't be a big deal to reinstall Windows. Just start over, which is always a good idea with Windows anyway.<br /><br />So I reinstalled Windows and got everything set back up. Takes forever to install, and forever to download all the patches (and it doesn't recognize my r8169 Gigabit Ethernet card out of the box either, so I had to go on a quest for my motherboard's device CD). But I finally got it set up and working.<br /><br />But of course then I had to get back into <a href="http://www.archlinux.org/">Arch</a> as Windows loves to overwrite the boot sector. But by now I am getting pretty good at reinstalling GRUB and using the standard Grub 0.9 commands:<br /><br /><blockquote><codec>grub&gt; find /boot/grub/stage1</codec><br /><codec>&nbsp;(hd0,0)</codec><br /><codec>&nbsp;(hd0,3)</codec><br /><codec>grub&gt; root (hd0)</codec><br /><codec>grub&gt; setup (hd0,3)</codec><br /><codec>....</codec><br /><codec>grub&gt; quit</codec><br /><codec></codec></blockquote><codec><br />and I was back into Arch. I was finally back in business.<br /><br />Until about a week later, when I started getting really weird hard drive errors and then BAM! the hard drive just wouldn't boot. This is a 120gb SSD drive that was bought the same time as my video card when I built my new system. And it too was <a href="http://english.stackexchange.com/questions/58788/what-does-deader-than-a-doornail-mean">deader than a doornail</a>.<br /><br />Ugh. But again, I was pretty safe because my /home was on another partition and really, the only thing on the SSD were my two OS partitions, one for <a href="http://www.archbang.org/">ArchBang</a> and one for Windows 7. Which I had, of course, just finished reinstalling and getting setup last week :(<br /><br />So I decided enough with the "cutting edge" SSDs. I needed a hard drive and I needed it now, so my choices were to buy another 120gb SSD hard drive for $140 or buy a 1TB "green" hard drive for $80. I just couldn't see forking over an extra $60 for an SSD that had about 1/10 the space (although I really didn't need to space as I have a 2tb drive already in there). So I went with the big old technology.<br /><br />I opened up the case and pulled out the dead SSD. And it was then I noticed what perhaps is the culprit for my dead hardware - 2 of the 3 case fans were not running. I hadn't noticed them when I put together my new computer in the very nice <a class="zem_slink" href="http://www.coolermaster.com/" title="Cooler Master" rel="homepage" target="_blank">Cooler Master</a> tower I have and thus didn't plug them in. And it is rather warm in the summer down here in my nearly windowless lair, which also wouldn't help.<br /><br />So I got my fans plugged in and my hard drive hooked up and settled down to another install fest.<br /><br /><i>To Be Continued</i>...<br /></codec><br /><fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="https://wiki.archlinux.org/index.php?title=Windows_and_Arch_Dual_Boot&amp;diff=218180&amp;oldid=212210" target="_blank">Windows and Arch Dual Boot</a> (wiki.archlinux.org)</li><li class="zemanta-article-ul-li"><a href="http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/428709/making-grub-default-other-than-mbr" target="_blank">Making Grub default other than MBR</a> (daniweb.com)</li><li class="zemanta-article-ul-li"><a href="https://wiki.archlinux.org/index.php?title=Master_Boot_Record&amp;diff=217590&amp;oldid=206624" target="_blank">Master Boot Record</a> (wiki.archlinux.org)</li></ul></fieldset><div><br /></div>

<div style="margin-top:10px;height:15px" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/?px" title="Enhanced by Zemanta"><img style="border:none;float:right" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=45891b58-1a04-4020-bf27-6010ab645a3b" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>ffmpeg tutorial code</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/001582.html" />
    <id>tag:linux.amazingdev.com,2011:/blog//1.1582</id>

    <published>2011-09-28T18:23:45Z</published>
    <updated>2011-09-28T19:25:04Z</updated>

    <summary>I&apos;ve been doing a lot of ffmpeg programming lately and have been finding it extremely painful. There just isn&apos;t much for help out there, certainly no real documentation for using the viatal avcodec library. &apos;dranger&apos; has about the only comprehensive tutorial around and it&apos;s showing its age at this point....</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Code" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[I've been doing a lot of <a href="http://www.ffmpeg.org/">ffmpeg</a> programming lately and have been finding it extremely painful. There just isn't much for help out there, certainly no real documentation for using the viatal <i>avcodec</i> library. <br /><br />'<a href="https://dranger.com/ffmpeg/">dranger</a>' has about the only comprehensive tutorial around and it's showing its age at this point. There's a few newer notes about updating it, but even those don't cover the latest libavcodec API changes. So I figured I would throw out my version of the first tutorial file, tutorial01.c. The most important change is replacing the long excised <i>img_convert</i> call with the <i>sws_scale</i> call (which also requires creating the <i>SwsContext</i> object). I also just tweaked a couple of the calls to remove any deprecated API calls.<br /><br />Have at it!<br /><br />You can build it with the following command:<br /><br />

<pre>$ &nbsp;&nbsp;&nbsp; gcc&nbsp; -o tutorial01 tutorial01.c -lavutil -lavformat -lavcodec -lz -lavutil -lswscale -lz<br /></pre>

Download it here: <a href="http://linux.amazingdev.com/blog/archives/2011/09/28/tutorial01.c">tutorial01.c</a><br /><br />
<pre>// tutorial01.c
// Code based on a tutorial by Martin Bohme (boehme@inb.uni-luebeckREMOVETHIS.de)
// Tested on Gentoo, CVS version 5/01/07 compiled with GCC 4.1.1

// A small sample program that shows how to use libavformat and libavcodec to
// read video from a file.
//
// Use
//
// gcc -o tutorial01 tutorial01.c -lavformat -lavcodec -lz
//
// to build (assuming libavformat and libavcodec are correctly installed
// your system).
//
// Run using
//
// tutorial01 myvideofile.mpg
//
// to write the first five frames from "myvideofile.mpg" to disk in PPM
// format.

#include <libavcodec avcodec.h="">
#include <libavformat avformat.h="">
#include <libswscale swscale.h="">
#include <stdio.h>

void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame) {
  FILE *pFile;
  char szFilename[32];
  int  y;
  
  // Open file
  sprintf(szFilename, "frame%d.ppm", iFrame);
  pFile=fopen(szFilename, "wb");
  if(pFile==NULL)
    return;
  
  // Write header
  fprintf(pFile, "P6\n%d %d\n255\n", width, height);
  
  // Write pixel data
  for(y=0; y<height; y++)="" fwrite(pframe-="">data[0]+y*pFrame-&gt;linesize[0], 1, width*3, pFile);
  
  // Close file
  fclose(pFile);
}

int main(int argc, char *argv[]) {
  AVFormatContext *pFormatCtx=NULL;
  int             i, videoStream;
  AVCodecContext  *pCodecCtx;
  AVCodec         *pCodec;
  AVFrame         *pFrame; 
  AVFrame         *pFrameRGB;
  AVPacket        packet;
  int             frameFinished;
  int             numBytes;
  uint8_t         *buffer;
  struct SwsContext *img_convert_ctx;
  int frameCount=0;
  
  if(argc &lt; 2) {
    printf("Please provide a movie file\n");
    return -1;
  }
  // Register all formats and codecs
  av_register_all();
  
  // Open video file
  if(avformat_open_input(&amp;pFormatCtx, argv[1], NULL, NULL)!=0)
    return -1; // Couldn't open file
  
  // Retrieve stream information
  if(av_find_stream_info(pFormatCtx)&lt;0)
    return -1; // Couldn't find stream information
  
  // Dump information about file onto standard error
  av_dump_format(pFormatCtx, 0, argv[1], 0);
  
  // Find the first video stream
  videoStream=-1;
  for(i=0; i<pformatctx->nb_streams; i++)
    if(pFormatCtx-&gt;streams[i]-&gt;codec-&gt;codec_type==CODEC_TYPE_VIDEO) {
      videoStream=i;
      break;
    }
  if(videoStream==-1)
    return -1; // Didn't find a video stream
  
  // Get a pointer to the codec context for the video stream
  pCodecCtx=pFormatCtx-&gt;streams[videoStream]-&gt;codec;
  
  // Find the decoder for the video stream
  pCodec=avcodec_find_decoder(pCodecCtx-&gt;codec_id);
  if(pCodec==NULL) {
    fprintf(stderr, "Unsupported codec!\n");
    return -1; // Codec not found
  }
  // Open codec
  if(avcodec_open(pCodecCtx, pCodec)&lt;0)
    return -1; // Could not open codec
  
  // Allocate video frame
  pFrame=avcodec_alloc_frame();
  
  // Allocate an AVFrame structure
  pFrameRGB=avcodec_alloc_frame();
  if(pFrameRGB==NULL)
    return -1;
  
  // Determine required buffer size and allocate buffer
  numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx-&gt;width,
                              pCodecCtx-&gt;height);
  buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
  
  // Assign appropriate parts of buffer to image planes in pFrameRGB
  // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
  // of AVPicture
  avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
                 pCodecCtx-&gt;width, pCodecCtx-&gt;height);
  
  int w = pCodecCtx-&gt;width;
  int h = pCodecCtx-&gt;height;
  img_convert_ctx = sws_getContext(
    w, 
    h, 
    pCodecCtx-&gt;pix_fmt, 
    w, 
    h, 
    PIX_FMT_RGB24, 
    SWS_BICUBIC,
    NULL, 
    NULL, 
    NULL);

  // Read frames and save first five frames to disk
  i=0;
  while(av_read_frame(pFormatCtx, &amp;packet)&gt;=0) {
    // Is this a packet from the video stream?
    if(packet.stream_index==videoStream) {
      // Decode video frame
      int len = avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished, &amp;packet);
      if ( len &lt; 0 )
      {
        fprintf(stderr, "Problems decoding frame\n");
        return 1;
      }

      fprintf(stderr, "len = %d\n", len );
      
        
      
      // Did we get a video frame?
      if(frameFinished) {
        ++frameCount;
        
        fprintf(stderr, "Saving frame %d\n", frameCount);
        
#if 0 // this is the old code
        img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24, 
                    (AVPicture*)pFrame, pCodecCtx-&gt;pix_fmt, 
                    pCodecCtx-&gt;width, pCodecCtx-&gt;height);
#else
        sws_scale(
          img_convert_ctx, 
          (const uint8_t* const*)pFrame-&gt;data, 
          pFrame-&gt;linesize, 
          0, 
          pCodecCtx-&gt;height, 
          pFrameRGB-&gt;data,
          pFrameRGB-&gt;linesize);
#endif
        
        // Save the frame to disk
        if(++i&lt;=5)
          SaveFrame(pFrameRGB, pCodecCtx-&gt;width, pCodecCtx-&gt;height, 
                    i);
      }
    }
    
    // Free the packet that was allocated by av_read_frame
    av_free_packet(&amp;packet);
  }
  
  // Free the RGB image
  av_free(buffer);
  av_free(pFrameRGB);
  
  // Free the YUV frame
  av_free(pFrame);
  
  // Close the codec
  avcodec_close(pCodecCtx);
  
  // Close the video file
  av_close_input_file(pFormatCtx);
  
  return 0;
}
</pformatctx-></height;></stdio.h></libswscale></libavformat></libavcodec></pre>

<fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://www.ghacks.net/2011/09/07/whats-the-difference-between-a-codec-container-and-video-format/">What's The Difference Between A Codec, Container And Video Format?</a> (ghacks.net)</li><li class="zemanta-article-ul-li"><a href="http://ffmpeg.arrozcru.org/autobuilds/">Automated FFmpeg Builds</a> (ffmpeg.arrozcru.org)</li></ul></fieldset>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=6e9632ea-6978-4897-acc4-bb37f218e7ce" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>My Little Menu</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/001538.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.1538</id>

    <published>2010-11-01T18:18:28Z</published>
    <updated>2010-11-01T18:42:41Z</updated>

    <summary>One of the main reasons I was looking for a launch bar was that I created a menu for all my DOS games, using mygtkmenu. Once you create this menu, it just cries out for somewhere to attach it, and wbar fits the bill perfectly. I have a bunch of...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="dosbox" label="DOSBox" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="goodoldgames" label="Good Old Games" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mygtkmenu" label="mygtkmenu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="uitweaks" label="ui tweaks" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>One of the main reasons I was looking for a launch bar was that I created a menu for all my DOS games, using <a href="http://sites.google.com/site/jvinla/mygtkmenu">mygtkmenu</a>. Once you create this menu, it just cries out for somewhere to attach it, and <a href="http://code.google.com/p/wbar/">wbar</a> fits the bill perfectly.</p>

<p>I have a bunch of old DOS (redundant much?) games that I decided to install. In addition to the ones I own (including the priceless Definitive Wargame Collection), the wonderful <a href="http://www.gog.com/">Good Old Games</a> site ships several of theirs using <a class="zem_slink" href="http://www.dosbox.com/" title="DOSBox" rel="homepage">DOSBox</a> and even <a href="http://www.steampowered.com/">Steam</a> uses it for classics like "X-COM : UFO".</p>

<p>First I would create a short script file to run the game. Due to a bug in the X.org driver, it required a work around; namely, telling SDL (the library used by DOSBox) to not "DGA" mouse (or draw directly to video memory). It seems to be fixed so i took it out.</p>

<pre>#! /bin/bash
#export SDL_VIDEO_X11_DGAMOUSE=0
cd /mediax/games/MAGIC
dosbox -conf dosbox.conf
</pre>

<p>Then I would either grab a screenshot from the game (using Ctrl-F5) or search the web for an icon. And then edit my gamemenu.xml file and add an entry like this:</p>

<pre>item = Master of Magic<br />cmd = "/home/jdarnold/bin/mom"<br />icon = /home/jdarnold/icons/masterofmagic.jpg</pre><a href="http://linux.amazingdev.com/blog/assets_c/2010/11/dosboxmenu1-14.html" onclick="window.open('http://linux.amazingdev.com/blog/assets_c/2010/11/dosboxmenu1-14.html','popup','width=404,height=638,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://linux.amazingdev.com/blog/assets_c/2010/11/dosboxmenu1-thumb-200x315-14.png" alt="dosboxmenu1.png" class="mt-image-center" style="text-align: center; display: block; margin: 0pt auto 20px;" height="315" width="200" /></a>For my <a href="http://www.mobygames.com/game/definitive-wargame-collection">Definitive Wargame Collection</a>, I created a slightly more generic batch file:<br /><br />

<pre>#! /bin/bash<br />cd /mediax/games/WARGAMES<br />dosbox -conf dosbox.conf $1/$2 -c "cd $1" -exit<br /></pre>

<p>Here I cd into the WARGAMES folder and it gets passed a directory and an executable, so mygtkmenu entry looks like this:</p>

<pre>SUBMENU = Definitive Wargame Collection #1<br />	icon = /home/jdarnold/icons/CompleteWargameCollection.jpg<br /><br />	item = Complete Games Menu<br />	cmd = "/home/jdarnold/bin/wargames"<br />	icon = /home/jdarnold/icons/CompleteWargameCollection.jpg<br /><br />	item = Decisive Battles of the Civil War<br />	cmd = /home/jdarnold/bin/wargame1 ACW DB.EXE<br />	icon = /home/jdarnold/icons/DecisiveBattles.png<br /></pre>

<p>So I've created a sub-menu off the main menu and I pass in the sub-directory and the executable for the app. In a later installment, I'll talk a little more about DOSBox, which is a really nice program. Here's a couple of shots of the final product:</p>
<a href="http://linux.amazingdev.com/blog/assets_c/2010/11/dosboxmenu2-17.html" onclick="window.open('http://linux.amazingdev.com/blog/assets_c/2010/11/dosboxmenu2-17.html','popup','width=760,height=672,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://linux.amazingdev.com/blog/assets_c/2010/11/dosboxmenu2-thumb-200x176-17.png" alt="dosboxmenu2.png" class="mt-image-center" style="text-align: center; display: block; margin: 0pt auto 20px;" height="176" width="200" /></a><div><br /></div><fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://www.suite101.com/content/the-16-bit-dos-legacy-what-ever-happaned-a287134">The 16 bit DOS Legacy: What Ever Happaned?</a> (suite101.com)</li><li class="zemanta-article-ul-li"><a href="http://news.bigdownload.com/2010/09/28/wing-commander-released-for-free-via-dosbox-maybe/">Wing Commander released for free via DOSbox? Maybe</a> (news.bigdownload.com)</li><li class="zemanta-article-ul-li"><a href="http://www.mobilecrunch.com/2010/10/26/idos-brings-your-favorite-dos-games-to-ios/">iDOS brings your favorite DOS games to iOS</a> (mobilecrunch.com)</li></ul></fieldset>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=f06bb8f5-2f7e-4c38-8c9f-76cc36cbc04c" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>Arch Linux promo video</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/001527.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.1527</id>

    <published>2010-10-28T13:34:25Z</published>
    <updated>2010-10-28T13:36:58Z</updated>

    <summary>Love this short Arch Linux promo video! Related articlesArch Linux interview and Uzbl article (dieter.plaetinck.be)Bisigi Themes Remix Linux in Eye-Opening Ways [Themes] (lifehacker.com)...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Link" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[Love this short <a class="zem_slink" href="http://www.archlinux.org/" title="Arch Linux" rel="homepage">Arch Linux</a> promo video! <br /><br /><iframe title="YouTube video player" class="youtube-player" type="text/html" src="http://www.youtube.com/embed/-yiGpFjW93Q" frameborder="0" height="255" width="400"></iframe><br /><fieldset class="zemanta-related"><legend class="zemanta-related-title"><br />Related articles</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://dieter.plaetinck.be/Arch_Linux_interview_and_Uzbl_article">Arch Linux interview and Uzbl article</a> (dieter.plaetinck.be)</li><li class="zemanta-article-ul-li"><a href="http://lifehacker.com/5515403/bisigi-themes-remix-linux-in-eye+opening-ways">Bisigi Themes Remix Linux in Eye-Opening Ways [Themes]</a> (lifehacker.com)</li></ul></fieldset>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=1faecef8-f35a-49c1-9d01-1cb33df06632" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>Openbox Time</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000948.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.948</id>

    <published>2010-10-27T14:42:46Z</published>
    <updated>2010-10-27T17:30:16Z</updated>

    <summary>Ooops - I forgot to mention in my Blue Period post what Window Manager I have been using. I had the post about 90% done and started playing with some of the cool new buttons in the MovableType post editor and things went haywire and I lost most of it...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[Ooops - I forgot to mention in my <a href="http://linux.amazingdev.com/blog/archives/2010/10/my-blue-period.html">Blue Period</a> post what <a href="http://xwinman.org/">Window Manager</a> I have been using. I had the post about 90% done and started playing with some of the cool new buttons in the MovableType post editor and things went haywire and I lost most of it :( I guess I forgot to add the window manager back in.<br /><br />In keeping with the <a href="http://wiki.archlinux.org/index.php/The_Arch_Way">The Arch Way</a>, I decided to stay away from big heavy "<a class="zem_slink" href="http://en.wikipedia.org/wiki/Desktop_environment" title="Desktop environment" rel="wikipedia">Desktop Environments</a>" like <a class="zem_slink" href="http://www.kde.org/" title="KDE" rel="homepage">KDE</a> or <a class="zem_slink" href="http://www.gnome.org/" title="GNOME" rel="homepage">GNOME</a> and explored some of the lesser known and more lightweight Window Managers. I settled on <a href="http://openbox.org/">Openbox</a>. Not sure why exactly, as there are a plethora of choices, but Openbox seemed nicely compact and pretty <a href="http://wiki.archlinux.org/index.php/Openbox">popular</a> with the <a class="zem_slink" href="http://www.archlinux.org/" title="Arch Linux" rel="homepage">Arch Linux</a> crowd.

And I haven't looked back really. It's pretty easily configurable, with a couple of XML files being the most prominent config files - <a href="http://openbox.org/wiki/Help:Configuration">rc.xml</a> for most of the config and <a href="http://openbox.org/wiki/Help:Menus">menu.xml</a> for the right click menu. One particularly cool thing to use is a "pipe menu", where the results of a command build a menu on the fly.  The very prolific Arch user Xyne has created <a href="http://www.xyne.archlinux.ca/projects/obfilebrowser/">obfilebrowser</a>, which creates a menu based upon the folder you point it at, so you can use it like a little file browser. Another useful menu generation tool is <a href="http://menumaker.sourceforge.net/">menumaker</a>, which you run once and it creates a menu.xml file for you. It scans all the "usual" places for apps, as well as having a few custom algorithms for finding those out of the way apps. Unfortunately, it seems to be abandoned, as I don't see any updates to it in several years, although it does seem to work okay.<br /><br />Add the fairly lightweight and equally configurable tint2 &amp; wbar and you've got yourself a very workable <a class="zem_slink" href="http://en.wikipedia.org/wiki/X_Window_System" title="X Window System" rel="wikipedia">X Window</a> environment.<br /><br /><fieldset class="zemanta-related"><legend class="zemanta-related-title">Related articles</legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://techrights.org/2010/10/12/mandriva-activity/">Links 12/10/2010: KDE-GNOME Comparisons, Mandriva Activity</a> (techrights.org)</li><li class="zemanta-article-ul-li"><a href="http://maketecheasier.com/easily-create-a-custom-lightweight-desktop-environment/2010/08/10">How to Easily Create a Custom Lightweight Desktop Environment</a> (maketecheasier.com)</li><li class="zemanta-article-ul-li"><a href="http://jeffhoogland.blogspot.com/2010/10/x-reasons-to-give-e17-try.html">Eight Reasons to give E17 a Try</a> (jeffhoogland.blogspot.com)</li></ul></fieldset>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=2a2629ae-7a1f-4d1e-8c0f-da3d60f848dd" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>My Blue Period</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000947.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.947</id>

    <published>2010-10-21T16:56:32Z</published>
    <updated>2010-10-27T20:28:03Z</updated>

    <summary>After getting tired of the green desktop on my Arch Linux box, I played a bit with some backgrounds and colors and came up with my Blue Period desktop:(click for larger image)So this is my new desktop, devoid of (almost) any windows. There&apos;s plenty of screen real estate, as I...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[After getting tired of the green desktop on my <a class="zem_slink" href="http://www.archlinux.org/" title="Arch Linux" rel="homepage">Arch Linux</a> box, I played a bit with some backgrounds and colors and came up with my <a class="zem_slink" href="http://en.wikipedia.org/wiki/Picasso%27s_Blue_Period" title="Picasso's Blue Period" rel="wikipedia">Blue Period</a> desktop:<br /><br /><div align="center"><a href="http://linux.amazingdev.com/blog/assets_c/2010/10/Screenshot%20Blue-1.html" onclick="window.open('http://linux.amazingdev.com/blog/assets_c/2010/10/Screenshot%20Blue-1.html','popup','width=3600,height=1080,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://linux.amazingdev.com/blog/assets_c/2010/10/Screenshot%20Blue-thumb-400x120-1.png" alt="Screenshot Blue.png" class="mt-image-center" style="text-align: center; display: block; margin: 0pt auto 20px;" height="120" width="400" /></a>(click for larger image)<br /></div><div><br />So this is my new desktop, devoid of (almost) any windows. There's plenty of screen real estate, as I have 24" &amp; 21" monitors running in <a class="zem_slink" href="http://en.wikipedia.org/wiki/Multi-monitor" title="Multi-monitor" rel="wikipedia">Twinview</a> mode, for a whopping 3600x1050 pixels. Here's what I'm showing, from left to right:<br /><ul><li>A <a href="http://code.google.com/p/wbar/">wbar</a> launch menu. It has some nice OSX-type animations. Funny, I was just thinking I wanted a launcher for a couple programs. I usually use <a class="zem_slink" href="http://www.launchy.net/" title="Launchy" rel="homepage">Launchy</a> but some of them I'd rather not. And then someone mentioned wbar in the addicting <a href="https://bbs.archlinux.org/viewtopic.php?id=105815">Screenshots</a> topic in the Arch Linux forums. So I checked it out and despite the total lack of documentation, I figured out how to use it. Be sure to get wbarconf too, to help set up the menu.</li><li>The background is from the <a href="http://desk08.customize.org/exhibition/5">Desktopography 2009 exhibition</a>. I was thinking I wanted an outerspace picture and this really fit in with that idea and going blue. And it came in a nice big size too. My "wallpapers" Delcious bookmarks can be found <a href="http://www.delicious.com/jdarnold/wallpapers">here</a>.<br /></li><li>The dropdown window is a <a class="zem_slink" href="http://yakuake.kde.org/" title="Yakuake" rel="homepage">Yakuake</a> terminal window, my favorite <a class="zem_slink" href="http://en.wikipedia.org/wiki/Terminal_emulator" title="Terminal emulator" rel="wikipedia">terminal emulator</a>. It hides away nicely.</li><li>At the bottom is a <a href="http://code.google.com/p/tint2/">tint2</a> task manager. I used to have it go across both sreens but it made the sys tray apps too hard to get to, so I just have it go across one desktop now. I use <a href="http://code.google.com/p/tintwizard/">tintwizard</a> to tame the multiple config options.</li><li>Top right is my fairly simple <a href="http://conky.sourceforge.net/">conky</a> display. I need to get back to hacking on it again.</li></ul>And here's a more "busy" display of my desktop:<br /><br /><div align="center"><a href="http://linux.amazingdev.com/blog/assets_c/2010/10/Screenshot%20Blue%20Busy-4.html" onclick="window.open('http://linux.amazingdev.com/blog/assets_c/2010/10/Screenshot%20Blue%20Busy-4.html','popup','width=3600,height=1080,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://linux.amazingdev.com/blog/assets_c/2010/10/Screenshot%20Blue%20Busy-thumb-400x120-4.png" alt="Screenshot Blue Busy.png" class="mt-image-center" style="text-align: center; display: block; margin: 0pt auto 20px;" height="120" width="400" /></a>Click for full display<br /><div align="left">Here I'm running a few of my standard apps:<br /><ul><li><a href="http://www.gnu.org/software/emacs/">Emacs</a> of course</li><li>I've been using <a class="zem_slink" href="http://www.claws-mail.org/" title="Claws Mail" rel="homepage">Claws Mail</a> as my email client, as I like its filtering better than my old standby, <a class="zem_slink" href="http://www.mozillamessaging.com/thunderbird/" title="Mozilla Thunderbird" rel="homepage">Mozilla Thunderbird</a>.</li><li>On the other hand, my default browser is <a class="zem_slink" href="http://www.mozilla.com/firefox/" title="Firefox" rel="homepage">Mozilla Firefox</a>, although I use <a class="zem_slink" href="http://www.google.com/chrome" title="Google Chrome" rel="homepage">Google Chrome</a> as well. Neither always works and each has good points and bad.</li><li>Finally, tucked in a the far right, is the <a class="zem_slink" href="http://en.wikipedia.org/wiki/Instant_messaging" title="Instant messaging" rel="wikipedia">IM client</a> I use, <a href="http://www.pidgin.im/">Pidgin</a></li></ul><br /><b>Edited to add</b>: I forgot to add what Window Manager I was using - I go into more details of my Openbox install <a href="http://linux.amazingdev.com/blog/archives/2010/10/openbox-time.html">here</a>.<br /><br /></div></div></div>Related articles<fieldset class="zemanta-related"><legend class="zemanta-related-title"></legend><ul class="zemanta-article-ul"><li class="zemanta-article-ul-li"><a href="http://www.linux.com/learn/tutorials/365979:add-these-desktop-docks-for-a-better-desktop-experience">Improve Your Linux Desktop Experience with a Dock</a> (linux.com)</li><li class="zemanta-article-ul-li"><a href="http://dieter.plaetinck.be/Arch_Linux_interview_and_Uzbl_article">Arch Linux interview and Uzbl article</a> (dieter.plaetinck.be)</li><li class="zemanta-article-ul-li"><a href="http://www.junauza.com/2010/08/linux-terminal-emulators.html">8 Best Linux Terminal Emulators You May Have Never Heard Of</a> (junauza.com)</li></ul></fieldset>

<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=300dba52-3aff-4a9b-b54d-2d3693257324" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>Am I Back?</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000946.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.946</id>

    <published>2010-10-20T14:40:44Z</published>
    <updated>2010-10-20T23:46:02Z</updated>

    <summary>Just spent the morning moving my MovableType blogs (like Daemon Dancing) from MT 3.2 to MT 5.031. It&apos;s a bit of a pain, as you have to move one step at a time from one update to the next, so it took 4 (!) upgrades, but I think it is...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[Just spent the morning moving my <a class="zem_slink" href="http://www.movabletype.com/" title="Movable Type" rel="homepage">MovableType</a> blogs (like Daemon Dancing) from MT 3.2 to MT 5.031. It's a bit of a pain, as you have to move one step at a time from one update to the next, so it took 4 (!) upgrades, but I think it is working. At least, if you see this it is working :) Now I hope to get back to more regular posting on my <a class="zem_slink" href="http://www.kernel.org/" title="Linux" rel="homepage">Linux</a> adventures.<br /><br />Anyway, here's a pretty funny video I came across. It has a special resonance, not just because I love writing code in C &amp; C++, but also because <a href="http://www.goodreads.com/hieronymus">I am reading</a> the wonderful <a class="zem_slink" href="http://en.wikipedia.org/wiki/Bob_Spitz" title="Bob Spitz" rel="wikipedia">Bob Spitz</a> <a href="http://www.goodreads.com/book/show/1659763.The_Beatles">biography</a> on <a class="zem_slink" href="http://www.thebeatles.com/" title="The Beatles" rel="homepage">The Beatles</a>.<br /><br /><font style="font-size: 1.25em;"><b>Write in C - <a class="zem_slink" href="http://www.amazon.com/Let-Be-Remastered-Beatles/dp/B0025KVLV0%3FSubscriptionId%3D0G81C5DAZ03ZR9WH9X82%26tag%3Dzemanta-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB0025KVLV0" title="Let It Be (Remastered)" rel="amazon">Let It Be</a> Cover<br /></b></font><br /><iframe title="YouTube video player" class="youtube-player" type="text/html" src="http://www.youtube.com/embed/XHosLhPEN3k" frameborder="0" height="390" width="480"></iframe><a href="http://www.youtube.com/watch?v=XHosLhPEN3k"></a>



<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"><img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=339865f9-3028-4737-a2d3-13113bd318a1" alt="Enhanced by Zemanta" /></a></div>]]>
        
    </content>
</entry>

<entry>
    <title>Do It Sudo</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000945.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.945</id>

    <published>2010-02-28T18:30:30Z</published>
    <updated>2010-02-28T18:33:01Z</updated>

    <summary>I&apos;ve come across a couple sudo tricks during the past few days and thought I would pass them along. The first thing you need to know before using sudo is that you should use the visudo command to edit the sudo config file. This script does a number of useful...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>I've come across a couple <a href="http://en.wikipedia.org/wiki/Sudo" >sudo</a> tricks during the past few days and thought I would pass them along.</p>

<p>The first thing you need to know before using <em>sudo</em> is that you should use the <code>visudo</code> command to edit the sudo config file. This script does a number of useful things, like creating a lock to prevent mulitple editing, and doing some sanity check. But if you have the problem that setting $EDITOR and $VISUAL is ignored when running something with sudo (like <code>sudo visudo</code> or <code>sudo crontab -e</code>), that's a sudo config issue. Add the following in your <code>/etc/sudoers</code> file:</p>

<pre>Defaults env_keep += "EDITOR VISUAL"
</pre>

<p>And you can use <code>sudo</code> from within your normal Emacs window by using the Emacs' <a href="http://www.emacswiki.org/emacs/TrampMode" >Tramp Mode</a>, which allows all kinds of editing, even remote editing. Just use the sudo "protocol" when editing a system file, like /etc/fstab:</p>

<pre>Find file: /sudo::/etc/fstab</pre>

<p>This will prompt you for your password (not the root password - remember, we're doing this via sudo, which wants your password, not root's). Type it in and you can edit the file in place, rather than running a special Emacs process as root. Very nice!</p>]]>
        
    </content>
</entry>

<entry>
    <title>Org-ing in Emacs</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000944.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.944</id>

    <published>2010-02-15T15:54:03Z</published>
    <updated>2010-02-15T15:55:57Z</updated>

    <summary>I have been using emacs since the beginning of computer time, way back in the mid-80s. My .emacs file has been carried around for almost as long. Each major rev causes me headaches, as I never know what archaic options are going to break things. And yet, I&apos;m still learning...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>I have been using <a href="http://www.gnu.org/software/emacs/" >emacs</a> since the beginning of computer time, way back in the mid-80s. My <a href="http://www.emacswiki.org/JonathanArnold" >.emacs</a> file has been carried around for almost as long. Each major rev causes me headaches, as I never know what archaic options are going to break things. And yet, I'm still learning new things to do with it. I think it inspired <em>Zawinski's Law of Software Envelopment</em>:</p>

<blockquote>Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.</blockquote>

<p>My latest Emacs discovery was on an <a href="http://archlinux.com" >Arch Linux</a> forum thread on note taking software. I use <a href="http://www.rememberthemilk.com" >Remember The Milk</a> for plenty of lists, but the web based nature of it makes it hard to be quick about doing a quick note. I started keeping a simple text file with notes on what I was doing, as I was finding whole hours at the keyboard disappearing into a black hole. I whipped up a quick Emacs macro that I bound to F7, which opened a file to prepend a new quick entry:</p>

<pre>(setq logfile-name "/home/jdarnold/Dropbox/dailylog.txt")
(defun insert-new-log ()
  "Start a new log entry"
  (interactive)
  (find-file logfile-name)
  (beginning-of-buffer)
  (insert "==== ")
  (insert-now)
  (insert "\n\n")
  (previous-line)
  )
</pre>

<p>As you can see, I put the file in my <a href="https://www.dropbox.com/" >Dropbox</a> folder (use <a href="https://www.dropbox.com/referrals/NTExMjczMjk" >this link</a> to sign up and we both get an extra 250gb of storage space), so no matter which computer I'm working on, I can jot a quick note that looks something like this:</p>

<pre>==== Monday, January 25 2010 10:43 AM (1264434222)
after a couple of hours puttering around, including writing a review
for Goodreads, I'm back at work. Trying to figure out what I did to
break the video plugin
#insors</pre>

<p>I have a few adhoc tags, stamp it with time date and Unix time, and tried to see what I was working. It's okay, but if I forgot to jot something down when I left the keyboard (which I often did), it lost a lot of its effectiveness.</p>

<p>Then I found out about <a href="http://orgmode.org/" >org-mode</a> in Emacs. It's been in the standard Emacs distribution for a couple of releases, but I'd never heard of it before. And <strong>wow</strong>, is it amazing! The PDF of the User Manual is nearly 200 pages! And it really does everything you could want in an organizer/todo manager/note taker. It even has a clock in/clock out/idle timeout paradigm, so it can notice when I've walked away from my computer. Unfortuantely, "real" idle only works on Mac OSX and Linux (after compiling <a href="http://www.buddydog.org/x11idle.c" >x11dle.c</a>). On Windows, it just notices when you are idle in Emacs, which, despite the fact I use Emacs alot on Windows, isn't quite the same thing. </p>

<p>So now I've changed my Emacs checkin macro to be:</p>

<pre>(defun start-new-task ()
  "Start new journal task"
  (interactive)
  (find-file (concat dropbox-folder "org/" journalname))
  (end-of-buffer)
  (org-insert-heading)
  (org-clock-in)
  )
</pre>

<p>so it adds a new heading and starts the clock. And on my work machine, I set journalname to be a work journal and on my personal machine, I give it a different name. Still working out the kinks in the process, but it's closer to tracking what I've been doing.</p>

<p>I also intend on using <em>org-mode</em> to jot down my myriad project ideas. I'm always coming across interesting web sites, esp. for web APIs, that make me want to dabble in some projects, but I've never had anywhere to jot them down. I was using <a href="http://www.mindmeister.com" >MindMeister.com</a>, an online mind-mapping tool for it, but found it too structured. Given <em>org-mode</em>'s flexibility, I should be able to find some easy way to just add my "brilliant" brainstorms to a file!</p>]]>
        
    </content>
</entry>

<entry>
    <title>Tumblings, Jan 24</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000943.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.943</id>

    <published>2010-02-08T18:07:12Z</published>
    <updated>2010-02-08T18:08:30Z</updated>

    <summary>A couple of links posted to my Linux Tumblr last week: Wicked Cheap Hosting - some great web hosting deals, courtesy of All About Linux TermBuilder - a simple web app to build a commandline command...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>A couple of links posted to my <a href="http://linuxlove.amazingdev.com/" >Linux Tumblr</a> last week:</p>

<ul>
  <li><a href="http://linuxlove.amazingdev.com/post/367449999/wicked-cheap-hosting" >Wicked Cheap Hosting</a> - some great web hosting deals, courtesy of <a href="http://goo.gl/5Xu1" >All About Linux</a></li>
  <li><a href="http://linuxlove.amazingdev.com/post/367344939/termbuilder-a-graphical-linux-command-line-generator" >TermBuilder</a> - a simple web app to build a commandline command</li>
</ul>
]]>
        
    </content>
</entry>

<entry>
    <title>Arched</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000942.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.942</id>

    <published>2010-02-07T15:37:22Z</published>
    <updated>2010-02-07T21:57:25Z</updated>

    <summary>So early in December, I went on a quest for a new Linux distro. It wasn&apos;t so much that I was unhappy with my openSUSE 11.0 installation, but I knew I was probably going to install the new 11.2 version and so I figured I would cast about to see...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>So early in December, I went on a quest for a new Linux distro. It wasn't so much that I was unhappy with my <a href="http://opensuse.org" >openSUSE</a> 11.0 installation, but I knew I was probably going to install the new 11.2 version and so I figured I would cast about to see what's up with the other KDE distros. And given that <a href="http://linuxformat.com" >Linux Format</a> had just done a big review on the "best" KDE distros out there, it was good timing all around.</p>

<p>I didn't really have as complete a checklist of features as I have had in the past. Of course, it had to install on my beast of a machine, with its myriad hard drives, cd drives, dual monitors, and the like. I wanted an easy to use package manager, with plenty of packages available. I was't quite as sold on a "one size fits all" admin panel like <em>openSUSE</em>'s Yast2. I'm feeling a little more adventurous, and hate to see my configs get changed without my knowledge. I wanted a KDE distro, as I find GNOME to be bizarre. I didn't want to get too far off the beaten path, as I like a popular, well documented distro.</p>

<p>First up was <a href="http://sabayonlinux.org/" >Sabayon</a>, which has been getting lots of good press. I wasn't crazy about their home page - it was too hard to find even the download link. And there were a few kinks in the install process. It was a few months ago, so I don't remember exactly the problems, but they were enough to sour me on it a bit. It did have exactly the same problem I was going to find in all the rest of my installs, which is that the setup hard drive numbering for GRUB was always different than the final installation drive numbering, requiring me to reboot using the live disc and edit the /boot/grub/menu.lst file and change the hd0 to hd1. Not sure why that is, but I guess the mix of IDE & SATA hard drives makes it crazy.</p>

<p>So after dabbling a bit with Sabayon, I moved over to try <a href="http://sidux.com" >Sidux</a>, which really intrigued me with its cutting edge release and huge package library. It also had an incredibly clean install process and the desktop is stunning. Really a very polished and good looking release. It has a very nice community with lots of good info on the web site. I was a little turned off by its insistence that you drop down into single user mode to install any updates, which isn't something I like doing.</p>

<p>But I played with Sidux for a couple of days. It was nice, but I decided to give <a href="http://www.archlinux.org" >Arch Linux</a> a try. It had been written up very nicely in the previous issue of <em>Linux Format</em>, in the "Remix Your Own Linux" article. It's overriding philosophy of "Keep It Simple" was really attractive, as was the very large package library. I found it amusing that the Live CD boots into a commandline, the installer is the old fashioned text-mode graphics and, even after installing, you end up with commandline! It doesn't even install X for you.</p>

<p>I found this a refreshing change and decided to jump right in. I even decided against installing KDE and just run <a href="http://openbox.org/wiki/Main_Page" >openbox</a> with a stripped down config. It's really been working nicely for me and I haven't looked back. <em>Arch</em> makes a great server install, as there is very little cruft installed by default. When I built my media server machine, with its 1tb software RAID, I only added Emacs & Samba and I know it is a lean, mean, serving machine. </p>

<p>The <a href="http://wiki.archlinux.org/index.php/Main_Page" >Arch wiki</a> is incredibly informative and comes up early in many Google searches. The forums are active with intelligent discussions and it is a very nice, experienced, community. While I wouldn't use it for my Grandma's Linux, Arch is a great distro once you get some Linux experience and want to tailor a distro to your ideas, and not the other way around. Arch is also why the calls for fewer distros is misguided. It isn't for everyone but as long as each distro has a certain focus, and hues to it closely like Arch does, there's plenty of room out there. Next up - theme color changes!</p>
]]>
        
    </content>
</entry>

<entry>
    <title>Linux Love Links</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000941.html" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.941</id>

    <published>2010-02-02T20:46:39Z</published>
    <updated>2010-02-02T20:47:47Z</updated>

    <summary>A few things I have recently thrown down on my Linux Love Tumblr blog, which I use for quick little Linux links and notes: 7 Best Linux Apps for Ripping CDs and DVDs | Maximum PC 50+ Ultimate Collections of Planet Wallpapers TermBuilder: a graphical Linux command line generator...</summary>
    <author>
        <name>Jonathan</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
    
        <category term="Note" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>A few things I have recently thrown down on my <a href="http://linuxlove.amazingdev.com/" >Linux Love</a> <a href="http://tumblr.com" >Tumblr</a> blog, which I use for quick little Linux links and notes:</p>
<ul>
  <li><a href="http://linuxlove.amazingdev.com/post/334295621/7-best-linux-apps-for-ripping-cds-and-dvds-maximum-pc" >7 Best Linux Apps for Ripping CDs and DVDs | Maximum PC</a></li>
  <li><a href="http://linuxlove.amazingdev.com/post/350790404/50-ultimate-collections-of-planet-wallpapers-naldz" >50+ Ultimate Collections of Planet Wallpapers </a></li>
  <li><a href="http://linuxlove.amazingdev.com/post/367344939/termbuilder-a-graphical-linux-command-line-generator" >TermBuilder: a graphical Linux command line generator</a></li>
</ul>
]]>
        
    </content>
</entry>

</feed>
