tag:blogger.com,1999:blog-18867363944559108472024-03-13T23:17:33.193-04:00[Insert imaginative title here]wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-1886736394455910847.post-65892450966998634552009-08-15T06:37:00.005-04:002009-08-15T07:12:34.774-04:00Controlling PandoraOn Windows, there is the excellent program called OpenPandora that embeds Pandora Radio in a small window and lets you control it from the multimedia keys on your keyboard, rather than a clumsy webpage. However, no similar thing exists on Linux to my knowledge. Before I discovered OpenPandora, I wrote an AutoHotKeys hack for controlling Pandora, so I decided to use a similar method on Linux. I used a tool called xdotool which lets you send keyboard and control the mouse from a shell script. My solution has several pieces which I'll share.<br /><br />The first is a webpage that can open Pandora as a minimal-looking pop-up. Here's an example:<br /><form><br /><input onclick="window.open('http://pandora.com','_blank',config='height=260,width=625, toolbar=no, menubar=no, scrollbars=1, resizable=yes,location=no, directories=no, status=no');" value="Launch Pandora" type="button"><br /></form><br />PandoraCustomLauncher.html:<br /><pre><br /><html><br /><head><br /><title>Launch Pandora</title><br /><script type="text/javascript"><br /><br />var myWindow;<br />function openWindow() {<br /> myWindow = window.open("http://pandora.com","_blank",config="height=260, width=625, toolbar=no,<br />menubar=no, scrollbars=1, resizable=yes,location=no, directories=no, status=no");<br />}<br /><br /></script><br /></head><br /><body><br /><form><br /><br /><input type="button" onClick="openWindow()" value="Launch Pandora"><br /><br /></form><br /></body><br /></html><br /></pre><br />The next is a script that handles launching Pandora. I used the Konqueror webbrowser, because it plays Flash most reliably on my Linux installation. (Yes... sad that should even be a factor.)<br /><br />pandora.sh:<br /><pre>#!/bin/sh<br /><br /># Store the initial active window.<br />PANDORA_FOCUS=`xdotool getwindowfocus`<br /><br /># Launch Konqueror<br />konqueror file:///path/to/PandoraCustomLauncher.html<br />sleep 2<br /><br /># Launch the Pandora Window<br />PANDORA_LAUNCHER=`xdotool search --title "Launch Pandora" | head -n 1`<br />xdotool windowfocus $PANDORA_LAUNCHER<br />xdotool key "Ctrl"<br />xdotool key "L"<br /><br />sleep 7<br /><br /># Find, raise, move, and focus on the window.<br />PANDORA_WIN=`xdotool search --title "Pandora Radio" | head -n 1`<br />xdotool windowraise $PANDORA_WIN<br />xdotool windowmove $PANDORA_WIN 0 40<br />xdotool windowfocus $PANDORA_WIN<br /><br /># Move the scrollbars.<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Down"<br />xdotool key "Right"<br />xdotool key "Right"<br />xdotool key "Right"<br />xdotool key "Right"<br />xdotool key "Right"<br /><br />sleep 3<br /><br />#Store the initial mouse position.<br />PANDORA_X=`xdotool getmouselocation | awk '{print $1}' | cut -d : -f 2`<br />PANDORA_Y=`xdotool getmouselocation | awk '{print $2}' | cut -d : -f 2`<br /><br /># Set the focus to the Flash component rather than the window<br />xdotool mousemove 268 198<br />xdotool click 1<br /><br /># Restore the mouse position.<br />xdotool mousemove $PANDORA_X $PANDORA_Y<br /><br /># Close the Launch Window<br />xdotool windowfocus $PANDORA_LAUNCHER<br />#sleep 1<br />xdotool keydown "Ctrl"<br />xdotool key "Q"<br />xdotool keyup "Ctrl"<br /><br /># Restore the original focus<br />xdotool windowfocus $PANDORA_FOCUS<br /></pre><br /><br />I made a symlink from ~/bin/pandora to pandora.sh. Now when I run "pandora" I get this:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_p__S3T9vQyM/SoaScMGbykI/AAAAAAAAAX8/n9qfMdbTa_Q/s1600-h/Screenshot.jpeg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 184px;" src="http://4.bp.blogspot.com/_p__S3T9vQyM/SoaScMGbykI/AAAAAAAAAX8/n9qfMdbTa_Q/s400/Screenshot.jpeg" alt="" id="BLOGGER_PHOTO_ID_5370140618668100162" border="0" /></a><br />I guess another reason I used Konqueror is it actually obeys the "location=no,status=no" settings in window.open() Javascript function, resulting in a very minimalized browser window.<br /><br />Finally, the best part: pausing and skipping songs with the multimedia keys.<br /><br />pause_pandora.sh<br /><pre>#!/bin/sh<br /><br /># Store the initial active window.<br />PANDORA_FOCUS=`xdotool getwindowfocus`<br /><br /># Find the window.<br />PANDORA_WIN=`xdotool search --title "Pandora Radio" | head -n 1`<br /><br />if [ ! -n "$PANDORA_WIN" ]<br />then<br /> echo 'PANDORA_WIN is null'<br />else<br /> echo 'PANDORA_WIN is not null'<br /> # Hit the spacebar<br /> xdotool windowfocus $PANDORA_WIN<br /> xdotool key "space"<br /><br /> # Restore the original focus<br /> xdotool windowfocus $PANDORA_FOCUS<br />fi<br /></pre><br />next_pandora.sh<br /><pre>#!/bin/sh<br /><br /># Store the initial active window.<br />PANDORA_FOCUS=`xdotool getwindowfocus`<br /><br /># Find the window.<br />PANDORA_WIN=`xdotool search --title "Pandora Radio" | head -n 1`<br /><br />if [ ! -n "$PANDORA_WIN" ]<br />then<br /> echo 'PANDORA_WIN is null'<br />else<br /> echo 'PANDORA_WIN is not null'<br /> # Hit the right arrow key<br /> xdotool windowfocus $PANDORA_WIN<br /> xdotool key "Right"<br /><br /> # Restore the original focus<br /> xdotool windowfocus $PANDORA_FOCUS<br />fi</pre><br /><br />The last step is just to set pause_pandora and next_pandora to be run when you hit the Play/Pause and Next keys. In KDE, this can be done under System Settings > Input Actions.<br /><br />It's not perfect, but it will suffice until I can stream music directly into my brain.wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com2tag:blogger.com,1999:blog-1886736394455910847.post-49334890039764276062009-03-31T00:49:00.001-04:002009-03-31T00:49:58.827-04:00Plasmoids on the Screen Saver<a href="http://kde-look.org/content/show.php?content=101940">http://kde-look.org/content/show.php?content=101940</a>wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-12245805605749247832009-01-03T15:30:00.001-05:002009-01-03T15:30:57.847-05:00Kubuntu 8.10: First impressionsMy laptop has been "upgraded" since Feisty, I think. Feisty Beta actually. It's gone from Feisty -> Gutsy -> Hardy. And while it's sweet that one can upgrade the operating system without having to reinstall everything, cruft has built up. Suspend quit working after the Gutsy -> Hardy upgrade. The way stuff like X works has completely changed: my old /etc/X11/xorg.conf was full of options I'd discovered by trial and error in order to get KDE4's desktop effects to work. There were lines that I'd carefully commented out in a failed attempt to keep X from spewing errors about imaginary Wacom tablets. Imagine my surprise when I learned that nowadays, xorg.conf is practically blank - all the monitors, input devices, etc. are hotplugged. English translation: All that confusing stuff I had to do to get stuff working in the past? That's done by magic now. I don't need that stuff. (And more than likely, keeping those config files makes things worse, because those options might override the ones chosen by the magic.)<br /><br />At some point I might have to learn where the new magical X settings come from, if for some reason the magical settings it chooses don't suit me. But frankly, I have less patience for that stuff than I used to. I just want it to work by default.<br /><br />But the point is: "upgrading" wasn't giving me all the benefits of a fresh new install. So for Intrepid, I said screw this, I'm reinstalling. I want a brand new, out-of-the-box system. Luckily, I had been clever enough in the past to put my /home directory on a separate partition, so it wasn't a big issue. I just made a full backup, and then reinstalled over the partition that had root. I actually went through and hand picked what config files in my home dir to keep, and which to toss out in favor of whatever new default config files are provided nowadays. I kept .mozilla and .opera, so I wouldn't lose my bookmarks and history. I kept .mozilla-thunderbird so I'd keep my email settings. I merged my old .bash_rc with the new .bash_rc, and so on. Finally, I deleted the home dir in the root partition, added a line to the new /etc/fstab to mount my home partition in /home, rebooted, and lived happily ever after.<br /><br />Haha, yeah right like anything computer-related is "happily ever after". But it was pretty close. Here are some of my comments and feedback on Kubuntu Intrepid.<br /><br />Sound works out-of-the-box. Yeah! However, I had to change the Master Channel in KMix from PCM to Front. On PCM, the multimedia buttons brought up the on-screen volume display, but didn't actually change the volume.<br /><br />I went to change the wallpaper - only one wallpaper is installed by default? Come on. That's just lame. And then to confuse things worse, there are TWO packages of wallpapers: kdewallpapers and kdebase-workspace-wallpapers. The ones in kdewallpapers were aweful (Repeating tile patterns? That's so Windows 95.) so I just kept kdebase-workspace-wallpapers. Next time, install that package by default please!<br /><br />I like that I can just install kubuntu-restriced-extras and get .mp3 playback and friends. Kubuntu might have even prompted that when I tried to play an .mp3 the first time, I forget. Still have to add medibuntu for some stuff, but that's really easy.<br /><br />But no, I have a list of quibbles and complaints. Some are due to specific KDE4->KDE3 functionality losses, some are stupid defaults, but most are just because of laziness or lack of time on the developers' part probably. Here we go:<br /><ul><li>The installer. When I hit "Forward", the focus isn't set to the first text box on that page - I must move the mouse and select the first text box myself. An anoyance that got in the way of my type-type-tab-type-type hit "Forward" type-type-tab-type-type mentality. Seriously, it's probably just one line of code to set the focus; I expected more from the Kubuntu devs who put so much emphasis on usability.</li><li>When I created a Google Talk account in Kopete, it set the default server to gmail.com. I was baffeled as to why it didn't work until I went to the Google Talk page and saw it says clearly to use the server talk.google.com. Also, "Use SSL" was unchecked by default when for Google Talk it should be checked by default. Seriously, if they're going to add a separate item for Google Talk instead of including it as a Jabber account, put in the right defaults for goodness sake!</li><li>The knetworkmanager UI has regressed. I use to love clicking the knetworkmanager icon, seeing the available wireless networks and their signal strength in the dropdown, and clicking one to switch to that network immediately. I now have to click multiple times to even see what wireless networks are available! That's worse than in XP. I know Celeste did a usability report on it, so maybe the "good" knetworkmanager was a version modified specifically for Kubuntu and now Kubuntu 8.10 has the vanilla KDE version. I must say, I hope the vanilla KDE knetworkmanager people accept Celeste's advice and implement the usability changes.</li><li>Searching in krunner. No offense, I LOVE THE NEW KRUNNER! I use it all the time. But seriously, some keywords need to be added to apps or smarter indexing used. Typing the word "Internet" returns no hits. Searching for "printer" brings up the HPLIP Toolbox but not system-config-printer-kde. On a general note, how are users going to know to hit F2? Should that be mentioned in the K-menu perhaps?</li><li>The clock was in 24hr mode be default, and <span style="font-style: italic;">no menu option for the clock widget takes you to the time/date settings</span>. Don't be a lazy developer; add a link to the date and time settings from all clock widgets. It's little things like that that need polishing. Maybe that's fixed in 4.2 already, I guess I'll find out later this month.</li><li>There's no printer settings in System Settings. This is a KDE4->KDE3 regression, so I'll give Kubuntu some slack. There is a printer setup utility K-menu > Applications > System, so it's not a total loss. It's not as nice as the old utility, but hopefully that'll be worked out soon. However, I wonder how hard it would have been to put a link in System Settings to the printer utility, or re-use the KDE3 printer module in System Settings. Same applies to the User Manager - it's in the K-menu but not in System Settings which makes it harder to find.<br /></li><li>I have a sneaking suspicion that parts of Special Window Settings may not work. Rules for Keep Above and Show on All Desktops seems to work, but I'm having trouble getting geometry rules to be applied to FF windows based on the window title. Might just be me though... and I hadn't tried that in KDE3 before so I have nothing to compare it with.</li><li>Another Kwin questions: Why is "Desktop navigation wraps around" under Focus, and "Active Desktop Borders" under "Advanced"? They seem tightly related to me. Well, all the Kwin settings need to be organized and explained a little better - I submitted the idea of being able to move your mouse across virtual desktops as a KDE4 feature request, only to later learn it's been in KDE3 for ages, if I had only guessed that's what Active Desktop Borders meant.</li><li>The MythTV frontend package tried to call kdesu to add the user to the mythtv group, but Kubuntu apparently now uses kdesudo. That needs to be fixed. Hm, I may actually file a bug report for that one. (Aw, it's already been <a href="https://bugs.launchpad.net/ubuntu/+source/mythtv/+bug/274602">fixed</a>.) You really got to be on top of things to file a virgin bug report for KDE these days. I made that <a href="http://bugs.kde.org/show_bug.cgi?id=178632">mistake</a> just the other day.</li><li>I haven't figured out how to take advantage of strigi. In my old install, I could type "strigi:/" in the addressbar of Konqueror, but that protocol appears to be unsupported now. I installed strigi-client, but in addition to being terribly slow, it has only served to inform me that Strigi has indexed 0 files, despite being enabled in System Settings. Hmph.</li><li>Dolphin is mysteriously slow. Like... I don't know it behaves like it's running on Windows sometimes. Three second delays between when I right click and a menu pops up, that sort of thing. Konqueror seems fine. I'm throwing the Dolphin devs the benefit of the doubt here guessing the speed thing is due to something beyond their control, or that they have implemented large speed improvements in time for KDE 4.2.<br /></li></ul>Overall, I'm fairly happy with Kubuntu 8.10. It's no panacea, but compared to 2 years ago, it's amazing progress, particularly given the switch to KDE 4. Almost all my complaints at this point are polish - things that could be fixed with one or two - ok maybe 5 or 6 - lines of code here and there. It still kicks ass compared to Windows. Although on a personal note, I'm starting to tire of tech - I think I may need to get outside and start canoeing and camping again.wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-82705122461443906952008-12-22T16:50:00.001-05:002008-12-26T11:24:47.033-05:00Compiling Qt apps in Windows with MinGWI love Qt. I haven't actually used it much, as I haven't written many programs, but I've seen enough stuff written about it in developer blogs to have a fanboyish appreciation for the cross-platform toolkit. But aside from installing KDE for Windows back in it's beta days, I hadn't had the opportunity to use the "cross platform" bit until yesterday. I needed to compile <a href="http://code.google.com/p/screenie/">screenie</a> for a Windows environment. I knew what I was getting into, having compiled C and C# programs in the past. (I'm a big fan of interpreted languages; compiling always seems to waste hours of development time and involve enormously frustrating obscure compiler and linker errors.) But I loved learning about the process, and particularly discovering that I was capable of overcoming all my compiler errors with my current knowledge and Google. I got to understand Qt (and Windows executables, for that matter) on a more intimate level, solidify in my mind what .dll's are, and what dynamic and static linking are. After multiple attempts, I ended up with a standalone executable that ran perfectly on XP and Vista. It's an amazing feeling, knowing you started with hundreds, maybe thousands of text files - barely contained chaos! - and ended with a single file - pure simplicity. Plus, <a href="http://ariya.blogspot.com/2008/06/creating-fancy-screenshots-with.html?showComment=1212531060000#c7951697820729319784">I may be the first person to compile screenie for Win32</a>, making my work useful to others. Hopefully the author will make it available on screenie's website.<br /><br />And now for the boring stuff if you're reading this for the human interest aspect; or the interesting part if you're reading this for the "How To" aspect. After reading several articles about cross-compiling Qt, I decided not to attempt that, and just did the whole process in Windows XP.<br /><span style="font-weight: bold;font-size:130%;" ><br /></span><span style="font-weight: bold;font-size:130%;" >How to compile a C++ Qt4 application for Windows</span><br />Obviously, these directions are specific to compiling screenie. If you're using this as a guide for compiling something else, use your imagination as needed to adjust the steps.<br />Where applicable, I specify the generic download page for each application, as well as the specific binary version I used.<br /><blockquote>1. Download and install Qt4 with MinGW<br />(<a href="http://trolltech.com/downloads/opensource/appdev/windows-cpp">http://trolltech.com/downloads/opensource/appdev/windows-cpp</a>)</blockquote>I used version: ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.4.3-mingw.exe<br /><span style="text-decoration: line-through;">Since the source for screenie is a Git repository, I figured we need git.</span> <span style="font-weight: bold;">Update 2008-12-26:</span> There is a Download button on the <a href="http://github.com/ariya/screenie/tree/master">screenie Github</a> page to download the source as a zip file. Extract it to C:\screenie and jump to step 5.<br /><blockquote>2. Download and install msysgit<br />(<a href="http://code.google.com/p/msysgit/downloads/list">http://code.google.com/p/msysgit/downloads/list</a>)</blockquote>I used version: http://msysgit.googlecode.com/files/Git-1.6.0.2-preview20080923.exe<br /><blockquote>3. Run Git Bash and execute git clone git://github.com/ariya/screenie.git</blockquote><blockquote>4. Copy the downloaded source directory to c:\screenie</blockquote><blockquote>5. Open the Qt 4.4.3 Command Prompt from the start menu.</blockquote>It's like a normal command prompt, except with some environment variables and bash scripts set. (For instance, it appears to alias make to mingw32-make, which saves typing.) It is assumed you are using the Qt Command Prompt for all the steps below involving a prompt.<br /><br />By default Qt installs itself for compiling with dynamically linked libraries. This means you have to copy the compiled executable, as well as a bunch of .dll's to each computer you install it on. It's not really a problem: just put them all in a zip file, unzip it on the Desktop, and it runs nicely. But if you're like me, and want a single executable with no dependencies, scroll down to the statically linked bit.<br /><br /><span style="font-size:130%;">Dynamically linked (.dll dependencies, distribute as .zip file)</span><br /><blockquote>6. cd C:\screenie</blockquote><blockquote>7. Issue qmake -spec "C:\Qt\4.4.3\mkspecs\win32-g++"</blockquote>For some reason, qmake seemed confused out-of-the-box, and I had to fix several things in the makefile. I used the Find and Replace feature in Crimson Editor (my favorite Windows text editor.)<br /><blockquote>8. In Makefile.Release replace:<br />"iwmake\build_mingw_opensource" with "Qt\4.4.3"<br />(There were 8 instances)<br />"QtGui" with "QtGui4"<br />"QtCore" with "QtCore4"<br />(Both in the LIBS line)</blockquote>The same substitutions would be needed to fix Makefile.Debug, except instead of QtGui4 and QtCore4 it's the debug versions QtGui4d and QtCore4d. But you don't need to build the debug version anyway.<br /><blockquote>9. Issue make.</blockquote> The compiled executable appears in C:\screenie\release. Test the program and see if it works. For me, Screenie worked on Windows! Yea!<br /><br />Following the <a href="http://doc.trolltech.com/4.4/deployment-windows.html#application-dependencies">advice</a> on the Trolltech website, I used Dependency Walker to find what .dll's the executable requires. I copied those .dll's to the release directory. In screenie's case, Dependency Walker listed QtCore4.dll, QtGui4.dll, msvcrt.dll, and kernel.dll. Kernel.dll is already installed on every windows system so no need to distribute it. Msvcrt.dll is the Microsoft C Runtime Library - probably installed on people's computers, but I included a copy anyway, along with QtCore4.dll and QtGui4.dll. I had to include one more .dll that Dependency Walker did not find, a copy of c:\MinGW\mingwm10.dll. (See note in static compiling.) Also, any plugins used need to be copied to the release folder. In this case, screenie needs the image plugins to read JPEG or GIF files, so copy the contents of c:\Qt\4.4.3\plugins\imageformats to c:\screenie\release\imageformats. You can delete the .dll's whose names end in the letter "d"; they are debug versions and take up a lot of space, and are not used if you compile for release. Copy the release folder to the Desktop, give it a better name (like "screenie"), zip it, and voila! Copy it to another computer and hopefully it will run.<br /><span style="font-size:130%;"><br />Statically linked (no dependencies, single file to distribute)</span><br />To my dismay, compiling statically was not simple. To begin, we must recompile Qt itself.<br /><blockquote>6. Using the Qt 4.4.3 Command Prompt from the start menu...<br />cd C:\Qt\4.4.3<br />configure -static</blockquote>This takes a long time. I read later to do a distclean before rebuilding... but I didn't and it built OK. However, I wonder if this is why later qmake decided to link to the old .dll's ending in 4.<br /><blockquote>7. make sub-src<br /></blockquote>This takes a <span style="font-style: italic;">really</span> long time. (By this point it was past 3:00 am, so I left it running while I slept.)<br /><br />When Qt is statically linked, it cannot dynamically load plugins. (Turns out it's an artificial restriction that's <a href="http://brainrack.wordpress.com/2008/03/19/qt-plugins-and-static-builds/">easily overwritten</a>.) But we want those image plugins statically compiled into our final executable. To make that happen you have to do the following voodoo. Luckily it's straight from the <a href="http://doc.trolltech.com/4.3/plugins-howto.html#static-plugins">Trolltech documentation</a>.<br /><blockquote>8. Add Q_IMPORT_PLUGIN() statements for each plugin to the c++ code.</blockquote>I added the lines:<br /><blockquote>Q_IMPORT_PLUGIN(qjpeg)<br />Q_IMPORT_PLUGIN(qgif)<br /></blockquote>to screenie.cpp<br /><br />(There are plugins for some other image formats, like .tiff and .ico but I didn't think most people would need more than .jpeg, .png, and .gif. PNG support is built into Qt so it doesn't have a plugin.) These lines of code are necessary to compile it statically, but I don't know yet if those lines cause trouble if you try to compile the code dynamically.<br /><blockquote>9. Add a QTPLUGIN line to the .pro file</blockquote>I added the lines<br /><blockquote>QTPLUGIN += qjpeg qgif<br />CONFIG += static</blockquote>to screenie.pro<br />(The CONFIG one is a guess... I actually got it from a page on compiling custom plugins, but figured we want all things static, so why not throw it in? Not gonna make them less static.) Voodoo done.<br /><blockquote>10. cd C:\screenie<br />make clean<br />qmake -config release<br /></blockquote>This time, it seems to not have the iwmake\build_mingw_opensource problem, but it does need for the 4 from the library names to be deleted. When compiling statically, the library names used do not have the 4 in them. I'd love to know why Trolltech thought that was necessary. (Funny how the 4's <span style="font-style: italic;">weren't</span> there when I needed them, and now are there when I <span style="font-style: italic;">don't</span> want them!)<br /><blockquote>11. In Makefile.Release, in the LIBS line, replace -lqjpeg4 and -lqgif4 with -lqjpeg and -lqgif.</blockquote>Delete mthreads because it's an unneeded dependency on mingw10.dll which isn't compiled statically. <a href="http://lists.trolltech.com/qt-interest/2006-08/thread00942-0.html">Apparently Qt doesn't use it</a>, so I don't know why qmake adds it by default. If you don't delete -mthreads, you get an error saying mingw10.dll can't be found when you run it on other computers.<br /><blockquote>12. Delete all instances of -mthreads in Makefile.Release</blockquote><blockquote>13. Now back in C:\screenie issue make<br />cd release<br /></blockquote>You should now have a statically compiled executable c:\screenie\release\screenie.exe. See if it works! If everything went according to plan, you can run that file on any Windows XP / Vista computer and use Ariya Hidayat's awesome screenie!<br /><br />But no! You're a perfectionist. You want more. The screenie.exe file is about 10 MB. Let's see if we can shrink that! I got these tips from <a href="http://www.qtforum.org/post/85635/static-compiling.html#post85635">http://www.qtforum.org/post/85635/static-compiling.html#post85635</a><br /><blockquote>14. From the release folder, issue strip screenie.exe</blockquote>This is a command from Qt that removes unnecessary parts of Qt from statically compiled files. Sadly, this didn't reduce the file size much, if any. (Perhaps Qt does that behavior by default now.) But there's another thing you can do to reduce file size.<br /><blockquote>15. Download and install the Ultimate Packer for eXecutables (<a href="http://upx.sourceforge.net/">http://upx.sourceforge.net/</a>)<br /></blockquote>I used version: http://upx.sourceforge.net/download/upx303w.zip<br />I had to manually unzip it to C:\Program Files and add it's directory to Window's Path environment variable.<br /><blockquote>16. Open cmd and cd to c:\screenie\release<br />Issue upx screenie.exe<br /></blockquote>Now it is only 3.58 MB. Sweet!wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-61210271712491367282008-09-11T17:31:00.000-04:002008-09-12T15:08:12.521-04:00How to build a MythTV for under $300<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_p__S3T9vQyM/SMmOsEbG5aI/AAAAAAAAAF8/dNkaZDggsfA/s1600-h/dscn2594.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_p__S3T9vQyM/SMmOsEbG5aI/AAAAAAAAAF8/dNkaZDggsfA/s320/dscn2594.jpg" alt="" id="BLOGGER_PHOTO_ID_5244880128802481570" border="0" /></a>If you search for a media center PC online or in a store, they tend to be quite expensive, often in excess of a thousand dollars. But you don't need that much money to get a working media center that lets you pause live TV, record shows, rip DVDs onto the hard drive, and more. I did it for under $300, and with a little bargain hunting, you can too!<br /><br />Here's what I have and how much I paid (rounded to the dollar):<br />$39 - ECS 761GX-M754 motherboard (eBay)<br />$10 - AMD64 3000+ CPU on sale at Fry's because the 754 socket is being discontinued. Great time to buy one!*<br />$33 - 1GB Corsair RAM (Fry's)<br />$25 - PowerSpec TX366 mATX Case (Microcenter)<br />$25 - XION 450W power supply (Microcenter)<br />$33 - Hauppauge PVR-150 NTSC TV tuner (eBay)<br />$38 - ATI X700 (eBay)<br />$21 - 50' CAT5 cable (Home Depot)<br />$20 - 1 year subscription to Schedules Direct (needed if you want to get channel schedules in North America)<br />$27 - Windows MCE remote (eBay)<br />Some additional parts that I already owned:<br />$0 - Two 80GB Western Digital IDE hard drives<br />$0 - DVD reader<br />---------------<br />= $271<br /><br />* I actually got several since they were such a steal... if you wanna buy one, leave a comment!<br /><br />Now, you're probably thinking, "Hey, that's not fair - you didn't include the price of the hard drives or the DVD reader!" Frankly, if you're not the kind of person who has a some spare computer parts lying around your house, you should probably quit reading now, because despite many advances in usability, MythTV is still quite a challenge to install and configure. However, for the sake of thoroughness: you can get a 160GB SATA drive for $50 and a DVD-ROM reader from $20 at Microcenter. Plus, in hindsight, I believe a 300W power supply would suffice, so instead of paying $50 for the case and power supply, Microcenter sells the case with a 300W power supply for $34. And on Craigslist, which I discovered late in the process of buying things, people are selling old desktops for as low as $50, which is as much as I paid for the case and power supply alone, but would potentially get you RAM, hard drives, an extra keyboard, maybe even the DVD drive if you're lucky. I got a 20" CRT monitor for $15 on Craigslist, so I'm sure that if you live near a big city you could get a better deal on a bare bones PC than I did building from scratch.<br /><br />Be warned, installing MythTV is not for the faint of heart. It took the better part of two weeks to get it configured the way I like it, and I am already pretty well versed in Linux and Ubuntu. Most of the first week was spent trying to make the ATI tuner card, the ATI remote, and a cheap Trendnet TEW-424UB USB wireless dongle work with Linux. (The USB wireless adapter worked fine with ndiswrapper on my laptop, but refused to connect on my desktop.) After a week I gave up, and researched the best, most highly recommended hardware for MythTV and got a Hauppauge card, a Windows MCE remote, and traded wireless for a CAT5 cable, which all work great. I had to mess around with the LIRC config files until I got all the buttons on my remote programmed the way I like, but that really wasn't too hard once I figured out how. Also, MythTV's internal player had extremely poor DVD playback on my setup, so I had to configure MythTV to use Xine instead (the MythTV wiki <a href="http://www.mythtv.org/wiki/index.php/Configuring_Xine">explains how to do that</a> very clearly).<br /><br />All of the parts I used are a few years old - you don't need "modern" hardware to run MythTV. The AMD64 3000+ was released in 2003 according to Wikipedia. The 80GB hard drives are both from an old computer that got replaced years ago. Using the Hauppauge card with its hardware MPEG-2 encoder, standard definition analog TV takes up 2.2GB per hour; one drive is formatted with XFS and has 75GB of free space, the other is ext3 and has nearly 70GB free. That's over 65 hours of TV! (Mythbuntu itself appears to only take about 2GB. The formatted capacity of ext3 is less than XFS apparently.) As for the other hardware, I don't necessarily recommend the power supply I got - I find the fan rather loud and annoying. And I'm not sure where I stand on ATI vs Nvidia when it comes to Linux. But I definitely recommend the Hauppauge if you're recording analog. You might want a PVR-500, which has two tuners in it, if you want to be able to watch live TV while recording another show, or record two show at once. I figure the chances of two good shows being on at the same time, with no reruns that could be recorded later, are so slim all I need is one for now. Since I'm stuck with college cable, I doubt I'll get any digital or HDTV for a while, so I stuck with an analog tuner.<br /><br />So if you've got a lot of free time and $300, go ahead - build yourself a MythTV! Record shows and skip through the commercials! Never worry about when your favorite show is on; MythTV can find and records your show on any channel at any time. Try programming a VCR to do that! MythTV also remembers which episodes it's previously recorded so it doesn't fill up your hard drive with reruns you've already seen. You can rip your DVDs to the hard drives. You can have multiple frontends, connected to a single MythTV backend by ethernet. The MythWeb plugin even lets you stream your recordings over the Internet so you can watch them on any computer. And all sorts of cool things. Useful resources definitely are the <a href="http://www.mythtv.org/wiki/index.php/Main_Page">MythTV wiki</a>, the <a href="http://sudan.ubuntuforums.com/forumdisplay.php?s=e572c39461057694006a01de6ab881e5&f=301">Mythbuntu forums</a>, the MythTV wiki, and did I mention the MythTV wiki? Really, the MythTV wiki is the most useful thing I encountered. FYI, I tried MythDora and KnoppMyth - MythDora seemed really nice - but stuck with Mythbuntu simply because I'm use to Debian/Ubuntu systems.<br /><br />Here's some more pictures. I printed the MythTV sticker in the above picture by using the unused portion of inkjet DVD label paper.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_p__S3T9vQyM/SMnPLjV1icI/AAAAAAAAAGk/OJIrY0sUD1g/s1600-h/dscn2608.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_p__S3T9vQyM/SMnPLjV1icI/AAAAAAAAAGk/OJIrY0sUD1g/s320/dscn2608.jpg" alt="" id="BLOGGER_PHOTO_ID_5244951038421993922" border="0" /></a>The MythTV home screen with the "neon-wide" theme.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_p__S3T9vQyM/SMnPvAtO2cI/AAAAAAAAAGs/UMK3PedXcLk/s1600-h/dscn2615.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_p__S3T9vQyM/SMnPvAtO2cI/AAAAAAAAAGs/UMK3PedXcLk/s320/dscn2615.jpg" alt="" id="BLOGGER_PHOTO_ID_5244951647600171458" border="0" /></a>The MythTV program guide.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_p__S3T9vQyM/SMnP8ld2qKI/AAAAAAAAAG0/l28-yscbpM4/s1600-h/dscn2601.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_p__S3T9vQyM/SMnP8ld2qKI/AAAAAAAAAG0/l28-yscbpM4/s320/dscn2601.jpg" alt="" id="BLOGGER_PHOTO_ID_5244951880806082722" border="0" /></a>For fun, I re-branded the Windows <a href="http://www.mythtv.org/wiki/index.php/MCE_Remote">Media Center Remote</a>.<br />(You can guess what logo was there originally.)<br /><div style="text-align: left;">So that's it.<br /></div></div>wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-33512770257073012152008-08-25T15:26:00.000-04:002008-08-25T15:35:21.247-04:00Large numbers are truly incredible<blockquote>Here's a favorite example: every time you drink a glass of water, the odds are good that you will imbibe at least one molecule that passed through the bladder of Oliver Cromwell. It's just elementary probability theory.<br /></blockquote>--Richard Dawkins, <span style="font-style: italic;">The God Delusion</span>, pg. 366<br /><br />That's such a fascinating claim I had to do the math myself. Obviously, the water cycle is too complex to model exactly, but this is a guesstimate after all. To make things extra hard, let's bias all the numbers by rounding them to weaken the chances of this happning.<br /><br />What number shall we use? <a href="http://science.howstuffworks.com/question157.htm">How Stuff Works</a> says there are 326 million trillion gallons of water on Earth. Let's round that up to 10^21. Let's assume an 8 oz glass of water for this experiment. And, according to the Wikipedia birth and death dates for Oliver Cromwell and a <a href="http://www.starlightccd.com/walter/bytebook/javascript/datediff.htm">date subtractor</a>, Cromwell lived 21,681 days. Again, let's make this more challenging, by assuming he only peed 1 fl oz a day. (One source I found said people pee 1.5 - 2 liters a day!) The rest are just conversion factors, which are not exact and of course depend on the temperature of the water. But the difference turns out to be many magnitudes, so the conversion factors only need to be correct to within one magnitude for the premise to hold.<br /><br />1. How many mols H2O are in an 8 oz glass?<br /><br /><blockquote>8 fl oz * 29 grams / fl oz * 1 mol H2O / 18 grams = 12.8 mol H2O, which we'll round down to 10 mol H2O</blockquote><br />2. How many mols H2O are on the Earth?<br /><blockquote><br />10^21 gallons * 3.78 L / gal * 1000 grams / L * 1 mol H2O / 18 grams = 2.1 × 10^23 which we'll round up to 10^24 mol H2O</blockquote><br />3. How many mols H2O did Oliver Cromwell pee?<br /><br /><blockquote>21,681 days * 1 fl oz / day * 29 grams / fl oz * 1 mol H2O / 18 grams = 34,930.5 mols H2O which we'll round down to 10^4 mol H2O</blockquote><br />So what does that give us? The percent of Cromwell's pee to the total water of the world is: 10^4 / 10^24 or 1 part per 10^20. That seems like a pretty small percentage. Yet in one glass of water, there will be<br /><br /><blockquote>10 mol H2O * 6.0221415 × 10^23 molecules / mol = 6.02 * 10^24 molecules</blockquote><br />So from a sample where we have a 1 in 10^20 chance of getting a molecule of Cromwell-water, we take 6 * 10^24 samples. Heck, by these probabilities, we'd have a likelihood of getting roughly 6000 molecules of water that once passed through Cromwell's bladder. I personally doubt that all the world's water mixes evenly, and most of it stays at the bottoms of the oceans, making the pool of drinkable molecules drastically smaller. And I believe the Cromwell probably peed more than 1 fl oz a day. And although I certainly concede the possibility that many of the water molecules that Cromwell passed may no longer exist because they were broken up by photosynthesis, I think it's still possible to say that "the odds are good".wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-60945143862323313162008-04-07T18:15:00.000-04:002008-04-07T18:24:06.491-04:00Dreaming of the future...<span>(Prompted by <a href="http://www.kdedevelopers.org/node/3382">this blog post</a> on Nepomuk.)<br /><br />I love envisioning the future; it makes me feel like Leonardo Da Vinci, sometimes. It's one of those areas where I know I can't be much worse than even experts. Plus, since I'm not actually predicting, just dreaming, it's OK if my predictions don't come true.<br /><br />dream of KDE 4.5 with Nepomuk+Strigi power!!!<br />*There's a new Contact application that brings together all your email, IM, VoIP, and Facebook contacts.<br /><br />*Amarok uses Last.fm to find all the similarities between your music collection and your Facebook friend's music. When playing songs, it shows a little note, saying "Your [friend / co-worker / brother] Joe likes this song too." With a right-click, you can suggest a track to any of your contacts.<br /><br />*When I type someone's name in a search box, it gives me options to send an IM (if they are online), email, message their Facebook directly.... That might be in a "Contact" pane. In another pane, it might show pictures of Joe, emails/IM logs from Joe, Joe's Facebook/Twitter status, and files on my computer from Joe. Another pane provides suggestions of files I might want to send to Joe such as recent pictures of Joe I took, or something I've sent to many of Joe's friends.<br /><br />*I can type "old english essay politics" in the search box, and it will find it even though the words "old", "english" and "essay" are not in the filename or the document itself. It found the word "politics" (and associated words like "democracy") in the file, detected the name of my English teacher, knew which years I was her student, and thus knew it was "old" even though I updated the file it last week.<br /><br />*Bob sends me an email asking when the Block Party and ice-skating event is. Since the Block Party is scheduled on Facebook and the ice-skating event on my co-worker's Google Calendar, KMail asks "Do you want to tell Bob that the Block Party is this Tuesday and the ice-skating is Mar 23?" and will write a template email for me. In KDE's internal calendar, Bob is marked as "possibly attending" those events. If he later replies, "Great! See you there" KDE marks him as attending, and updates my grocery list accordingly. (Earlier I got an email saying I was responsible for bringing punch to the block party.)<br /><br />*Haha, and now we're getting to where the fridge orders more food... I always end up there somehow. :-)<br /><br />Those last few examples bordered on AI, but regardless, this is going to be a great leap. Using an ontology and marking the relationships between files will help computers finally understand what files are. I might have a scan of piano music, a photo I took on vacation, a drawing my brother made in the GIMP, and a screenshot of my desktop, and all the computer sees is four JPEG images. Once that limitation is breached, I think computers will become much more helpful to people.</span>wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-84578733587738798152008-01-12T00:49:00.000-05:002008-09-11T22:32:32.089-04:00KDE 4.0.0The long awaited and much anticipated 4.0 release of KDE has arrived! Due to the KWin <a href="http://techbase.kde.org/Projects/KWin/4.0-release-notes">release notes</a> - the <a href="http://websvn.kde.org/*checkout*/trunk/KDE/kdebase/workspace/kwin/COMPOSITE_HOWTO">COMPOSITE_HOWTO</a>, to be precise - I got KWin OpenGL effects working! They're fairly smooth on my Nvidia card, although they don't seem quite as smooth as I remember Compiz being. Hopefully it, or X, or the Nvidia drivers, will improve to make KWin 4 w/composite snappy. (It's not really "snappy" at this point like KWin 3 is.) I haven't managed to install the KDE Edu or KDE Multimedia modules yet, and I am stuck with the Plasmoids that aren't in extragear, but hopefully Ubuntu will get those re-packaged for 4.0 soon. (The current packages for those things depend on RC2, I think.)<br /><br />KDE 4.0 is not perfect. I wish I could put the panel at the top of the screen, for instance. But I could certainly live with it (although I probably won't). I may stick with KDE 3.8 for a few more months, until I start writing plasmoids, or some other killer feature drags me into the new millenium. By the time Amarok 2 is released, and Decibal is added, etc, I'll probably convert. At the moment, GTK apps look really bad, probably because I don't have the appropriate qt-theming-for-gtk-apps thing installed. I'm sure Kubuntu will figure that out for Hardy at the latest. I may insist on making it work sooner by doing the appropriate Google or IRC dance. We'll see. I'm proud to have helped the KDE project, albeit in very small ways. (One or two bug reports and a miniscule excursion in bug triage, which I plan to continue, time allowing.) Mostly, just because KDE is the darn best collection of applications for the free desktop. But also, because of the enormous vision of the project, encompassing everything from Windows and Mac ports to integrating Plasma with Linux MCE. It's a bright future. The present is bright too, obviously.<br /><br />(If your wondering, why on earth I'm polluting the world with yet another random-user-posts-his-KDE4-experience, it's mostly because it's past midnight, and I get confused and ramble/waste time after 12:00.)wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-17374646600038705802007-08-24T21:40:00.000-04:002007-08-24T21:46:45.686-04:00GPG vs. S/MIME<span style="font-size:85%;">So, after learning how to send emails with Python, I discovered that anybody can impersonate any email address. This is rather dangerous. Consider some hypothetical situations: Someone sends a flaming email to your boss using </span><i><span style="font-size:85%;">your</span></i><span style="font-size:85%;"> email address, and you get fired! Or someone could send an email to my girlfriend (these are hypothetical situations) saying I want to break up with her. I ask her what is wrong, but she refuses to talk to me for a week! Even if I eventually find out what happened and assure her the email wasn't sent my me, damage is still done in the mean time.</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">So I when I read that in the latest preview of Kubuntu (</span><a href="https://wiki.kubuntu.org/GutsyGibbon/Tribe5/Kubuntu#head-30e591a496fc39936dabbd25cbe5431664334491"><span style="font-size:85%;">Gutsy Gibbon, Tribe 5</span></a><span style="font-size:85%;">) that Kmail would be installed with all the programs needed for GPG (GnuPrivacyGuard), I decided to try GPG. I followed these </span><a href="https://help.ubuntu.com/community/GnuPrivacyGuardHowto"><span style="font-size:85%;">simple instructions</span></a><span style="font-size:85%;"> on the Ubuntu community documentation page. It was as simple as "sudo apt-get install mozilla-thunderbird-enigmail". I then followed the commandline instructions to generate a key pair and import them into Enigmail. (Enigmail has a GUI to generate and manage keys, I later found out.) It was as simple as putting in my name and email address and then issuing a command to upload my public key to the Ubuntu keyserver. (Keys are propagated to all the keyservers after some time.) Then, I could compose an email in Thunderbird and digitally sign or encrypt it via the menu or toolbar buttons. I sent a few emails to myself to test. The signature would automatically be verified and little icons and status bars would indicate that emails were signed or encrypted.</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">With the default settings, in order to sign my message, all the HTML formatting would have to be removed, and ugly text was added to the body of the email. E.g.,</span><span style="font-size:85%;"><br /></span><blockquote><span style="font-size:85%;"><br /></span><span style="font-size:85%;">-----BEGIN PGP SIGNED MESSAGE-----</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">Hash: SHA1</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">This is a sample text.</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">This is more sample text.</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">The End</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">Love,</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">William</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">-----BEGIN PGP SIGNATURE-----</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">Version: GnuPG v1.4.6 (GNU/Linux)</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">iD8DBQFGzvFPhnWcV3yyfeERAsnFAKCUHyC5AZuI7jDAxhDI6DUfm6wN2gCgpbJw</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">vQXQ9cbH1TirrA4ppa6QYKg=</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">=SQbg</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">-----END PGP SIGNATURE-----</span></blockquote><span style="font-size:85%;"><br /></span><span style="font-size:85%;">I surely wasn't going to send emails looking like that! Luckily, there is an option (called PGP/MIME) that makes the PGP signature an attachment and preserves the HTML formatting. However, unless the people receiving the emails have a PGP plugin installed, they would simply see normal emails with attachments called "signature.asc". Not only is that anoying, it defeats the purpose, which is for them to be able to know if the email really came from me.</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">I learned that a different type of security, called S/MIME, is built into most email clients, including Microsoft Outlook and Mozilla Thunderbird. It uses the same encryption technology, but instead of using self-generated keys that are uploaded to public servers, it requires getting a key pair from a "certificate authority". In essence, instead of a community based "web of trust", it is a corporate based "buy a certificate and trust us, the corporation". Obviously, S/MIME has caught on, because companies like VeriSign make money off of it. ;-)</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">Fortunately, at least one certificate authority, Thawte, will give you a free "certificate" (read "private/public key pair") for personal email use. (These certificates, by the way, are the same technology used in SSL and HTTPS secure websites.) Therefore, I decided I would get a free "certificate" and and try S/MIME.</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">EASIER SAID THAN DONE!!!</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">I had to register with Thawte by giving them my name, email, date of birth, nationality, prefered currency and (because they need five security questions in case I ever forget my account password) the name of my first goldfish, first crush, favorite band, birth location, and the year I started homeschooling. The had to send me an email to verify my address. The first email didn't come, so I had to do the whole registration process over again. I got the email, followed the link to put in some codes they gave me in the email. Finally, I was allowed to request a certificate. I could get either:</span><span style="font-size:85%;"><br /></span><ul><li><span style="font-size:85%;">a Mozilla Firefox/Thunderbird, Netscape Communicator/Messenger certificate</span><span style="font-size:85%;"><br /></span><li><span style="font-size:85%;"> a Microsoft Internet Explorer, Outlook and Outlook Express certificate</span><span style="font-size:85%;"><br /></span><li><span style="font-size:85%;"> a Lotus Notes R5 certificate</span><span style="font-size:85%;"><br /></span><li><span style="font-size:85%;"> an OperaSoftware Browser certificate</span><span style="font-size:85%;"><br /></span><li><span style="font-size:85%;"> or a C2Net SafePassage Web Proxy certificate</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">certificate.</span><span style="font-size:85%;"><br /></span></ul><span style="font-size:85%;"><br /></span><span style="font-size:85%;">Because I currently use Mozilla Thunderbird, I asked for a Mozilla Firefox/Thunderbird, Netscape Communicator/Messenger certificate. It complained because I was using the Opera web browser! So I tried getting the certificate with Firefox, but Firefox would not accept it. (I got the impression that Firefox would only accept PKCS 12 files, and apparently this was a PKCS 7 certificate?) I went to the support page, and found instructions on how to export a certificate from IE to Thunderbird. So I booted Vista and requested a certificate for IE (remember, these certificates work for Internet browsing too, although I have no idea why one would need one). It would not work on IE7 in Vista. (VBScript error.) So I went downstairs to an XP computer and requested a certificate for IE on it. Still using IE7, but on XP, it worked. I then exported the certificate from IE with the "export private key" option, and imported it into Thunderbird. But when I tried to send a signed message, I got an error! So I exported the certificate from IE again, with both the "private key" and "Include all certificates in certification path if possible" options, and imported into Thunderbird again. At long last, voilà! It worked! About time! Creating a GPG key pair and configuring Enigmail took about an hour of my morning. Getting a S/MIME certificate and importing it into Thunderbird took the whole afternoon!</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">The advantage of S/MIME, of course, is that I can sign all my messages, and other people will see it and think "Hey! That's like, secured or something," instead of "What's with the weird attachment?" They don't have to install extra plugins. (And there may be no good GPG plugins for Outlook. The </span><a href="http://www.gpg4win.org/"><span style="font-size:85%;">Gpg4win project</span></a><span style="font-size:85%;"> is doing it's best to make GPG easy on Windows, but they say Outlook doesn't allow the kind of functionality needed for PGP/MIME encryption or automatic decryption.)</span><span style="font-size:85%;"><br /></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">So what can I say? I like GPG better. It's open-source, easy to set up, and is more than secure enough to verify that </span><b><i><span style="font-size:85%;">this</span></i></b><span style="font-size:85%;"> email came from the real owner of </span><b><i><span style="font-size:85%;">this</span></i></b><span style="font-size:85%;"> email address. S/MIME is less transparent, is designed to benefit corporations like Thawte and VeriSign, and the setup process - which could have been made very easy! - is a terrible user experience, at least with Thawte. (However, Thawte may be the only company that issues free email certificates that don't expire.) With GPG, I know that the only copy of my private key in the world is on my computer: you would have to hack into my computer to steal it. Thawte, on the other hand, generated the keypair for me, and they have a copy of my private key that I can redownload at any time. I'm trusting the employees of Thawte not to steal my key, AND I'm trusting that their servers can withstand attacks from hackers. Thawte harvested a lot of personal information in the registration process, which makes the possibility of identity theft even worse. However, I can't revoke the certificate. So which will I use: GPG or S/MIME? S/MIME, because it works with the leading email clients without my friends having to install extra software. However, I will keep my GPG signature and Enigmail around, because it might come in handy someday.</span>wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com2tag:blogger.com,1999:blog-1886736394455910847.post-11460048817967461462007-08-21T01:17:00.000-04:002007-08-21T01:39:37.781-04:00GNU/LinuxSomeone else's blog post on <a href="http://azerthoth.blogspot.com/2007/08/why-i-refuse-to-call-it-gnulinux.html">why he uses the name Linux</a> instead of GNU/Linux inspired me to write my own opinion of the matter. I too, choose to say "Linux", although if I was actually talking to someone who was interested, I'd probably say I use "Kubuntu Linux", because that is more accurate.<br /><br />Here's what I think:<br />Arguing about the name is stupid. You might as well argue that America should be renamed America/Columbus. All Amerigo Vespucci did was recognized the land as a new continent; he couldn't have done that without the help of Columbus, who discovered the land. (True history buffs would insist it should be called America/Ericson, because Leif Ericson discovered America long before Christopher Columbus did.)<br /><br />Only a small few think "Linux" refers only to a kernel. To the rest of us, "Linux" is the catch-all posterchild word for "open source operating system and software."<br /><br />Arguing over the name is looking backwards instead of forwards. It is fighting over recognition instead of cooperating towards <em>real</em> recognition... by the world.wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-60829773833639788612007-06-19T17:03:00.000-04:002007-06-19T17:13:20.978-04:00The future of: Spell CheckingNovember 17th, 2006<br /><br />Spell checking is in serious need of improvement! I’m currently writing this in OpenOffice.org Writer, so I’ll use it as an example. Say I add the word “macronutrient” to the standard custom dictionary. After adding the word, none of the obvious variations are recognized; I have to add “macronutrients” (plural), “macronutrient’s” (possessive), “Macronutrient” (capital), “Macronutrients’ ” (capital plural possesive), and so on individually. It’s a pain in the butt!!! How hard could it be to apply a little grammatical logic? At a bare minimum, OpenOffice ought to be able to ignore “s” and ” ’s” at the end of a word, and accept capitalized words at the beginning of sentences. Ideally, whenever I add a word to the dictionary, OpenOffice would let me choose what part of speech the word is (noun, verb, adjective, adverb) and use that information to determine that “Macronutrients’ ” is logical, but not “macronutriented”.<br /><br />The best idea would be to ask users, whenever they add a word to their custom dictionaries, whether the word ought to be part of the standard dictionary. If they say yes, a message would be sent to the folks who write the OpenOffice spelling dictionary, so they could double check the word’s authenticity and quickly add it to the main dictionary. That way the main dictionary would improve over time.<br /><br /><span>What spell checking OUGHT to be like NOW:</span><br /><br />But let’s consider spell check at the global level. Spelling dictionaries ought to be shared between all the applications on your computer: word processors, email clients, web browsers, text editors, etc. Switching between dictionaries or enabling combinations of dictionaries should be a piece of cake. For instance, I’d like to have an “Email slang” dictionary that is applied only to emails and forum postings, containing words such as “lol”, “iirc”, and “rtfm”. However, I ought to be able to switch that dictionary off quickly if I’m writing a formal email.<br /><br /><span>Advanced ideas for Spell Checking in the future</span><br /><br />In the future, I’d love to see more “project based” spell checking. I’d love to have custom dictionaries specifically for certain subjects, such as chemistry or biology, and to be able to specify in my Chemistry and Biology document templates that those dictionaries ought to be applied when spell checking documents made from these templates. Or if I’m writing an essay about <i>The Ramayana</i>, it would be nice if my word processor could downloaded a dictionary of character and place names to supplement the spell check. For materials whose copyright has expired, word processors could download the entire e-text to help correct quotations. Auto-completion could be a huge boon, too. Imagine I’m writing a report on <i>The Adventures of Huckleberry Finn</i>. I type:<br /><br />“You don’t know about me without you have read<br /><br />and a balloon appears, saying<br /><br />“… a book by the name of The Adventures of Tom Sawyer; but that ain’t no matter.” [Complete Quote] [More Sentences]<br /><br />Such a feature would allow users to quickly and accurately quote large portions of text. It could be especially helpful if you knew how a quote started, but not what page it was on.<br /><br />Think about it. The next time some tells you spell checking has reached it’s potential, reply “Nay! we have not yet begun to spell check!”wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-44584036999087173792007-06-19T16:58:00.000-04:002007-09-17T11:05:54.011-04:00Smart WallpapersNovember 17th, 2006<br /><br />Here’s an “I like my desktop to be beautiful and informative” idea.<br /><br />Today, we pretty much choose static wallpapers because they look good. (Although I think Macs have a slideshow wallpaper function.) I once thought: “Wouldn’t it be cool if my wallpaper could reflect the environment outdoors?” Meaning, could I have a wallpaper that reflected the season, weather, and time of day? (I’m not the only person to come up with <a href="http://www.kde-look.org/content/show.php?content=46546">this idea</a>.) Doubtless there is software that can do that (I didn’t find any freeware that did it) but it got me thinking. What if wallpaper was more information-aware?<br /><br />What if instead of a static image, we had “Wallpaper Widgets”? Imagine a Wallpaper Widget that showed a different picture if you have new email, or that displayed a slideshow of the latest NASA images, or that changed colors depending on the stock market. Add transparency support, and multiple Wallpaper Widgets could be layered, so that your desktop could show a weather based wallpaper by default, an envelope wallpaper if you had new mail, and on top of those, a translucent wallpaper that was tinted green or red based on the stock market! Obviously, a generic wallpaper widget could be made that simply lets users pick a static image to display, but advanced generic wallpaper widgets could be written to handle picture slideshows, wallpaper rotating, and so on.<br /><br /><i>Postscript 6-19-07:<br />I bet this is achievable in Plasma. (Meaning I could make transparent Plasma applets that take up as much size as the screen.)<br /><br />Postscript 9-17-07:<br />Wow! Plasma "backgrounds" really are applets! <a href="http://aseigo.blogspot.com/2007/09/plasma-backgrounds.html">This is going to be so cool!</a><br /></i>wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-77774451755856288822007-06-19T16:46:00.000-04:002008-07-05T21:19:53.954-04:00The thing about Desktops<span>November 16th, 2006<br /><br />I’ve recently come to the conclusion that today’s desktop paradigm is no good. I’ll list my reasons and justify them in a minute.<br /><br /><Windows specific rant><br /><br />First, let me get this out of the way – it doesn’t have to do with the modern desktop paradigm, but SHARED DESKTOP ICONS SUCK!!! Reason: There’s no way to distinguish between shared and non-shared desktop shortcuts! When person A installs software X, software X almost always sticks a single shortcut in the shared desktop folder. Each person can place the shared icon in a different position on the screen, which makes users oblivious that it’s shared until person B says “I’m tired of this icon” and deletes it. Then person A wonders what happened, and has to dig around in the Start Menu to find the program, create a new shortcut, and put it on his desktop. Shared desktop shortcuts are a STUPID idea. They just cause extra work, by eventually needing to be replaced with multiple non-shared shortcuts. Software X should just install a separate shortcut for each user in the first place. In my experience, this is the dumbest idea Microsoft incorporated into XP.<br /><br /></Windows specific rant><br /><br />I fell better now. Onto my essay!<br /><br />What is the Desktop?<br /><br />The Desktop is a “special” folder. What are you supposed to do with it? Well, it’s like a real desk: you set whatever you want on it. It is not organized in any way. Currently the desktop serves two main functions: Application/file Launcher, and File Folder. (It also has some strange miscellaneous functions in Windows, such as possessing the Recycling Bin, which is neither in the Desktop folder, nor is it a shortcut, and if you install Microsoft Outlook, a mysterious Outlook icon that has unique and powerful properties, yet is neither a shortcut, nor a file.) On all operating systems I’ve encountered, Desktops perform essentially these two functions, and do both only crudely.<br /><br />Why is the Desktop an application launcher? Windows already presents two other paradigms, the Start Menu and the Quick Launch bar, for that purpose, and Linux has even more (such as Katapult). (In Windows, I use an auto-hiding Custom Toolbar on the left side of the screen as a third paradigm.)<br /><br />Why is it a file folder? It is not a very good one, because placing files on the Desktop means they can’t be organized into other folders. The only files that make sense belonging on the Desktop are miscellaneous or temporary files.<br /><br />(On Mac and Linux): The desktop is a place where mounted drives appear (cameras, USB drives, CD-ROMs, etc.) That is convenient, but somehow it doesn’t make sense to me. That is simply assigning a third, magical property to the Desktop. The drives are not files or shortcuts, and the fact that they appear and disappear seems out of line with the normally “fixed” nature of other desktop icons. However, it may be the only thing the Desktop does well.<br /><br />What should the Desktop be?<br /><br />So today’s desktops are crummy, but what should tomorrow’s desktop be like? How could the desktop become useful again? (I try not to rant about something without first having some idea about how it could be better.)<br /><br />Should the Desktop be a place for temporary files? Keeping temporary files on the Desktop looks messy - and we want our computers to be beautiful. Besides, Windows has another folder called “Temp”, and Linux had “lost+found” and “tmp”. A separate tool that specialized in dealing with temporary files, by letting you assign notes to files or automatically cleaned out old files for instance, would be better.<br /><br />Should the Desktop be an Application launcher? It could be a good one, if it allowed labels, grouping, and organizing. However, it has some disadvantages. One, the desktop takes longer to get to than the Start Menu. Two, it takes up an awful lot of space. It would be convenient for those programs you use rarely, though, because it probably has enough space to list all the programs on your computer. I think an improved start menu, or an enhanced version of KDE’s Katapult launcher could perform the task of launching applications and files equally well.<br /><br />The Desktop should be a portal for information. That’s the concept I’m favoring right now. I think the trend towards “widgets” and “gadgets” that display weather, pictures, new emails, and so on seems to indicate that other people agree this is a better use for the desktop.<br /><br />As a final note, I wrote this essay before reading about the plans for the KDE 4 Desktop (Plasma). Plasma shows signs of being very useful. It will integrate a widget platform (SuperKaramba) into the desktop applet system, so that applets can live in system panels (bars), the desktop, or float freely. Plasma also plans to give the desktop the “bring to front” on a hot key power that is popular among widget engines, making the Desktop a useful tool for display information. But chances are, it will still work as a crappy folder and application launcher.<br /><br /><span style="font-weight: bold;">Edit:</span> Either I'm a brilliant visionary, or A. Seigo and I are crazy in the same way... for KDE 4.1, Aaron is <span style="font-style: italic;">removing</span> the desktop's ability to be a crappy folder and application launcher! Instead, he's delegating that responsibility to a new Folder View plasmoid (which can be made full screen to please old farts) that brings the new ability to show several folders (including remote folders!) on the desktop in an orderly fashion. Good for him!<br /></span>wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-15789602310092033282007-06-19T16:33:00.000-04:002007-06-19T17:16:25.368-04:00My Take: why KDE is better than GNOME<span>November 16th, 2006<br /><br />I tried both Ubuntu and Kubuntu. I have both installed, but have come to prefer Kubuntu so much that I only boot Ubuntu to perform rescue operations on my Kubuntu partition. (As a newbie, I did a lot of those the first month, lol.) Arguing that one desktop environment is better than the other is generally flame-bait and leads to pointless arguing over differing philosophies, so instead of some high, philosophical argument, I thought I’d just share my personal experiences, and explain why I like KDE.<br /><br />I use KDE for a few reasons.<br /><ul><li>I find KDE is more responsive: e.g. my mouse NEVER FREEZES! (Except when the whole computer freezes…. ) That’s what had me hooked. It felt snappier running from the live CD than Ubuntu did running off my hard disk. For instance, I get a noticeable delay (a quarter or half second) between when the Gnome “Applications” menu drops down and when it gets populated with icons. </li></ul><ul><li>I like the default “look” (shiny and blue) for Kubuntu much more than the default “look” for Ubuntu (flat and brown). I know some people don’t care about eye candy, but it really does matter to me. Little things, like how the close button in KDE windows fades to red when you hover over it, just makes KDE a more pleasent asthetic experience. If you use a computer for hours on end like I do, it helps if you’re staring at something beautiful. (Although I found customizing the theme and window decorations much easier in Gnome than in KDE.)<br /></li></ul><ul><li>I’m a customizing freak. I change everything. KDE has more options to change. A lot more options. I’m a very capable person, and Gnome sacrifices capability just to make things “simple”. For instance, compare Gnome’s and KDE’s handling of removable mass storage devices. On Gnome, I only found one option: “Mount devices automatically” or not. On KDE, you get an XP style pop-up with customizable options based on the type of content (CD, flash drive), and you can define commands to run automatically when certain types of media are inserted (e.g. “Play Audio CD’s with Kaffeine”), and what options to present when different media is inserted.<br /></li></ul>Lastly and most importantly, I like KDE software better than their Gnome counterparts. Konqueror is superior to Nautilus, for instance, and I think Amarok is cooler than the default Gnome music player (Rhythmbox). Also KDE has killer apps, like Yakuake, a console that drops down at the touch of F12, and Katapult, which lets you launch programs by typing Alt+Space and the first few letters of the program’s name.<br /><br />These are just my opinions of course. Both Gnome and KDE are good desktops and should both be developed further, because competition will help encourage them both to improve. I can easily see a future where I use Gnome at work and KDE at home.<br /><br /><i>Postscript 6-19-07:</i><br /><i>As I've delved deeper into the inner workings of Linux, I'm impressed by the technology inside KDE, particularly DCOP. (Although I'm looking forward to when all applications adopt the new DBUS standard.) I've also been impressed by the level of integration among applications and consistency. I'm really looking forward to KDE4, which has lots of exciting libraries to make life easier for developers.</i></span>wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com0tag:blogger.com,1999:blog-1886736394455910847.post-29293422603128828472007-06-19T16:26:00.000-04:002007-06-21T21:44:06.305-04:00First PostI got a Blogger account so that I could post comments on other people's blogs. Now, I think that instead of maintaining my WordPress blog on a machine at home, I'll try using Google for convenience. I had 4 or 5 posts on my WordPress blog, and I will replicate them here.<br /><blockquote><br />Hello world!<br />November 14th, 2006<br /><br />This is my first post. This is my second blog. It’s not a blog about me.<br /><br />It’s a blog about my ideas.<br /><br />Because I want to share them with the world. I hope you like them.</blockquote><br />This time I don't think I'll limit myself like that. If I want to blog about something personal, I'll just do that OK? No need to <i>always </i>be detached.wmhiltonhttp://www.blogger.com/profile/08055023567051937376noreply@blogger.com1