Posted by Brian @ 9:48 am on October 3rd 2009

How to fix the crontab: no changes made to crontab error using VIM in Linux

I recently upgraded vi to vim on one of my servers and was puzzled why changes weren’t being saved when I edited my crontab file using crontab -e. I would make changes to the file, save them, but still get this error:

crontab: no changes made to crontab

I found a lot of unhelpful advice from checking permissions on the files and directories, to using different editors, to checking cron.allow and cron.deny. None of those worked.

It turns out that .vimrc needs to have a one line configuration option set. You’ll find .vimrc in your home directory (/root for superuser). Just add this line:

set backupcopy=yes

and you’re on your way.

Posted by Brian @ 9:54 pm on September 3rd 2009

How Microsoft Silverlight ruined Netflix Instant Viewing

I’ve been a Netflix customer for over a decade, and for years I’ve been using an old Compaq laptop to watch high quality streaming video from Netflix. And despite being old, the laptop was more than fast enough for the highest bitrate streaming Netflix offered. Once it a while I’d have a buffering issue, but the playback was always smooth at 1024×768 resolution.

Until tonight, when Netflix required me to install Microsoft Silverlight in order to watch streaming video. With Microsoft Silverlight installed, the video is unwatchably choppy at 1024×768 resolution – I get maybe 12 frames per second. At 800×600 it’s still choppy. And the video quality is substantially worse. I’ve gone from near-DVD quality to what looks like a badly copied VHS tape. There’s no excuse for it – this is shoddy programming from Microsoft. The old player worked fine, and other high quality streaming video works great as well.

I’ve got no problem upgrading to new technology when something better or faster comes along. I bought an iPhone 3gs recently because of the improvements from the prior models. I can’t stomach wasting money because Microsoft can’t be bothered to write quality software. My choice now seems to be, give up instant viewing, or waste hundreds of dollars on another laptop. Looks like I’m giving up instant viewing. Way to go, Microsoft. Fantastic move, Netflix.

Oh, wait. YouTube just announced they’re going to offer pay per view. And their high quality video streams great using Flash Player! Looks like Google just won over a customer.

Posted by Brian @ 10:34 pm on May 1st 2009

Stress: easy, quick, effective load testing under Linux

I recently had the pleasure of installing Monit on one of my personal servers. At OpenSourcery we use more complex tools like Nagios + Munin, but I needed a simpler utility for monitoring services, and Monit also allowed me to easily restart a service that may have died. Thumbs up all around.

And while I was able to install and configure Monit in just a few minutes, I didn’t have an easy way to test different loads on the system. Enter stress, which was equally painless to configure and set up, giving me a number of ways to controllably test load on the server in question.

Once again the power of open source proves itself. Total time invested, less than one hour. I didn’t have to pay for a thing, and everything just worked.

Posted by Brian @ 5:21 am on August 29th 2008

Iphone geolocation in hungary

Geography may not be my strong suit but geolocation in Hungary on my iPhone seems a little off. The iPhone believes I an on Liverpool.

Posted by Brian @ 3:51 pm on August 28th 2008

Pretty stoked on iphone wordpress app

I had a little snag with an “invalid post id mismatch” but once I erased the messed up post in my iphone everything worked fine. Seems that the app sent the post to my server but wasn’t able to update itself.

Posted by Brian @ 1:41 am on August 23rd 2008

Fixed iphone wordpress app crash

My theme, indexnet 1.0, was displaying non-UTF8 characters in the index.php file, specifically the offending characters are next to the next page and previous page. Posted from the iPhone wordpress app!

Posted by Brian @ 10:56 am on April 24th 2008

Another reason I love Linux

I just had to scan 19 pages of a paper application. Problem was, I saved each file as a JPG, leaving me 19 different files. Not nice to email that. So I just stitched them all together into a single PDF called “app.pdf” using this command:

I call that power and simplicity.

Posted by Brian @ 10:48 am on April 6th 2008

Accidental Configuration Syndrome

“Accidental Configuration Syndrome” (ACS) is what I’m calling the act of repeatedly and accidentally altering the configuration of an application and/or operating system. ACS leads to unnecessary confusion, frustration, and technical support calls. ACS primarily afflicts older people or those with average or less than average mouse and keyboard manipulation skills.

I’ve been providing technical support for my Dad and in-laws’ desktop Linux machines for years now. Linux on the desktop is an excellent fit for them, but they all suffer from ACS.

Just yesterday I restored OpenOffice’s primary toolbars on my father’s machine. These toolbars are his primary interface to OpenOffice – they’re critical tools, and to him they just went missing one day. Of course he had accidentally dragged them off of the primary interface, but I found that this is surprisingly easy to do. Try it; start OpenOffice and aim just two pixels below File on the primary File – Edit – View interface. Hold down the left mouse button and drag down as you might expect to do if the File menu were to appear. Did you just pull the main toolbar off of the interface? I did. Now try and put the toolbar back without screwing things up. I wasn’t able to, and it took me a few minutes to get it back to “normal.” Should the default action of a click and drag be to remove the toolbar? No. Should a mistake in a common usage action (pulling down the FIle menu) cause a major configuration action? Of course not.

Another example — at my in-laws, the main application bar in Gnome seems (to them) to change in mysterious ways. Application launch icons move around, appear and disappear without any apparent reason. What’s happening is that instead of left clicking to start an application, they accidentally right-click and select move, or accidentally click and drag. Once the damage is done, there is no easy way for them to set it right, because they weren’t intentionally making the change – they literally don’t know what they’ve done. Similarly, their desktop is periodically littered with multiple launch icons for solitaire in a failed attempt to simply start the program, again, a right-click presented a configuration option and literally in the blink of an eye they accidentally make a configuration change. To them it appears as if the program simply didn’t start – they don’t notice the new icon on the desktop.

Configuration states should also not be activated by keystrokes – the chance for ACS here is just as great.

The fix for all of this is simple, and it has nothing to do with educating people using computers. This is a user interface problem. We need to build applications and operating systems that assume people will primarily be using them instead of configuring them, and require explicit, deliberate action from a person to enable any configuration changes. Use, not configuration, must be the default state.

Posted by Brian @ 11:23 pm on March 16th 2008

Synchronizing a palm Tungsten T3 to Google Calendar, Swiftdove/Lightning and Kontact under Linux

(updated and somewhat simplified 6/8/2008)
I have finally managed to synchronize my palm Tungsten T3 to Google Calendar and Swiftdove (Thunderbird optimized for 64 bit + the Lightning calendar) as well as Kontact (aka KDE PIM or KOrganizer). I now have full read/write sync with all apps (with a few small quirks). This method should also work with Thunderbird/Lightning and presumably Sunbird but I haven’t tested that.

Quirks
There are three quirks that I’m aware of.

  • The categories from my palm do not work anymore. Something about the sync process erases the category (but not the event) from the palm. That’s something I can live with.
  • Existing repeating appointments don’t seem to display properly on Google Calendar or Swiftdove, but new repeating entries do. I’ve got about a dozen repeating appointments, so it wasn’t a big deal to delete and re-do them.
  • It takes time – several minutes or more – after a sync for changes to show up on Google after a palm sync. I haven’t fiddled much with GCALDaemon – there is probably a setting that I can change for that, but I’m okay with that for now.
  • Things I tried that didn’t work
    I’ve been trying on and off to synchronize my palm with various PIMs under Linux since 2001 with little success. Backing up through Kpilot or pilot-xfer has always worked fine, but getting real sync has been pretty much impossible until now. It may not be the holy grail, it is one of the last pieces to the perfect desktop puzzle.

    Initially I tried to get OpenSync to work. I failed with the command line tool, with Kitchensync (best name for sync software evar) and with Multisync090. The KDE PIM/Google Calendar sync failed every time, and I never could get my palm to sync. While that project looks quite promising for now isn’t ready for prime time, as they fully acknowledge on their site.

    With a bit of effort, GCALDaemon allowed me to sync between Kontact and Google Calendar, as well as Swiftdove and Google Calendar. And since I was able to sync my Palm with Kpilot (and therefore Kontact) I figured everything would be fine. Alas, that didn’t work – Kontact would display both calendars but would not pass the palm calendar to Google, and vice-versa. I was about to give up when I tried one last trick – I noticed that Kpilot allowed me to specify the ical file to link to, and that GCALDaemon uses a google.ics to sync up with Google Calendar.

    So I told Kpilot to synchronize with the GCALDaemon ics file instead of the Kontact ics and played some tricks. And it worked – with a little coaxing!

    Howto
    Here’s a guide for getting the tricky parts working under Ubuntu 7.10 (Gutsy) 64 bit. I followed this page of the GCALDaemon guide, then this page through step 5 of the same guide to set up file sync. Now on this page of the Terminally Incoherent guide for Kontact, continue from where it says “Now open Kontact” and once you get to where you specify the filename, use /usr/local/sbin/GCALDaemon/google.ics instead of the location Terminally Incoherent specifies. And since all configuration files should be stored in /etc, I moved /usr/local/sbin/GCALDaemon/conf/gcal-daemon.cfg to /etc and made a symbolic link to the original location. I also set file.polling.google to 5 minutes in the cfg file.

    By the way to get this all working you’ll need Kpilot, pilot-link and Sun’s Java. The default Java that ships with Ubuntu 7.10 will not work with GCALDaemon. You’ll also need GCALDaemon and configure Kontact to sync with GCALDaemon – install this software and then use the tutorials I liked to above.

    sudo apt-get install kpilot pilot-link sun-java6-jre

    Once you have GCALDaemon working with Kontact and Google Calendar, you can begin the next steps. Once you’ve done the following steps ones all you need to do is sync your palm normally.

    1) Make a backup of your entire palm (you may need to replace that /dev/ttyUSB1 with something else):

    pilot-xfer -p /dev/ttyUSB1 -b /home/yourname/somedirectory

    Having a backup is crucial, so don’t skip this. You were warned.

    2) Open Kpilot, go to Settings -> Configure Kpilot and tell it to sync to the same google.ics that GCALDaemon is using. Again, mine is at /usr/local/sbin/GCALDaemon/google.ics. Under the Conflicts tab choose Handheld overrides.

    Kpilot configuration screenshot

    3) Synchronize your palm and wait until GCALDaemon transfers all of your appointments to Google Calendar. I had thousands of appointments so I gave it an hour.

    4) All of the calendar entries in your palm may have vanished. Don’t panic. Sync again – all of the entries should be there. If not, restore the calendar to the palm using pilot-xfer. You don’t have to start over, just restore the calendar. Two way sync should still work with no duplicates.

    That’s it.

    Posted by Brian @ 10:58 am on March 15th 2008

    Installing Swiftfox (64 bit Thunderbird + Lightning) under Ubuntu 7.10 Gutsy

    To install Swiftdove, the 64 bit optimized version of Thunderbird that includes Lightning, into Ubuntu 7.10 (Gutsy), you need to follow these two steps:

    A) Add the swiftweasel repository to apt by adding this line to /etc/apt/sources.list:

    deb http://download.tuxfamily.org/swiftweasel gutsy multiverse

    B) Update the cache and install Swiftdove:

    apt-get update | apt-get install swiftdove-athlon64

    Swiftdove is noticably faster, and the inclusion of Lightning is a nice bonus.

    Next Page