Archive for the ‘Misc’ category

How to make Google Chrome use the right local Google site for searching

February 8th, 2011

Like most Google Chrome users I use the address bar to quickly search Google by entering my search terms instead of a web site address and hitting Enter to do the search. Chrome will try to work out where you are located and use the local version of Google if it can, which is great – except that sometimes it gets it wrong, or makes a choice that doesn’t suit you, and no matter what you try you can’t change Chrome’s choice.

I came across this problem after a trip to Italy when Chrome decided that it would continue to use http://www.google.it as the default localised version of Google for searches I entered in the address bar. No matter what I did with settings in the Options dialog, I couldn’t stop Chrome giving me results in Italian, with Italian options, menu items, and so on. From the investigations I did about this problem it became clear that this is a fairly common problem, but there was no obvious fix. So, I was left to my own devices to sort it out – and thankfully I did :)

It turns out this setting is stored in one of the files that Chrome uses – Local State – which is stored in either the Local Settings folder (for Windows XP) or the AppData folder (for Windows Vista and Windows 7) for your user account. The Local State file is just a text file with data stored in XML format, and you can safely edit this file to change the setting.

The Local Settings and AppData folders are hidden by default, so you will need to change the Folder Options to allow hidden files and folders to be displayed. In Windows XP this is available from the Tools | Folder Options menu in Windows Explorer, in Windows 7 it’s available from the Organise | Folders and search options menu in Windows Explorer.

Tools | Folder Options (Windows XP)

Tools | Folder Options (Windows XP)


Organise | Folders and search options (Windows 7)

Organise | Folders and search options (Windows 7)

In the Folder Options dialog select the View tab and enable the option to show hidden files, folders, and drives. Click OK to save the setting.

Folder Options (Windows XP)

Folder Options (Windows XP)


Folder Options (Windows 7)

Folder Options (Windows 7)

Once you have made this change you should be able to navigate to the relevant folder where you will see the Local State file.

In Windows XP the file is located in:

C:\Documents and Settings\<your user name>\Local Settings\Application Data\Google\Chrome\User Data\

In Windows Vista and Windows 7 it’s located in:

C:\Users\<your user name>\AppData\Local\Google\Chrome\User Data\

Note: you need to make sure that Chrome is closed down fully before making any changes to the Local State file to ensure that Chrome doesn’t overwrite your changes.

You need to open the Local State file in a text editor like Notepad to edit the XML data that stores the settings. Since the file has no extension, you should be prompted by Windows to select the correct program to use to open the file. You can select Notepad from the list of programs presented.

Open With... Dialog (Windows XP)

Open With... Dialog (Windows XP)


Open With... Dialog (Windows 7)

Open With... Dialog (Windows 7)


Once you have the file open in Notepad you can scroll down to the “browser” section of the XML data. Under the “browser” section in my file there were two lines that had references to http://www.google.it, which I changed to http://www.google.ie so that Chrome would use the Google Ireland site for searching:

Before:


   ...

   "browser": {
      "hung_plugin_detect_freq": 2000,
      "last_known_google_url": "http://www.google.it/",
      "last_prompted_google_url": "http://www.google.it/",
      "last_redirect_origin": "",
      "plugin_message_response_timeout": 30000,
      "window_placement": {
         "bottom": 570,
         "left": 0,
         "maximized": true,
         "right": 800,
         "top": 0,
         "work_area_bottom": 870,
         "work_area_left": 0,
         "work_area_right": 1440,
         "work_area_top": 0
      },

   ...

After:


   ...

   "browser": {
      "hung_plugin_detect_freq": 2000,
      "last_known_google_url": "http://www.google.ie/",
      "last_prompted_google_url": "http://www.google.ie/",
      "last_redirect_origin": "",
      "plugin_message_response_timeout": 30000,
      "window_placement": {
         "bottom": 570,
         "left": 0,
         "maximized": true,
         "right": 800,
         "top": 0,
         "work_area_bottom": 870,
         "work_area_left": 0,
         "work_area_right": 1440,
         "work_area_top": 0
      },

   ...

You can change this setting to use whichever local version of Google you want (or just http://www.google.com if you prefer). Save the file and close Notepad.

Now when you search from the address bar in Chrome it will use the version of Google that you want :D

Blog updated to WordPress 3.0

June 17th, 2010

Following today’s release of WordPress 3.0 I was able to quickly and easily upgrade my blog via the Tools | Updates menu on the Dashboard. I love how WordPress makes it so easy to perform these kinds of updates for plugins, themes, and the core CMS :D

New Blog Theme

October 9th, 2009

I’ve updated the site to use the Cordobo Green Park 2 theme by Andreas Jacob, and it’s much nicer than what I had before. It took a bit of playing around with the sidebar widgets to get them set up just as I want them without overriding the standard ones included in the theme which I quite like. I tweaked the header CSS to include an image as well as text in the logo, and to reduce the font size for the h1 – h4 tags (I felt the blog post titles in particular were too big) but apart from that everything’s standard.

The only thing that went wrong with the upgrade was my mistake with upgrading the Fresh From plugin so I lost all the old tweets that it had imported. They should upgrade it so that it asks you if you want to keep them. I did a bit of tidying up on the user registrations too – all spammers with no comments at all, so I deleted them and switched off registration. You can now comment without registering – though noone really wants to anyway based on how things have gone so far :)

My twitter feed is acting up

July 1st, 2009

Looks like my twitter feed as imported by the Fresh From FriendFeed and Twitter plugin is acting up and posting multiple copies of each tweet. Will need to look into this, and tidy up the posts :(

My tweets are now included in my blog

April 8th, 2009

I just installed the Fresh From FriendFeed and Twitter plugin for WordPress so that I can capture my tweets on Twitter as @anlaochsiorai in the blog here as blog posts. I’ve found myself microblogging via Twitter from my GPhone more often than posting regular posts here, so thought it would be good to capture them all in one place. As usual the plugin search and installation worked really well from the new Dashboard in WordPress 2.7.

I ended up tweaking the code of the plugin a little to remove the “Fresh from Twitter:” prefix to all the post headings, and I also increased the number of words extracted from the tweet to make the post title from 3 to 6. I found that if I kept the setting on that shows the profile picture it was messing up my page format since it was adding a <br clear=”both” /> tag which pushed the post metadata and other posts below the end of my sidebar :) Switching the option off leaves the posts with just a small Twitter icon which I actually prefer the look of, and doesn’t mess up the flow of the page.

So, on with the microblogging!

RSS feed problem fixed

February 16th, 2009

I ran into a problem that seems to come up occasionally on the WordPress support forum – blank lines at the beginning of the RSS feed XML file for the site which causes problems since it’s no longer valid XML. A quick look at the support forum pointed me in the right direction. It turned out to be blank lines following the final ?> line in the functions.php I had added to my custom theme to add widget support to the sidebar. This file gets loaded and parsed for every request to the blog, including for the RSS feed, and the blank line is actually seen as an intended part of the output – like the regular HTML you see in PHP files. Removing the blank line sorted the problem out.

I’m loving WordPress v2.7

February 16th, 2009

I really love the admin pages in WordPress v2.7. I particularly like the way that you can install plugins and do updates directly from the admin interface. For example I logged in today and the Dashboard told me that WordPress 2.7.1 was available, and offered me the option to do the upgrade automatically. It did warn me about making sure I had a backup, but I plunged straight in – reckless, I know, and not recommended :) Anyway, in less than 15 seconds the update had been downloaded to the server, unpacked, installed, and I was back up and running. Brilliant!

I suppose the one thing that would improve this is to include an automatic backup step, which could be optional. It probably wouldn’t be that hard, and would probably be sufficient for 90% of WordPress users – it would certainly do the trick for me :)

Site Update – WordPress 2.7, new theme, widgets support

February 8th, 2009

So, it’s taken a while to get around to it, but I’m back on the blog again! There’s been a couple of updates, including upgrading to WordPress 2.7, changing my theme, and adding widgets support to the sidebar. There’s still a few things that need tidying up such as the colour scheme for the Google Ads, and I’m not sure if I’ll keep the link colours :)

One of the changes brought about by the addition of widget support is the RSS feeds in the sidebar. These are originally sourced from Google Reader which can republish them as Atom feeds. However the MagpieRSS feed reading code built into WordPress can’t deal with the fact that the news item source data in the feed also includes title and link elements, so it ends up combining these with the title and link elements for the actual entry, messing up the feed entries in the sidebar. I came across a workaround in the WordPress support forum – pass the feeds through Feedburner and use the Convert Format Burner option to turn it into an RSS 2.0 feed. The RSS parser in WordPress deals with those feeds fine, and I’m using the KB Advanced RSS Widget to take a little more control over how the feed is displayed compared to the standard RSS widget.

As for WordPress 2.7, I really like the new Dashboard, and especially the features for installing plugins directly instead of having to upload them manually. I think I’ll have to look at upgrading My Halo News.com and Our Adventures too now :)

I’m hoping that this might mark the start of more regular blogging, as there’s lots to say – just maybe not enough time to say it. Let’s see how long it takes till the next post!

Upgrading to WordPress 2.5

April 7th, 2008

I got a strange email today from Anonymous Security Specialist telling me my blog had been hacked and I should upgrade to the latest version of WordPress. Initially I was suspicious, but my usual checks for dodgy emails showed no hidden HTML or strange attachments, and some of the info in the email made me consider that this was serious. I took a quick look at the blog just in case. It took me a little while, but then I noticed that my links had been poisoned with links to several sites selling viagra or other pills – the email was no lie!

I deleted the links, looked around to make sure nothing else was wrong, and then proceeded to follow the suggestion in the email and begin the process to upgrade to WordPress 2.5. As usual with WordPress it went very well, and I didn’t have to change anything – at least as far as I can tell so far :) I’m going to upgrade my other WordPress sites, but I’m not expecting it to go as smoothly on My Halo News.com – mainly due to the tweaks I’ve done to the sitemap generator and the number of posts. We’ll just have to see.

Life has been busy recently, so I have been neglecting the blog here, but hopefully I’ll get back into the swing of it soon.

Oh, and many thanks to Anonymous Security Specialist … whoever you are!

New Scientist – Climate Change Myths

May 17th, 2007

New Scientist Climate Change MythsI recently saw the documentary on Channel 4 that promotes the view that human’s contribution to global warming is negligble compared to the effects of the Sun and cosmic rays. The documentary was well produced and quite convincing, and prompted much discussion in the media. It was certainly a topic in several conversations I had around the time. It did sound convincing that the Sun was the major factor controlling the world’s temperature, and that humans could do little to control global warming. But part of me remained unconvinced, and baulked at the idea that George W. Bush could be right in his opposition to the Kyoto Protocol :)

Now, New Scientist magazine has published a special issue about Climate Change, and it addresses many of the myths surrounding global warming. The key points are available in a series of articles on the New Scientist web site. They present a balanced view of the arguments, and I think they successfully challenge the points raised in the documentary. What I took away from it is that while the Sun does indeed act as the main source of heat for the planet, human-generated CO2 is the best candidate for the recent trend of increasing temperatures. It is also clear that there is a large degree of uncertainty around the role of clouds in the global climate. However despite the uncertainty the majority of scientists working in this field are convinced that human-caused global warming is real, and we need to act sooner rather than later.