Archive for the 'Software' Category

SOLVED: No sound after login on Ubuntu Eee PC / Ubuntu Linux

Sunday, June 6th, 2010

I’ve posted twice recently about my problems following an upgrade of Ubuntu Netbook Remix to Lucid Lynx (10.04).  In short, I upgraded both the BIOS of the netbook (an Asus Eee PC 1008HA) and upgraded Ubuntu from 9.10 (Karmic Koala) to 10.04 (Lucid Lynx).  Once I did this the sound would disappear after the first time I logged in following each boot, and only work properly if I logged out and in again.

One kind commenter (thank you “ThrasherC”) suggested a solution to a similar problem.  I haven’t followed the story of the bug report and probably don’t know enough about Linux to understand it so I’m not taking responsibility for anyone else doing this. This is a statement of what I did, not advice :)

  1. Open a new terminal
  2. Issue command “sudo gedit /etc/pulse/default.pa”
  3. Find the line that says “load-module module-device-restore” and creplaceomment it out by adding a hash at the start so it reads “#load-module module-device-restore”
  4. Restart

Hope this helps someone – be that you, or me in the future.

No Sound After Upgrading Asus EeePC to Ubuntu 10.04 (Lucid Lynx)

Friday, May 7th, 2010

Right, at the weekend I upgraded my Asus Eee PC (1008HA for those of you interested) to Ubuntu 10.04 LTS – Lucid Lynx from the previous version, 9.10.  Everything seemed fine (I think).

Update: The problem described in this post has subsequently been investigated and solved.

On Monday or Tuesday night I then upgraded the BIOS to see if it would fix the fact that the wireless was shite when I was using Ubuntu.  (Incidentially either the BIOS or OS upgrade seems to have fixed the probelms I had connecting to one specific router)

I didn’t notice a problem at the time because I’m dual booting Windows XP and was using that, but when I booted into Ubuntu again on Thursday night, the audio didn’t seem to be working.  I quickly discovered that the sound did indeed work at the login screen, but once I logged in there was nothing (including no welcome sound).  The audio/volume functions on the Fn keys also now do nothing (though brightness ones still work!)

I think the sound was fine following the Ubuntu upgrade, but I’m not sure, so I think the BIOS upgrade has ballsed it up.  Which is a pain.  It looks like I’ll have to try reverting the BIOS and/or Ubuntu to a previous version.  Watch this space…

HTC Desire: WANT!!

Wednesday, April 21st, 2010

I realise I haven’t written anything here in a while but I thought recent developments warranted a post.  Basically my mobile phone contract with Vodafone is up for renewal.  My contract expires at the end of May and I’m already into my "eligible for upgrade" period.

I have decided on a phone. I want an Android phone. I simply MUST have an HTC Desire. So much that I already want to start writing apps for it!

Things looked good at the start of April when it was available on T-Mobile for £15/month and £129 up front for 24 months.  This came with 300 minutes, unlimited texts (they say 300 but you get a choice of flexible booster free and mine would go on unlimited texts)  and "unlimited" (1GB) data.  This is much better than what I’m currently paying Vodafone £30 a month for!!

Unfortunately while the plan is still available on T-Mobile the price of the phone was hiked to £191 fairly quickly.  It’s still a very competitive contract, and still better than what Vodafone were offering, but I was already nervous about taking out a contract on a network known (to me) mostly for shit signal, based partly on my experience with them about 6 years ago, so I went to do more research.

I’ve spent a lot of time researching the best deals from all networks (except O2 who don’t stock it yet, but I’ve found ways round that) from at least a dozen retailers.  Really it would be a waste if I kept this information to myself and didn’t share what I’d found out with the world (or the 3 random people who happen to stumble on this blog over the next year and probably don’t even speak English).

Anyway, to got a long story short(er), I’m going to post a summary of what I’ve found over the next couple of days. Keep your eyes peeled.

Lolcatz Vista Gadget Update

Thursday, August 14th, 2008

A couple of weeks ago v1.0 of my ICanHasCheezburger Windows Sidebar Gadget for Vista stopped working. The reason is that ICanHasCheezburger changed the URL of their RSS feed which the gadet uses to get its data.

v1.0.1 uses the new URL and normal service is resumed.

Solved: IE event – “this.parentNode.parentNode is null or not an object”

Saturday, August 9th, 2008

… it bloody-well is! This post was very nearly “Things that piss me off 5: Internet Explorer” (that one may yet come) but I thought a more descriptive title would help more people struggling with the same problem to find it.

Anyway: background.  I am writing a new feature for a Content Management System to allow users to upload files. With a simple bit of javascript I added a “+” button to allow them to add new rows to the form, allowing them to upload multiple files. It looks a bit like this:

Screenshot of Upload Images feature

Screenshot of Upload Images feature

Anyway, it would obviously be nice to allow the user to remove a row if they’ve added one or two too many. The obvious solution seems to be to add a “-”  button beside each. Easy, right?

Unfortunately Internet Explorer, as per usual, ballses everything up. Because each – button is created dynamically I have to add an EventListener using JavaScript code. No problem so far. That event listener is a simple, one-line:

this.parentNode.parentNode.removeChild(this.parentNode);

As each row (the label, field itself (including button) and “-” link) is inside a div, the above code should remove that div and therefore remove the row. And it does… in Firefox. Try it in Internet Explorer and you get a message telling you “Error: ‘this.parentNode.parentNode’ is null or not an object”.

Whhhaaa?!

Don’t you just hate when you can easily find something your code claims it can’t? Am I the only one who screams “It’s right f**king there!!” at my monitor? In this case, the problem seems to boil down to IE’s supid, proprietary, fucked up way of attaching Event listeners. When you use Mozillas the W3C standard addEventListener method to attach a listener to an event, “this” in the event handler refers to the object which the event is called on. Obvious, yes?  However when you use IE’s attachEvent instead, IE doesn’t seem to act in the same way. Apparently, instead, IE sets “this” in an event handler to the window object instead of the calling/event object! Another good job from Micro$oft!

Apparently it’s can be overcome, but that involves a lot of code and I refuse in principle to do that much inelegant hacking for something so simple. It’s much easier (and principled) to do this:

IE error message: "Sorry, your browser doesn't support this function. This is probably because you're using Internet Explorer. www.getFirefox.com"

Not really a long-term solution, but bloody satisfying nonetheless.

Solved: WP Recent Posts: “Post-Plugin Library missing”

Tuesday, August 5th, 2008

Some of you may have noticed the above message appearing where my recent posts should have been for the last week or two.  It turns out the “Post-Plugin Library missing” message can be fixed by downloading the latest copy of the Post-Plugin Library (shocking, I know).

I can’t remember if I upgraded WordPress or the Recent Posts plugin or both, but I’m guessing it was an upgrade to the Recent Post plugin that caused the problem. The new version requires a “Post-Plugin library” (written by the same guy).

(more…)

nerd. links – LDAP Browser

Tuesday, July 1st, 2008

Had a bitch of a day today in work, with an application I was playing with refusing to play with Active Directory (largely because I’ve never used LDAP before and couldn’t figure out the weird bloody syntax).

So I’d really like to offer a quick thank you to Jarek Gawor for developing (and releasing) his LDAP Browser/Editor which let me double check that I was connecting to the right server/port and play with the settings enough that I eventually got it sussed. Great wee Java tool.

Screenshot of LDAP Browser/Editor

Big PHP Niggle

Friday, June 20th, 2008

I need a quick bitch.

I love PHP. It’s everywhere. All my sites are written in it. My CMS is written in it. My blog engines, WordPress and b2evolution, are written in it. It’s free. It runs on any platform. Hosts all support it. With PHP 5 they’ve even done a lot of work on PHP4′s main downfall – lack of OOP support.

One thing really pisses me off though – it’s totally inconsistent.  Consider these two functions:

  1. strstr — Find first occurrence of a string
  2. in_array — Checks if a value exists in an array

Take a close look. See the signatures?

string strstr ( string $haystack , mixed $needle [, bool $before_needle ] )
bool in_array ( mixed $needle , array $haystack [, bool $strict ] )

In in_array the first parameter is what you’re looking for and the second is what you’re looking in (more or less consistent with preg_match).  In strstr (and its derivatives) this order is reversed. Who on Earth let that slip through? I’m yet to find a free text editor that will tell you which parameters a given function expects (Dreamweaver does a decent job but it’s bloody expensive for a text editor!) the way Visual Studio does for C#, which I use a lot in work.  Given that situation, you’d expect consistency in this sort of thing.  Apparently not so. Instead, every time I want to use one of these functions I have to do a quick Google to bring me to the PHP manual page to tell me which order the parameters come in.

Of course they can’t even fix that without breaking backwards compatibility either, so we’re probably stuck with it.  Bloody marvellous!

Firefox 3 – Initial Impressions

Thursday, June 19th, 2008

I haven’t come across anything truly groundbreaking in Firefox 3, possibly because I’ve become accustomed to much of the feature set through the Betas and RCs, but there are one or two improvements that are quite useful (as well as a couple of regressions unfortunately).

Wee Niggles

First the bad. When you view Page Info from the context menu it doesn’t give a link to the CSS file in the Media tab any more. I was sure it was there in 2 and a quick google confirmed this. This really sucks – I can’t see why they’ve taken it out.

Secondly, when I was looking through the options to try and return the aforementioned CSS links, I discovered Firefox had decided it was going to automatically download any future updates when they were discovered (I promptly switched the option to “Ask me…”). Bad Firefox.

Magic Address Bar

The good is good though. It doesn’t seem like it at first, but to my mind the biggest improvement of all is the address bar. Sure they’ve added a “Most Visited” folder to your bookmarks toolbar which (shockingly, given the title) contains a list of the sites you visit most frequently, but the address bar has some great, if not immediately obvious, usability improvements.

(more…)

FireFox 3 Released Today

Tuesday, June 17th, 2008

Looks like the excitement is a little bit premature. Not just yet, but at 6pm BST the newest version of Mozilla’s FireFox web browser will be released. Mozilla want Firefox 3 to break the record for the most downloads in 24 hours, which begs the question as to why they pissed off Australasia and half of Asia by promoting Download Day as today, 17th June, when they’re not making the new version available until 10am Pacific Time which means the aforementioned regions will not see the download released until it is 18th June there. That’s without even considering yours truly and millions of other Europeans who will be finished their days work.

Good work Mozilla.