geeky | arfore dot com

Today when I needed to copy some text on my CentOS server, I ended up grabbing a bunch of whitespace at the end of each line.  Normally this wouldn’t be a problem, since I would have copied from a regular browser.  In this case I was copying from with eLinks since I don’t have a graphical browser installed yet.

Sure, I could have just navigated to the end of each line and then used shift + C to delete, but I this was a 25 line block of text and that would have been too tedious.

Here’s the quick search and replace syntax to handle this for you:

So the other night when I got home I found a sad situation.  My LCD television wouldn’t display a picture. The backlight would come on when the power button was pressed (on the tv or the remote), but nothing else was happening.

The first fix I tried was what some forums were calling an EEPROM reset. To do this follow these steps:

  1. Turn on the tv (blue led should go off)
  2. Unplug the tv from the main power
  3. Leave unplugged for 5-10 minutes (varies on exact model)
  4. Turn off the main power supply switch (located next to the power port)
  5. Plug the tv back in to main power
  6. Turn the main switch back on

In my case this procedure elicited no change to the problem, so I continued looking for other answers.  In one forum I found a reference to replacing the backlight, mainboard, or power supply. In my case the backlight was working fine and the power supply was as well.  After looking in the service manual for the 237-T11, I did find that the mainboard was fairly accessible, so if I had to get a new board it wouldn’t be that difficult to replace it.

Before taking the hardware fix route I decided to see if my problem could be resolved by a firmware update.  Olevia helpfully included a USB port on the back panel of the unit to allow for a firmware upgrade.  Since my purchase of the unit in November of 2007 at Target’s Black Friday sale, I had not applied any of the firmware updates.

Unfortunately in 2008, Syntax-Brillian, the manufacturer of the Olevia brand, filed for bankruptcy.  This made getting my hands on the firmware files, update software and instructions a little difficult.  After some diligent research I found a thread on AVSForum that had the files I needed.

The driver files didn’t work properly for my Windows 7 laptop, however they are easily obtained from the Prolific USA website (there are also drivers for Linux and MacOS X).

After following the instructions for updating I powered off the unit, waited a minute or two then powered it back on.  Success!  I was greeted with the familiar white and blue Olevia logo screen.

As an additional backup for the benefit of any other user’s, here are links to the necessary files:

imac_al_w_disc-150x150-8142721Editor’s Note: This article is part of the Tales of A Linux Switcher series.

As part of my on-going switch to Ubuntu 12.04 from Mac OS X, I ran into an issue where my cdrom device was not being mapped properly in the OS.

Everything works as desired except for one little thing: the eject key on the Apple Aluminum USB keyboard was not triggering the eject sequence of the built-in slot loading SuperDrive.

I assumed that there would be a device mapped to the actual drive using a link to /dev/cdrom.  This didn’t turn out to be the case.  When using the eject command from a terminal I received the following:

$ eject
eject: unable to find or open device for: `cdrom'

When I did a directory list to find any applicable cdrom device entries in the udev root (/dev) I got the following:

$ udevadm info --root
/dev
root@foreandy-iMac:~# ls -l /dev/*cd*
ls: cannot access /dev/*cd*: No such file or directory

In order to determine exactly which device was being used for the optical drive, I looked at the output from system’s cdrom device entry:

$ cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

drive name: sr0
drive speed: 24
drive # of slots: 1
Can close tray: 1
Can open tray: 1
Can lock tray: 1
Can change speed: 1
Can select disk: 0
Can read multisession: 1
Can read MCN: 1
Reports media changed: 1
Can play audio: 1
Can write CD-R: 1
Can write CD-RW: 1
Can read DVD: 1
Can write DVD-R: 1
Can write DVD-RAM: 0
Can read MRW: 0
Can write MRW: 0
Can write RAM: 1

The next step was to create the symbolic link in the device root to map cdrom to the appropriate device as listed in the above output:

$ sudo ln -s /dev/sr0 /dev/cdrom
$ ls -l /dev/*cd*
lrwxrwxrwx 1 root root 8 Jul 30 09:58 /dev/cdrom -> /dev/sr0

Now I can use both command line utilities to work with the optical drive as well as the built-in eject key on my keyboard.

If you want a lot more detail on this issue check out this bug comment.  While not specifically dealing with a Mac, the issues and solution are the same.

gimp_logo-150x150-5893353Editor’s Note: This article is part of the Tales of A Linux Switcher series.

If you are a graphic designer or developer, or you just have a need to edit images, a mainstay of your Linux toolbox is likely to be the Gimp.

If you are coming from the Mac or Windows world, it is probable that you have used Adobe’s Photoshop program to achieve your image editing needs in the past.  Having used Photoshop and Gimp extensively over the past decade, I can tell you that one of the features I liked about the Photoshop environment on Windows has been the unified window.  All the palettes, toolbars and editing windows exist inside a single, unified window.

I always missed this when using Gimp on Linux (or the other OS as well, since Gimp is available for all three icon_smile-1494026 ).  One of the main feature draws for me to the latest Gimp release, version 2.8, was this single line in the release notes:

GIMP 2.8 introduces an optional single-window mode.

Awesome! Of course, Gimp 2.8 is not in the current Ubuntu 12.04 repository (Note: Ubuntu 12.10 has version 2.8 listed in the repository!) :

$ apt-cache policy gimp
gimp:
 Installed: (none)
 Candidate: 2.6.12-1ubuntu1
 Version table:
 2.6.12-1ubuntu1 0
 500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

Not to fear! Using the following set of commands you can successfully obtain the Gimp 2.8 software as well as a compatible version of the plugin registry:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update

As you see from a policy check, after adding the repository and updating the cache, you will now be receiving the Gimp package and the updated plugin-registry from the new PPA:

$ apt-cache policy gimp
gimp:
 Installed: (none)
 Candidate: 2.8.0-1ubuntu0ppa6~precise
 Version table:
 2.8.0-1ubuntu0ppa6~precise 0
 500 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/ precise/main amd64 Packages
 2.6.12-1ubuntu1 0
 500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
$ apt-cache policy gimp-plugin-registry
gimp-plugin-registry:
 Installed: (none)
 Candidate: 5.20120523-2ubuntu0ppa9~precise
 Version table:
 5.20120523-2ubuntu0ppa9~precise 0
 500 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/ precise/main amd64 Packages
 3.5.4-1 0
 500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages

To install it now enter the following:

sudo apt-get install gimp gimp-plugin-registry

Now you have the most recent release!

web-safe-fonts-150x150-2925536

Editor’s Note: This article is part of the Tales of A Linux Switcher series.

One of the things I have always hated about using Linux is the difference in the base font collection.  Many web designers still use the defaults of Arial, Verdana and Georgia.  The reasons for this are that these fonts are available on the two main commercial operating systems, Mac OS and Microsoft Windows.

Until the majority of websites support webfonts like Google Web Fonts or Monotype’s fonts.com service, we still need access to the standard MS fonts. For more on this situation, check out the article A Web Designer’s Guide to Linux Fonts by Six Revisions.

Fortunately, these fonts are available for installation on Linux.  You can download them directly from the Sourceforge repository or look for the package in your particular distribution.

In Ubuntu you can install them from the Ubuntu Software Center by searching for the package named ttf-mscorefonts-installer or by using the following on the command line (Note: if you install from the command line then you will be prompted to accept the license aggreement in an ncurses interface.):

sudo apt-get install ttf-mscorefonts-installer

Either way, you will end up with the following additional fonts:

  • Andale Mono
  • Arial Black
  • Arial (bold, italic, bold italic)
  • Comic Sans MS (bold)
  • Courier New (bold, italic, bold italic)
  • Georgia (bold, italic, bold italic)
  • Impact
  • Times New Roman (bold, italic, bold italic)
  • Trebuchet (bold, italic, bold italic)
  • Verdana (bold, italic, bold italic)
  • Webdings

To see the difference in the display of websites after the installation, check out the following screenshots from this website.

mscorefonts_before-150x136-1108438mscorefonts_after-150x147-1036139

As you can see the use of these fonts definitely make a difference.  Happy surfing!

personal | arfore dot com

On January 1, 2014, the new health benefits plan that was approved by the Georgia Department of Community Health, took effect for many State of Georgia employees.

The previous health benefits were contracted to United Health Care (UHC) and Cigna, whereas the new plan is being solely administered by Blue Cross Blue Shield of Georgia (BCBSGa).

According to both the DCH and the Governor’s Office, the new plan is expected to save the State $200 million per year over the cost of the previous contracts.  The claim is that this will allow the employees to have lower premiums instead of suffering a “double-whammy” of higher premiums with no accompanying raises or cost of living adjustments.

Unfortunately, all the new contract and tiers appear to do is to transfer the costs from the State to the consumers, since the new plans, with admittedly lower premiums, offer lower co-pays, higher prescription prices and less overall coverage in terms of doctors offices that are in-network providers.  One anecdotal report I have heard is that there are 32 counties that have no doctors available in the coverage network at all, forcing patients to either pay exorbitant out-of-network costs or to drive to other towns in search of doctors.

A new Facebook group has been created by several employees looking to bring more focus on the drawbacks and problems with the new insurance plan.  The group is named Teachers Rally Against Georgia Insurance Changes (T.R.A.G.I.C.).  There are numerous posts concerning the changes to various prescription costs under the new regime as well as changes to the co-pays and medications that are simply no longer covered.

I encourage you, as the spouse of an educator covered under this plan, to check out the group and join to share your experiences so far.

For more information on the whole issue so far, check out the following sites:

News Coverage

SHBP Documentation

Plan Provider Websites

  • BCBSGa SHBP Portal
  • Find a Doctor on the new BCBSGa Plan
  • Express Scripts

riley_striped_cap1-150x150-1816833I would like to welcome my grandson, Riley James Dowling, to this wide, wide world!

Riley was born to my step-daughter, Caitlin Elise Vickers, on May 21, 2013 at about 7pm.  He came into the world weighing 6lbs and 7oz.

I wish all my love and the best of life to both Riley and his mom!!

doing-it-wrong-150x150-8282096Let me preface this post by saying that satellite radio is a great service.  You get access to a whole lot of content that you might not otherwise be able to access.  When I got my new 2012 Ford F150 XLT SuperCrew, I got a trial subscription for the first six (6) months to a subset of the SiriusXM stations.  I thoroughly enjoyed listening to the selections on the Electronic and Dance stations, the BBC content, stations from Canada, and a wide variety of news outlets, not too mention the comedy channels.

On September 3rd, my trial subscription expired.  I knew that it was going to expire.  In fact, I put a reminder in my personal calendar to warn me that the trial expiration date was arriving.  I liked the service enough that I was going to subscribe so that I could continue enjoying the service.

However when the renewal date approached, I determined that it was not financially smart to sign myself up for yet one more monthly payment at this time.  No big deal, I would just use Pandora, Spotify, Google Music and standard terrestrial radio until I was where I could pay for the subscription.

That’s where it all gets painful.  When the SiriusXM customer service representative called me to make sure that I knew my trial expiration was coming up I explained that I was not currently interested in signing up to pay for it.  When he helpfully (at least in his mind it was helpful) informed me that the monthly payment was only $16 a month, I ensured him that I had actually read the mailing they sent out and knew what the prices were and I just didn’t want to continue.

Now despite the belligerent tone of voice he continued to use to try and bully me into a subscription, I finally managed to get off the call without losing my temper (which was a major feat, let me tell you).  In a logical universe, they would mark my account as having declined service and to try again in a few months (but hopefully never since I did mention that I didn’t want them to call me again) and that would end the matter.

This is where SiriusXM has failed to gain a customer.  Almost every day so far this month I have received at least one call from the SiriusXM folks (866-903-7474) trying to suck me back into the fold.  This constant bombardment is a real pain in the rear.  I can understand one or two attempts, but at some point you have to realize that continued calls are not going to get the customer.

So here’s the email I sent to the SiriusXM Customer Service folks today after yet one more call:

I realize that my trial subscription has expired. In fact I even talked to your customer representatives at least once concerning this prior to the expiration.

I happily informed the customer service representative that I knew my subscription was going to expire and that I was not interested in converting my trial at that time due to the cost, and yes that I knew it wasn’t a lot each month if I subscribed for a year. After he kept trying to get me to convert, rather insistently to the point of belligerence, I finally was able to get him to hang up.

Recently I have been receiving calls from your company (866-903-7474) at least once a day (sometimes twice).

I realize that you would like to retain customers and to gain new ones, however when a current/former customer informs you that they no longer wish to continue the subscription, it doesn’t engender good customer relations to bombard them on a daily basis with calls.

For this reason it is unlikely that I or anyone in my household will ever subscribe to your services at any point in the future. I appreciate that you have made it even easier for me to embrace the free and/or ad-supported streaming services like Pandora Radio, Spotify, Live365, Google Music, and Amazon Music.

Thanks,
Andy Fore

So instead of caring about subscribing to SiriusXM, I will just use my mobile data plan to get the most out of Internet-based streaming services that I can.  I would rather give my money to my mobile provider for data usage than to SiriusXM, since Verizon doesn’t deem it necessary to spam me with phone calls about their services.

So the other night when I got home I found a sad situation.  My LCD television wouldn’t display a picture. The backlight would come on when the power button was pressed (on the tv or the remote), but nothing else was happening.

The first fix I tried was what some forums were calling an EEPROM reset. To do this follow these steps:

  1. Turn on the tv (blue led should go off)
  2. Unplug the tv from the main power
  3. Leave unplugged for 5-10 minutes (varies on exact model)
  4. Turn off the main power supply switch (located next to the power port)
  5. Plug the tv back in to main power
  6. Turn the main switch back on

In my case this procedure elicited no change to the problem, so I continued looking for other answers.  In one forum I found a reference to replacing the backlight, mainboard, or power supply. In my case the backlight was working fine and the power supply was as well.  After looking in the service manual for the 237-T11, I did find that the mainboard was fairly accessible, so if I had to get a new board it wouldn’t be that difficult to replace it.

Before taking the hardware fix route I decided to see if my problem could be resolved by a firmware update.  Olevia helpfully included a USB port on the back panel of the unit to allow for a firmware upgrade.  Since my purchase of the unit in November of 2007 at Target’s Black Friday sale, I had not applied any of the firmware updates.

Unfortunately in 2008, Syntax-Brillian, the manufacturer of the Olevia brand, filed for bankruptcy.  This made getting my hands on the firmware files, update software and instructions a little difficult.  After some diligent research I found a thread on AVSForum that had the files I needed.

The driver files didn’t work properly for my Windows 7 laptop, however they are easily obtained from the Prolific USA website (there are also drivers for Linux and MacOS X).

After following the instructions for updating I powered off the unit, waited a minute or two then powered it back on.  Success!  I was greeted with the familiar white and blue Olevia logo screen.

As an additional backup for the benefit of any other user’s, here are links to the necessary files:

linux_apps-150x150-6252447Editor’s Note: This article is part of the Tales of A Linux Switcher series.

In my search to make the complete switch from the Mac OS (see Tales of a Linux Switcher – Part 1), the biggest research effort has been finding applications that accomplish the same tasks in Linux.  Some of these tasks are pretty obvious, e.g., web browsing or email, while others are not quite so ordinary, e.g., filesystem encryption or software development.

So, with all of that in mind, the subject of this particular post is going to be a discussion of some of the common tasks that I set out to handle and the application I chose to fit the bill.

When everything is said and done, the important part of using any desktop (or server really) OS is getting what you need to do accomplished.  The tasks can be office productivity or software development or just casual web surfing.

The arguments about which OS is better, more secure, more extensible, or more “free” are all great and wonderful, but in the end what matters is getting it done.  There are some people that believe that software being free is top priority, while others (like myself) are not as concerned over whether the software is free, cheap, open source, or proprietary, as long as it works to get from point a to point b.

Don’t get me wrong, I like open source software, and it’s even better when it’s FOSS (free, open source software), but when it all shakes out I want a computer setup that I can rely on from day-to-day to do what I need it to do.

So in my quest to get to point b, I have found that there are generally any number of application choices to accomplish my tasks in Linux that I did in the Mac OS ecosystem.

Some of the application choices were easy options, like LibreOffice in place of MS Office 2011, while others required more research to replace, e.g., iTunes, 1Password, etc.  With each choice I have tried to find an alternative that gave me the closest experience in terms of usability and feature set of the application being replaced.

When looking for alternatives I used Google for basic searching, but I also found the following sites to be of use:

Using those sites in combination with various forum posts and basic searches, I have been able to find software to do most everything I was doing on Mac OS X.  Bear in mind that sometimes it’s not quite as easy to set everything up, but I took that as a challenge.  There are some instances that presented particular challenges.  I will be posting on those individually as time permits.

To see the list I have personally come up, have a gander at my Linux Switcher Software Choices spreadsheet.

php | arfore dot com

While working on a method to allow the VSU Communications Unit to add or change the stories in the rotation on the main VSU webpage, I ran into a problem that involved a known Safari issue involving file uploads.

I don’t regularly create forms that allow for an upload of a file, however I don’t like to store binary data in the MySQL database either. Allowing the files to be uploaded makes creating pages that use them a whole lot easier, since I don’t have to “create” the image from the binary data, just pass off a file location and let the browser do the rest.

The symptoms exhibited were that when submitting the form, Safari would hang about 30-40% of the time. No error messages or timeout messages were displayed. Zip, zilch, nada!
Continue reading

Recently I had to build a custom form for VSU’s implementation of R25 by CollegeNet.  The form was designed to allow individuals to schedule an event at VSU using our facilities and equipment.  The form is a multi-part form that branches off at the third page based on prior answers.

One of the hurdles in the form creation was the necessity of validating the form input on a page before proceeding to the next part of the form.  While this fairly routine process can be accomplished by using a self-referencing form and validating the contents of the $_POST superglobal, the number of form elements made it somewhat cumbersome.

Enter the PHP Form Validation Script.  While searching for some ways to make the validation more painless to code, I ran across a nifty PHP script at the HTML Form Guide website.  It is a object-oriented PHP script that make it much easier to do the validation on html form elements.  There are quite a few pre-defined validation descriptors, plus a method that allows for overriding the DoValidate function to create your own custom descriptor.

There is one thing that I would like the script to handle natively:

  1. use of a “pretty” or “friendly” name in the validation error messages, currently it displays the element name

There is also an undocumented validation descriptor in the script.  The pre-defined selone is used for a select/option element.  According to the code the default error message is “Please select an option for %s” and it check to ensure that the value for the element is set and that the value is less than or equal to zero.  If either of those check fail then the error message is displayed.

So in the process of applying the new SSL cert here at work, I discovered an issue with the reCAPTCHA service.

The problem was that I was getting errors saying that my forms were only partially encrypted.  This was due to my use of the reCAPTCHA library, which by default doesn’t use an SSL connection to grab the challenge HTML.

The documentation at the reCaptcha site has a section on this.  Specifically it says:

In order to avoid getting browser warnings, if you use reCAPTCHA on an SSL site, you should replace http://api.recaptcha.net with https://api-secure.recaptcha.net.

Ref: http://recaptcha.net/apidocs/captcha/client.html

The example it uses shows how to change the Javascript itself.  While this was nice to know it really didn’t help too much in my particular case. To solve this when using the reCAPTCHA PHP library, all you need to do is change the value of a single variable.  In the file recaptchalib.php look for the function recaptcha_get_html then change the declaration to read as follows:

function recaptcha_get_html ($pubkey, $error = null, $use_ssl = true)

This will force all calls to be transmitted over an SSL connection, thus eliminating the dialog box in Internet Explorer and the slashed-lock in Firefox.

However since I am not encrypting the entire site by default, yet due to an issue with our website editing/management system, Adobe Contribute, I had to do a bit more than just updating the boolean variable.  Since some of my forms are encrypted and some are not, I added the following code to the function referenced above:

if ($_SERVER[‘SERVER_PORT’] == 443) { $use_ssl = true;

}

This needs to be added just above the check for the value of the variable use_ssl in the function recaptcha_get_html.  Once you do this you can use the same copy of the recpatchalib.php file for both secure and non-secure forms.

Trim the whitespace in vi | arfore dot com

Today when I needed to copy some text on my CentOS server, I ended up grabbing a bunch of whitespace at the end of each line.  Normally this wouldn’t be a problem, since I would have copied from a regular browser.  In this case I was copying from with eLinks since I don’t have a graphical browser installed yet.

Sure, I could have just navigated to the end of each line and then used shift + C to delete, but I this was a 25 line block of text and that would have been too tedious.

Here’s the quick search and replace syntax to handle this for you: