edwards block

Archive for the ‘Geek Notes’ Category

Installing Ubuntu 9.10 on a ThinkPad T-400

January 8th, 2010 at 2:43 pm

Ubuntu 9.10 (aka: Karmic Koala), 64-bit version.

Download Kanotix and burn to CD

Boot Kanotix

Open a terminal window and set admin password:

sudo passwd

At the bottom right of the Kanotix desktop, click the “K”, go to “Settings” and then “Partition Editor”. When prompted, enter your newly set admin password.

Though I burned a set of recovery disks (one CD and two DVDs), I left the restore partition intact since I have a 500gb drive and loads of spare space. I resized the Windows partition (from 460gb to 29gb) and applied the change. Perhaps because it was such a large hard drive it, it took some time. Occasionally, it seemed to stop working until I touched the touchpad, and then things would start moving again. After at least twenty minutes of the slider moving back and forth, it started resizing (showing the progress), and indicated that it would take another 33 minutes. However, the number soon dropped to 21 minutes.

Once that was done, I shutdown Kanotix and restarted the system to see if Windows would still boot. ThinkVantage and/or Windows detected something different and initiated a startup repair. This went on for two hours with little indication that anything productive was happening. I aborted, then restarted and initiated a full restore using the ThinkVantage button (pressed during the first seconds of boot up).

I was warned, and I expected, that restore would put the hard drive back to how it was when it left the factory. However, after restore finished and Windows booted up, I was pleasantly surprised (ecstatic, in fact) to discover that my partitioning was intact and that restore only restored Windows within its now restricted partition, leaving the rest as free space.

Then I booted using the Ubuntu CD. After answering the usual questions about time zone and keyboard, etc., the partition manager loaded. I chose to partition manually rather than accept any of the suggested options. From my free space, I create the following partitions:

  • Swap: 8gb
  • Root (/): 30gb
  • Home: 410gb

After that, installation went as usual.

Written by Edward

January 8th, 2010 at 2:43 pm

WordPress: Force full comment display on archives or index page

April 21st, 2009 at 12:37 pm

By default, most themes are written so that archive or index pages (pages that display multiple posts) show how many comments have been approved, and the reader must click a link to see the actual comments, usually with the result of opening the specific post. This is for good reason, for on a site with a large number of comments on many posts, display of the pages would become unwieldly.

One client, however, wanted all post comments to appear fully visible on his archive/index page. This required some theme tinkering, with a change in which php function was called. The solution, as described by Flisterz, was simple:

I added this to the second line of “archive.php” (not to be confused with “archives.php”), right after the "get_header" line:

<?php $withcomments = 1 ?>

And I added this to the same file, right before the end of the loop:

<?php comments_template(); ?>

Some optional cleaning up was done, to eliminate the old comment code and place tags in the most beneficial spot, but otherwise, that did it.

Written by Edward

April 21st, 2009 at 12:37 pm

‘In Touch’ plugin display of submit button in IE

April 20th, 2009 at 5:53 pm

If you use the “In Touch” contact form plugin for WordPress, you might have noticed that the Submit button is incorrectly placed (over top of the text entry box) when viewed using some versions of Internet Explorer, though it seems to display just fine in Firefox. While it would be nice if everyone in the world came to their senses and dumped IE, the reality is that a majority still use the thing.

Here’s the solution to this display problem, thanks to Dan Lai:

Locate the file intouch.php (found in your plugins folder) and open it with a text editor. Locate the following section:

div.intouch div.inputfield input.submitbutton {
			width: auto !important;
			padding: 2px;
			margin-left: 10px;
			left: 25%;
			position: absolute;
		}

Change:

position: absolute;

to:

position: relative;

Save it, and everything should be good.

Written by Edward

April 20th, 2009 at 5:53 pm

Search-and-replace plugin for WordPress

February 25th, 2009 at 12:39 pm

I recently moved a client’s website site from a subdomain to a real domain space on the same server, and later found that all (several hundred) images were still pointing to the old subdomain folder in their URLs. I tried doing a search and replace query in phpMyAdmin, but the characters of the URLs generated errors.

Rather that try to educate myself on SQL queries, I took the easy route and looked for a WordPress plugin. I found one by Mark Cunningham and Frank Bueltge called, appropriately enough, Search and Replace. It worked perfectly, and my database changes were completed in about .0067 seconds. Naturally, if you plan to try it, back up your database first.

For info, see Frank’s site (German) or for English, try the WordPress download page for the plugin.

****** Technical support information under this category is provided without any guarantees that it will work as described. Use any advice here at your own risk. ******

Written by hedley

February 25th, 2009 at 12:39 pm

Configuring a Linksys router for use in Costa Rica

April 1st, 2007 at 9:08 pm

Although I had no problems getting a “D-Link” router to work in Costa Rica, out of the box with the default settings, I was unsuccessful at doing the same with Linksys routers (to work with the Costa Rican phone company’s (ICEs) DSL service). I tried a Linksys WRT54G and a Linksys WRT300N. I was able to connect from a PC to the router, but not to the internet.

Fortunately, a Network Administrator with the username “toomanydonuts”, on a forum at Linksys.com, provided the following suggestions:

The “modem” that you have is actually a router-modem. You have a few choices as to how you set it up. Your router-modem uses the same IP address (192.168.1.1) as your Linksys router, and this is probably the root of your problems.

Option 1
Place the router-modem in “bridge” mode, then use the Linksys as your router. In this setup, the Linksys should probably work at its factory default settings. (Note: you may need to reset the router to its factory default settings.) The main question here is this: Does ICEs or CTC Union supply the documentation needed to set the ATU-R210 to “bridge mode”? If you cannot find this info, skip this option.

The WRT will work at its factory default settings assuming that ICEs uses “Automatic Setup – DHCP”. If not, you will need to change the “Internet Connection Type” in the WRT.

Option 2
Use the ATU-R210 as your router-modem and DHCP server, and use the WRT300N as a WAP (wireless access point). In this case, you will first need to setup the WRT using a computer that is wired to it (do not connect the ATU at this time). To do this, set the WRT300N to a fixed “Local IP address” of 192.168.1.2 (Note: You may need to change this to a different address if the ATU-R210 requires a different range for fixed LAN IP addresses.), and also, turn off the DHCP server in the WRT. Make sure that the DHCP server in the ATU is turned on. Then wire a port on the ATU to a numbered port on the WRT (not the WAN (Internet) port).

Option 3
Leave the ATU alone, then set the WRT to create a second subnet. To do this, use a computer that is wired to the WRT (do not connect the ATU at this time). Set the “Router IP address” to 192.168.2.1 Leave the DHCP server in the WRT turned on. Then connect one of the numbered ports on the ATU to the WAN (Internet) port of the WRT. This should work.

The ideal setup is option 1. The next best option is 2. Option 3 is the easiest to set up.

I found a manual for the ATU-R210 online, but ICE apparently changed the default password when they installed it, so I couldn’t access the admin panel, which ruled out Option 1. Option 2 worked perfectly, though. I had previously tried changing the IP to .2, but had not tried that in combination with disabling DHCP.

****** Technical support information under this category is provided without any guarantees that it will work as described. Use any advice here at your own risk. ******

Written by Edward

April 1st, 2007 at 9:08 pm

Stop censorship