Posted by Brian @ 1:16 pm on July 7th 2012

Fix SMTP outbound mail failing with SugarCRM 6.5

I know that sending mail from PHP was working for a particular server, because another PHP application was using the same thing. Turns out that the wizard is broken; if you skip the wizard settings and then go into the admin section and change the settings there with the proper email settings for your SMTP server it works. Here’s the offending error in sugarcrm.log:
[FATAL] SMTP -> ERROR:Password not accepted from server. Code: 535 Reply: 535 5.7.8 Error: authentication failed: authentication failure

Posted by Brian @ 11:16 pm on May 6th 2011

Fix a NameError: global name ‘OPENOFFICE_BIN’ is not defined in LibreOffice

Just minutes ago I upgraded to Kubuntu 11.04. I noticed that OpenOffice has been replaced with LibreOffice (yay!) so I ran a critical python-based OpenOffice script that I use, expecting it to break. It did break, but the fix is easy.

Here’s the error that the script threw:
NameError: global name 'OPENOFFICE_BIN' is not defined

All I did was to locate where LibreOffice put itself and add that to the script. In my script there’s a section that looks like this:

# Find OpenOffice.
_oopaths=(
('/usr/lib64/ooo-2.0/program', '/usr/lib64/ooo-2.0/program'),
('/usr/lib/openoffice/program', '/opt/openoffice.org/basis3.1/program'),
)

See that first instance of /usr/lib64/ooo-2.0/program? I replaced it with /usr/lib64/libreoffice/program and now the script works perfectly. Never in a million years would I expect this with an upgrade from a proprietary vendor. Once again, free open source software just saved me lots of time and money.

New script looks like this:
# Find OpenOffice.
_oopaths=(
('/usr/lib64/libreoffice/program', '/usr/lib64/ooo-2.0/program'),
('/usr/lib/openoffice/program', '/opt/openoffice.org/basis3.1/program'),
)

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.

Next Page