Ubuntu: VIM

[sc:linux-category ]Having moved from OpenSUSE to Ubuntu I noticed something a little odd, VIM wasn’t working quite right.

Three things seemed broken:

  1. When in insert mode, I couldn’t move around, it instead inserted the control codes.
  2. It didn’t save the edit position from my last editing session.
  3. Syntax highlighting.

Doing a quick search turned up the first issue being the version of VIM that was installed.  By default Ubunutu installs VIM-tiny, which seems a little weird for a desktop distro, but was easy enough to fix, a simple “apt-get install vim” pulled down VIM-basic which worked as expected.

Saving the edit position by default required editing /etc/vim/vimrc, there are three lines you have to uncomment to enable it:

" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif

Similarly there are a couple of lines to take care of syntax highlighting:

" Vim5 and later versions support syntax highlighting. Uncommenting the next
 " line enables syntax highlighting by default.
 if has("syntax")
 syntax on
 endif
" If using a dark background within the editing area and syntax highlighting
 " turn on this option as well
 set background=dark

 

Overall they’re pretty easy things to do, but it’s yet another example of weird defaults in Ubuntu.

User Registration Protection for WordPress

[sc:wordpress-category ]When I first started JumbleCat I opened the user registration up to everyone to be able to comment on my posts, however it quickly became flooded with spam registrations.

I implemented a couple of different solutions but after a while it became apparent that reCAPTCHA was a requirement and so I settled on Pie Register.

Pie Register had several big advantages; simple to setup, reCAPTCHA support, additional fields to the registration page, user registration through verification messages and so on.  It worked well and provided very good protection against spam accounts.

Then version 2 of Pie Register was released.  It was a complete rewrite and broke virtually everything.  As I had automatic updates enabled it came down as soon as it was released.  Once installed it:

  • Broke ALL user registration
  • Broke all logins (luckily my admin account was still logged in)
  • It didn’t bring across ANY configuration from version 1
  • The custom form editor didn’t work
  • Registration was required
  • The normal registration and login pages were replaced with a themed version, with no option to go back.
  • The top level menu ignored the theme options and changed the color to a white background with red lettering.  Make it stick out like a sore thumb and looked terrible.

I downgraded back to version 1 and left it for a while to see if the issues would be resolved, while some have been, it’s still just too complex for what I need so I’ve removed it and replaced it with two other plugins.

User Registration Aide

User Registration Aide provides all kinds of features but I’m really only using it for one thing, the addition of my site guidelines to the registration form.  Overall it’s a good plugin and has been working well but I have just two nitpick about it really, the configuration interface looks to be from the 90’s.  Ugly does not begin to describe it:

User Registration Aide

The second is that it adds a top level menu to WordPress instead of sitting under Users or Settings.  I don’t think something that is usually only configured once should intrude at the top level.  Anyway, beside that it does the job.

Better WordPress reCAPTCHA

Better WordPress reCAPTCHA is a great plugin that focuses only on integrating reCAPTCHA in to WordPress.  It’s easy to set up and works well.  The only nitpick I have is the same as for User Registration Aide, it adds a top-level menu to WordPress instead of sitting under Settings.

Closing Thoughts

Between the new plugins I get pretty much everything I had before, however I have lost the two stage registration.  No a big deal hopefully as I never saw any users stuck waiting for confirmation with Pie Register so the bot’s got around it anyway.

I won’t know for a while if the setup works as well as Pie Register did, but I am hopeful it will.

 

Moving from OpenSUSE to Ubuntu

[sc:linux-category ]For may years now I’ve been running my home mail gateway on an OpenSUSE system, specifically 11.1.  With heartbleed running rampant on the net and no updates to such an old version of OpenSUSE, it was time to move on.

Ubuntu 12.04 got the nod and in general everything went well.

A few things did come up:

  • Some of the core utilities live in different locations for example on OpenSUSE grep was in /usr/bin, but on Ubuntu it was just /bin.  A few scripts had to be updated to handle this.
  • Installing Samba in to my AD domain was giving me errors, turns out the clock was off.
  • NTPD isn’t installed by default.
  • Perl’s DBI interface for MySQL didn’t work at first.  Neither the MySQL client library or the developers tools were installed.  The client was an easy package install as it was called “mysql-client” but the developer tools were harder to find.  Eventually I found it under “libmysqlclient-dev”.
  • Automatic updates are limited to security fixes, this article walks you through how to add other updates to the schedule.

Other then that, the migration went smoothly.

Of course just a couple of days after I completed the migration the new LTS version of Ubuntu came out… sigh.

HTC 8X Reboot Loop

[sc:mobile-category ]A while ago I upgraded my HTC 8X to a Nokia 925 which means my 8X was just lying around.

A friend of mine was still using an old BlackBerry and was stuck on his contract for quiet a while yet.  I offered him my 8X and he’s been using it for a few days now but he called me with an issue.

He plugged it in to charge and it started in to an infinite reboot cycle.  It would start-up, starting loading but before the “Microsoft Windows Phone” loading screen could be displayed it would reboot and start all over.

Doing a quick search turned up trying a hard reset, but it didn’t seem to let you do a hard reset in the cycle it was in.  Without the power cable in, the phone wouldn’t come on at all.

We pulled the SIM card but no difference.

While trying a few different things, I happened to pull the USB cable out while it was rebooting and instead of cycling again, it continued to boot all the way up.

It was a strange occurrence and we’ll have to watch to see if it happens again but the phone seems fine now.

Firefox 29

[sc:software-category ]Mozilla has released Firefox 29, which looks a lot like Chrome, but is that a good thing?

I’m going to go with no.

I’ve had a love/hate relationship with Firefox for a long time.  I often find myself using it as a secondary browser, especially now that Opera 12 is getting a bit long in the tooth without any updates.

On one hand I love the customization and plugins that are available for it.  You can make it pretty much anything you want.

But on the other hand I hate the amount of customization you have to do to make it liveable.

The move to a simplified interface hits at the heart of this problem.  Opera has done the same thing with recent releases and has an even worse result from it.  The idea is that “most” users don’t use the advanced functionality of the browser so either get rid of it or at least hide it away from sight.

This may very well be a reasonable direction to take, but it does leave a certain segment of the user base feeling like they’re stuck with a lobotomized browser.

At a high level my problem with this kind of change is that it’s an all in scenario from the organizations.  There’s no “advanced” switch to enable a default set of options that would provide a more traditional browsing experience.  You have to manually enable each piece and some of it you simply can’t.

So now on to some specifics with Firefox 29:

  • The command menu: The idea is fine, but the implementation is kind of half-baked still.  The biggest issue I have is that you can’t move it.  The upper right hand location is fixed and for me doesn’t flow very well.  I think it’s going to take a few more iterations to add some polish to it.
  • Invisible tab outlines: I understand the point of these, make the currently active tab more prominent, I just disagree with how they did it.  Dropping the outline looks weird, they should have greyed them out or something instead.
  • On Windows, the most glaring part of the new UI is what didn’t change.  The default Windows controls look very out-of-place with the redesign.

Not specific to 29, my biggest pet peeve with Firefox has been the Awesome Bar, its unified controls limit how much customization you can really do to your toolbar.  The other item that I always scratch my head about is the fact you can have each command/feature in only one location.  Want the download button on the command bar AND in the menu?  Too bad, one or the other only.

Firefox probably needed to do the redesign as it was looking long in the tooth these days in comparison to IE and Chrome and it will likely get better over the next few releases.

More likely than not I’ll have to abandon Opera 12 soon enough and the new versions of Opera are just too far behind to take seriously now.  Firefox will probably replace it.