April 20, 2009 by somejotnotes
The keyword search functionality in Mozilla Firefox allows you to set up shortcuts to search websites directly from the browser address bar. This allows you to save time for frequently performed searches. For example, on my system I have it set up so that I can do a Google search just by typing “g (search term)” in the browser address bar and clicking enter, without having to go to the Google website first.
However, if you want to set up a keyword search for Google Maps, then the usual method of setting up the keyword search bookmark doesn’t work correctly. If you try to set up a keyword search for Google Maps by right clicking in the Google Maps search bar and selecting “Add a Keyword for this Search”, the resulting bookmark has the following URL:
http://maps.google.ca/maps?f=q&source=s_q&output=js&hl=en&geocode=&q=%s&mrt=all
This URL will not work and returns a blank page. However, if you edit the bookmark manually and change it to the following URL, then your keyword search will return a useful result:
http://maps.google.ca/maps?f=q&hl=en&iwloc=addr&q=%s
Thanks to Kareeser from the Ubuntu forums for posting this workaround (see his original post).
Additional references:
Posted in Firefox | 2 Comments »
March 11, 2009 by somejotnotes
If you are running OpenOffice from the command line in Ubuntu, you may see the following error:
javaldx: Could not find a Java Runtime Environment!
This error can occur even if you have a valid Java Runtime Environment (JRE) on your machine.
The reason why that happens is that even though OpenOffice is installed by default in Ubuntu, the package that enables OpenOffice to use the JRE is not installed by default, due to space constraints. From the Ubuntu 8.04 Release Notes:
For reasons of disk space, the database and equation editor components of OpenOffice.org, as well as Java integration support, are not included on the installation CDs. To get the full OpenOffice.org suite after install, you can select “OpenOffice.org Office Suite” from the Applications -> Add/Remove menu, or install the openoffice.org metapackage using the package manager.
The way to get OpenOffice to see the JRE on your machine is to install the openoffice.org-java-common package. Alternately, you could install the openoffice.org metapackage (as described in the release notes above), which will install the openoffice.org-java-common package along with some other components of OpenOffice that were left out of the default install as well.
This confusing behaviour exists in Hardy and Intrepid. According to this Launchpad comment, in Jaunty the “javaldx: Could not find a Java Runtime Environment!” error message will be changed to something more helpful.
Additional references:
Posted in Linux, OpenOffice, Ubuntu | Leave a Comment »
December 21, 2008 by somejotnotes
One of the disconcerting things about switching from Windows to Ubuntu is that Ubuntu doesn’t treat the Windows key the same way Windows does, at least not by default. This article will show you how to set up your Ubuntu system so that it treats the Windows key in a way that’s similar to how it is used in Windows.
In Windows, the Windows key on your keyboard is what is known as a “modifier key”, meaning when you press the key and hold it down, it modifies the meaning of any other keys you press. For example, in Windows, if you press “r” then you get the letter “r” on your screen, but if you press and hold down the Windows key and then press the “r” key, it launches the Run dialog box.
By default, the Windows key is not treated as a modifier key in Ubuntu. It is just a regular key that does not modify anything else, and is therefore not nearly as useful as it could be.
In order to set up your Windows key to be a modifier key in Ubuntu, you need to do the following:
- Go to System >> Preferences >> Keyboard.
- Go to the Layouts tab.
- You will see a button marked Layout Options (Hardy and earlier) or Other Options (Intrepid). Click on this button. This will bring up a dialog box.
- In the list of options, there is an item marked Alt/Win key behaviour. Change the value from “Default” to “Super is mapped to the Win-keys”. This will allow you to use the Windows key as a modifier key.
Now that the Windows key is a modifier key, you can go into System >> Preferences >> Keyboard Shortcuts and use it to create some shortcuts. In the Keyboard Shortcuts panel the Windows key will show up as “Mod4″.
Additional references:
Posted in Linux, Ubuntu | 2 Comments »
October 5, 2008 by somejotnotes
I’ve had my domains registered with GoDaddy for years. With the exception of their unceasing self-promotion, I haven’t have any problems with GoDaddy. I contacted Customer Service twice, and both times the customer service representative was courteous and helpful.
However, after hearing too many horror stories about GoDaddy losing their customers’ domains, I decided that my domains were too valuable for me to even take a chance, no matter how remote, of losing due to domain registrar incompetence. I had to find a new registrar, one where I could be 100% certain that I wouldn’t get screwed.
After a bit of research, I decided to go with NearlyFreeSpeech.NET.
Unfortunately, the process of transferring the domains from one registrar to another is not the most straightforward or intuitive process. So here’s the notes I made to myself as I was going through the process of transferring my domains:
- Switch DNS service from GoDaddy to NFSN. This is done ahead of time in order to minimize the chance of downtime during the transfer.
- Remove DomainsByProxy service (if currently enabled on your domain) using the GoDaddy DomainsByProxy control panel, and enter in your contact information (including your email address) for the whois record. You need to be able to receive emails from GoDaddy during the transfer process, and if the emails are being sent to the DomainsByProxy email address, you probably won’t be receiving them.
- Unlock the domain using the GoDaddy Domain Control Center (DCC).
- Request authorization code by clicking on “Authorization Code: Send by Email”.
- Go to “Domains >> Transfer an Existing Domain” in the NFSN members control panel, and enter in the authorization code you received from GoDaddy. Enter in your contact info (or choose the RespectMyPrivacy option), agree to the Terms and Conditions, and confirm.
- You will receive an email (sent to the email address you entered in step #2) from do_not_order@myorderbox.com that reads: NearlyFreeSpeech.NET [Under Registrar: Public Domain Registry] has received a request from (your name) [(your email)] on (date) for Public Domain Registry to become the new registrar of record, for (your domain).
- Click on the “Approve Transfer Link” in that email.
- Go back to GoDaddy DCC and go to “Domains >> Pending Transfers”.
- Select your domain and click Accept/Decline.
- Confirm your acceptance.
- You will receive an email from support@godaddy.com that reads: This is to confirm that the following domain name(s) has been successfully transferred away from GoDaddy.com, Inc. to Direct Information Pvt. Ltd. d/b/a DirectI.com: (your domain). “Direct Information Pvt. Ltd. d/b/a DirectI.com” is the company that NFSN purchases their domains from.
Additional references:
Posted in Domain Registration | Leave a Comment »
July 8, 2008 by somejotnotes
Update (December 21, 2008): I tried running the code in this blog post today, and I was unable to reproduce this bug using Python 2.5.2. Therefore, I don’t know how useful the information in this post is. I have decided to leave this post up in the off chance that it might help somebody anyway.
I spent a couple of hours today trying to figure out this bizarre (and unhelpful) Python error message: IOError: [Errno 0] Error
Here is some simple code which reproduces the error:
fp = open("test.txt", "r+")
while True:
line = fp.readline()
if not line:
break
fp.write("some new text")
It seems that once readline reaches the end of the file, you can no longer write to that file.
Note that you can get the same error if you try to read and write a config file using the ConfigParser module:
import ConfigParser
#read config file
config = ConfigParser.ConfigParser()
configfile = open("temp.config", "r+")
config.readfp(configfile)
#try to write to same file
config.set("Main", "tempDir", "C:\\temp")
config.write(configfile)
configfile.close()
You can get around this error by closing the file after calling the readfp method, and then reopening the file if you want to write to it.
import ConfigParser
#read config file
config = ConfigParser.ConfigParser()
configfile = open("temp.config", "r")
config.readfp(configfile)
configfile.close()
#write config file
config.set("Main", "tempDir", "C:\\temp")
configfile = open("temp.config", "w")
config.write(configfile)
configfile.close()
Posted in Python | Leave a Comment »