Take a Screenshot on your HTC Desire S / Evo 3D

I know you can take screenshots with Android 4.0/Ice Cream Sandwich, but I discovered a week or so back that, having upgraded my HTC Desire S to HTC Sense 3.0 (on Android 2.3.5) I can now do this without an ICS upgrade!

Here it is from the horse’s mouth: it seems all you have to do to take a screenshot on your HTC device is hold the power button and press the home button. Your screenshot will be captured and saved to your gallery.

I actually took my first screenshot on my Desire S following the upgrade to HTC Sense 3.0 by accident!! I was on a website in the browser and pressed something that made a message come up “Screenshot saved to Gallery”. What!? Screenshot?

Yes, it turns out you can take a screenshot on HTC Sense 3.0 (and presumably HTC Sense 3.5). I have since got myself an HTC Evo 3D (which comes with Sense 3.0) and verified that the same process works there, the only difference is that it saves to “Camera Shots”.

Much thanks to Andrew Girdwood, whose post  “How do you take a screen shot with your HTC Sensation” I came across on a Google search as his comments section was where I first discovered the answer.

Thunderbird “invalid security certificate” error

I recently upgraded my Ubuntu installation to 11.10 after not having used it in a while. Part of the upgrade to this new version (Oneiric Ocelot) is that automatically (I believe) adds Thunderbird to your installation, intending that you use it rather than previous client Evolution.

Now, I haven’t used Thunderbird in a while so its fancy new “detect my mail server settings” functionality was all new to me. It all actually went quite well, detecting my mail server name and ports by checking “common server names” based on my email address of steve@xxxxxx.co.uk (in my case mail.xxxxx.co.uk).

However my providers SSL certificate isn’t mapped to my domain so the certificate is flagged as “invalid”. There’s no option to accept this certificate so you have to go digging around in Preferences (Options on Windows versions).

What you need to do is go to Edit -> Preferences and go to Advanced -> Certificates -> View Certificates, From here, Add an Exception giving your server (e.g. mail.xxxxx.co.uk:143). Click ok and go back to account setup and it should allow you to proceed. Hope this helps and thanks to leepa at Mozzilazine Forums and also bpat1434.

Windows 7 Starter – Black Desktop Background after Activation

I purchased a netbook about 4-5 months back that came with a Windows 7 Starter licence key but no software. I managed to get a copy of Windows 7 Starter installed and all was running fine – though it never asked me to enter the product key!

But all was running fine until a few months later when I’d decided to sell the netbook. When I powered it up I got a message telling me that my copy of Windows was not “genuine” and that I may be a victim of software piracy. It had also turned off the desktop background, so my desktop was now a rather boring, plain black! Based on the fact the netbook had the product key on a sticker attached to it, I was pretty sure this was just another case of Microsoft’s draconian steps being a bit, shall we say, WRONG!

So I opened up the activation screen, activated the software. It took about 5-10 minutes (and I’ve no idea why, presumably it sends a little information to Microsoft, which says yay or nay, amirite?). Now the activation went fine, eventually, but while the message telling me the software wasn’t genuine was gone, my desktop was still black. And as we all know, Windows 7 Crippled Edition Starter doesn’t allow you to change your desktop.

Uh-oh – a buyer might not be best pleased by this, especially as I’d just taken a photo to list showing the nice pretty blue Windows 7 background.

Anyway, I Googled a bit and after a while I came across the solution. it’s actually fairly straightforward but just tricky to find – nobody at Microsoft Answers seemed to have an answer, but here it is:

  1. Open the Registry Editor (by opening the Start menu and typing “regedit” in the search/run box)
  2. Find the key under /HKEY_CURRENT_USER/Control Panel/Desktop called Wallpaper.  This should be empty (hence the plain background, presumably).
  3. Right-click this key and Modify the value to the location of the image (e.g. C:\Windows\Web\Wallpaper\Windows\img0.jpg )

Now I did this to restore the original image after Microsoft ballsed it up, but it did get me wondering if the same technique could be used to change your Windows 7 Starter background to any image you wanted and thus overcome the stupid restriction impost by Microsoft. To be continued…

Using Body OnLoad with SharePoint (2010)

I spent a decent amount of time trying to workaround not being able to access the body onload event of a SharePoint page, including looking at adding JavaScript event handlers programatically, before I came across this… almost an aside in another article.

In order to work around this limitation, SharePoint provides the “_spBodyOnLoadFunctionNames” array. When the body is loaded, the onload event handler executes each function whose name is contained in this array.

So apparently all one has to do to have a JavaScript function execute when the body loads is to add the name of the function (as a string) to that array, a la _spBodyOnLoadFunctionNames.push("functionName"); – simples!

D’oh!

In the end we just wanted to do to much for simple JavaScript so used the awesome jQuery library – which includes the $(document).ready() method to take care of that, but I’m sure the above will help somebody, somewhere, some day.

Change Windows Startup/Logon Background

Today I got a bargain netbook in the Carphone Warehouse clearance sale – I’d ordered one yesterday online within minutes of the sale starting to be told they were out of stock and were cancelling my order a few hours later. Gutted. So I trapsed round their shops today and eventually picked up a brand new Toshiba NB250 “half-price” for just £120! Bargain!

But it seems Toshiba netbooks have a disgustingly garish OEM/branded background screen that’s displayed during startup and logon (though Win 7 starter still has the standard Windows 7 desktop background).  Turns out this isn’t too tricky to get rid of (and yes, it works on Windows 7 Starter).

Just head on into the registry and find the key called: HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background – change the value from 1 to 0 and you’re back to the default Windows background.

You can apparently also change the background to any picture you want if you’re so inclined, but I just want something slightly less distasteful than Toshiba’s background so I’m done there.  Hope this helps someone.

Why is Windows being such a dick?

I recently bought a netbook on eBay that had come with Windows 7 starter but the owner had wiped this and replaced it with Linux.  I needed a new netbook and figured the fact this one came without Windows would keep the price down.  I was right and I purchased a netbook for £68, now all I had to do was get a copy of Windows 7 to install using the product-key which was still stuck underneath.

In the mean time I installed the new Ubuntu 11.04 and set up a number of partitions to get it ready. I set up a /boot partition of about 500MB (for Grub etc.?), a / partition for Ubuntu and a /home partition for my documents.  I also set up a “Win” partition to leave a space for Windows and a final NTFS partition to use for documents etc. when I was booted into Windows or to share across to Linux.  Linux seemed to be working fine and I got on the internet etc.  It was all very smooth, much more so than when I installed Ubuntu 9.10 or whatever it was back in the day.

I got hold of a copy of Windows and began trying to install it from SD card.  When it came to selecting a partition for Windows to live on, I picked my 40GB Win partition but Windows started throwing a strop and told me something it seems to have told a few others before me:

Setup was unable to create a new system partition or locate an existing system partition. See the Setup log files for more information.

Not impressed, I booted into Linux and tried to set a boot flag on this partition.  That took it off my original boot partition though, as a hard drive can only have one boot partition.

In the end I gave up and wiped all the partitions using the Windows installer.  I then created a 40GB partition for Windows, which proceeded to also create a 100MB “system” partition at the start of the drive.  I’m wondering if I’d left my room for Windows at the start of the drive in the first place if maybe I would have avoided this, but as it is – I now have to install Ubuntu all over again.  Fail!!  Thanks Micro$oft!

Skype Installation Shows Ubuntu Not Ready for Masses

The horrifically footery and niggly process I’ve just gone through to install Skype is sad proof that Ubuntu, and Linux, is still not ready for prime time.

The fact you have to get a bit hacky to get a product as mainstream as Skype working is a sad indictment of the state of the OS.

Step 1: Add the Ubuntu Partner Repository following the instructions from Ubuntu’s wiki.

As my installation was Ubuntu 10.04 (Lucid Lynx) upgraded from 9.10 (Karmic Koala) I had to edit the repository information and change the distribution from ‘karmic’ to ‘lucid’ as for some reason this had not been automatically updated as part of the upgrade.

After doing this, and reloading the package information, the Synaptic Package Manager still didn’t find Skype when I searched, so I had to follow

Step 2: Revert to the terminal and enter

sudo apt-get update && sudo apt-get install skype

This was a command I’d picked up from Googling previously and finding this guide.  I figured it was worth a shot.  This seemed to work, gave me a lot of information and asked me if I wanted to continue. I did.

The terminal did a lot of stuff in the background as I’ve been typing this, eventually telling me:

Setting up skype (2.1.0.81-1ubuntu5) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

and returning me to the command prompt. Umm… ok? Still not sure this had worked I started looking for Skype and guessed (correctly) that it would be under Internet (I’m using Ubuntu Netbook Edition).  I opened it, accepted the Licence Agreement and signed in. Very slowly.

A good 2-3 minutes later I’m signed in.  Unfortunately, I only use Skype for talking to my girlfriend who’s currently studying in Malaysia and as it is currently 5:40 am there, she’s not online for me to test it out properly on a call.  However I don’t need to do that to ask this question:

How many ordinary users are going to go through all that just to install Skype, and how many will give up and go back to Windows?

Android/Facebook/Eclipse – Must Override a Superclass Method

I’m trying to get into developing apps for Android and developing an Android Facebook app seemed like an good place to start with something useful.  However it seems frought with problems that will perplex the beginner.

One early problem I encountered which had a non-0bvious solution was the message:

The method onCancel() of type new Facebook.DialogListener(){} must override a superclass method

This occurred after pasting some example code from the Facebook site into my project.  The problem?  My project was defaulting to JDK 1.5 and the code on the Facebook site requires 1.6!

It’s been a while since I looked at Java but the problem is apparently due to the use of the “@override” syntax. According to one helpful StackOverflow member, in Java 1.6 this can also be used to implement interface methods, but in 1.5 could only be used to override superclass methods.

Solved?: Command & Conquer Tiberian Sun on Windows 7

For some reason, already having downloaded Command and Conquer and the follow-up, C&C: Red Alert [free download], I thought I’d check out on my new laptop if there were any special Christmas freebies from EA this year.  It turns out there weren’t, but that they have subsequently released the third C&C game (Tiberian Sun) as a free download so I went ahead and downloaded it.

Of course once I’d done that and spent hours trying to make it work, I realised the download wasn’t compatible with my shiny new laptop because it’s running Windows 7, and Windows 7 doesn’t like old games or something.  Even when I tried following the instructions, it ran (which was more than I’d managed to get it to do myself) but when the main menu loaded, none of the menus would display properly. Fail!

Enter CnCsector.net, who have packaged the game up into a nice installer package that they assure us works with Windows 7 (including Win7 64-bit!). It took 4-5 hours to download all the files (and there doesn’t seem to be any way to skip this – not good!)… though 99% of that is for the movie files for the cut-scenes, which are optional.

Sadly, the same thing happened again – I never did get it working entirely properly, though I did find a semi-solution.  Firstly I noticed that if I hit the Windows key to go back to Windows, then opened the game again the menu was there on screen.  Actually I noticed this when I tried to find out if the menu showed up if I did a Print Screen (it did), but the menu was there when I came back.

Solution

Some while later I noticed that if I put the mouse cursor over where the menu should be and scrolled (e.g. using the scroll wheel, or the side of the laptop trackpad), it would appear (without exiting to Windows).  It’s not ideal but it’ll do me for now.  Thanks to all the guys at CnC Comm who tried to help.

Eclipse/Android Development Installation Issue

Yes, it’s Christmas as I blog this at 2am, however I got a new laptop for Christmas and am geeking it out to the point where I can use it for fun stuff.  To that end I’ve been trying to install the requisite tools for Android development and hit an issue which could have (but thankfully didn’t) take me hours to sort out.  I’m a complete n00b at this, so don’t treat this as anything like a complete guide!

Having managed to “install” Eclipse (which from what I can tell just means copying the contents of a zip file to somewhere on your hard drive) and the Android SDK, I needed to install the ADT (Android Development Tools) plugin for Eclipse.  However on doing this I was getting an error telling me:

Missing requirement: Android Development Toolkit 0.9.4.v200910220141-17704 (com.android.ide.eclipse.adt 0.9.4.v200910220141-17704) requires ‘bundle org.eclipse.gef 0.0.0’ but it could not be found

This was a pain, and it took a bit of Googling to discover how to rectify that. Apparently the version of Eclipse Google recommend (Classic) doesn’t include the GEF or ‘Graphical Editing Framework’ which the Android ADT plugin requires.  Nice!  So the easy way to install this (thank you to IBM for the pointer on this) is to install it the same way you would the ADT plugin, i.e. open up Eclipse and choose “Install New Software” in the “Help” menu.

When it says work with, instead of using the URL Google give for Android, use the one where GEF lives.  In my case, for version 3.6.x of Eclipse, this is:

Helios – http://download.eclipse.org/releases/helios

(Helios being the codename for Eclipse 3.6).  Once this is done you’ll be advised to restart Eclipse (so I did) and everything seems to be going ok now (touch wood!).

I just hope this helps someone else with the same problem or, more importantly, helps me the next time I come across the same thing and end up scratching my head trying to remember how I fixed it!