Saturday, 28 November 2009

Ubuntu Local Committee Install and Tweak

The ever-fantastic Ubuntu Vancouver Local Committee is organizing a Support Saturday. Come on down and learn about the world's most popular free operating system. If you already use Ubuntu, get some help to make your experience even better.

The details:

Saturday Dec 5th, 2009 11am - 2pm
Vancouver Community College
1155 East Broadway (Broadway Campus)
Building B, Room 219G

The poster is at: http://is.gd/560zM (a pdf).

Sunday, 20 September 2009

Ubuntu Breaks Thinkpad Yet Again

Sometime in the last couple of weeks the brightness controls on my Thinkpad x300 stopped working.

I fixed it by creating /etc/modprobe.d/thinkpad_acpi.conf and putting this line in it:
options thinkpad_acpi hotkey=enable,0xfdffff
Then you have to remove and reinstall the module to read the new options:
sudo rmmod thinkpad_acpi
sudo modprobe thinkpad_acpi
I'm not sure I'm getting all the brightness I should, but at least the control works to put the brightness up to make the screen readable.

Whine: This isn't the first time some part of the interface between Ubuntu and my laptop has broken due to an update. I can sympathize with the developers and the difficulty of testing all laptops out there, but I can sympathize more with the user who isn't going to put up with an O/S that mysteriously starts and stops working as updates are installed.

Tuesday, 11 August 2009

DHCP Not Updating DNS

So I had a weird problem -- suddenly my DHCP server stopped updating my DNS server when my main laptop that I use all the time renewed its DHCP lease. It seemed to be working fine for all other machines on my network.

After much fooling around and some reading, I discovered in the middle of some document a statement that the DHCP server keeps track of whether it thinks it has updated the DNS server, to avoid one round trip when renewing a lease. This means that if the DHCP server thinks it has updated DNS, it won't try again and if the DNS server doesn't have that address, it'll never get it.

Well, the DNS server will never get it until you do the following on the DHCP client machine to force a release of the lease:
sudo dhclient -r
Once you do that and then renew the lease again (e.g. disconnect and connect the network) everything is fine.

Saturday, 18 July 2009

Firefox Disappears when Changing Display Settings

After a year without problems, suddenly I started having a problem where Firefox disappeared when I switched between the laptop screen and my external monitor. Firefox was still running, but I couldn't make it appear.

It turns out that somehow it was ending up on outside the screen and therefore it wasn't being shown on the bottom panel. Here's how to fix:

  1. Right click on the bottom panel ("task bar" in Windows talk) and select "Preferences".
  2. Select "Show windows from all workspaces". Then the Firefox button will at least appear on the bottom panel.
  3. If you can't see the window, right click on its button in the bottom panel and click "Move". Then you can pull the window onto the current display and click again to drop it there.

Friday, 10 July 2009

iPhone Tethering Notes for Ubuntu Vancouver LoCo

I gave a lightning talk at the Ubuntu Vancouver Local Committee July 9, 2009 on accessing the Internet from an Ubuntu computer through the iPhone.
  • Use the instructions from the Ubuntu forums here. This other page gives the underlying commands used by the script from the Ubuntu forum. You may find it helpful if the script doesn't work for you.
  • During installation, when you're asked to make the iPhone discoverable, go to Settings-> General-> Bluetooth and turn on Bluetooth.
  • Part way through the instructions in the Ubuntu forum you're asked to "pair" your iPhone with the computer. To "pair" your iPhone with your computer:
  1. Click on the blue icon with white triangles that you'll find amount the other notification icons, typically in the upper-right corner of your screen.
  2. Select "Set up new device..."
  3. Click "Forward".
  4. Wait for your iPhone to appear in the list. If it doesn't, go back to Settings-> General-> Bluetooth on the iPhone and make sure Bluetooth is on. Also, make sure your iPhone is less than a 1/2 metre from your computer.
  5. Select your iPhone in the list and click "Forward".
  6. Ubuntu will show you a four-digit code and ask you to enter it on the device. The iPhone will have a keypad showing. Enter the code.
  7. Ubuntu will ask if you want to allow the connection. Select "Always allow" and click "OK".
  8. You're now paired.
  • Before trying to tether your computer to the iPhone, go back to Settings-> General-> Bluetooth. Your computer's name with "-0" appended should appear below the on/off button. If it says "Not connected" beside your computer's name, click on the computer name and wait for it to change to "Connected".
  • Using Network Manager, turn off other network connections you may have running before tethering.
  • Finally, before running the script, don't forget to turn on Internet Tethering on the iPhone. Go to Settings-> General-> Network-> Internet Tethering and turn Internet Tethering on.
  • Keep the iPhone with 1/2 metre of your computer. (You can try more, but I suspect that the flaky connection I sometimes experience may be associated with the distance between the phone and the computer.)
  • After running the script, you still won't be able to browse the Internet. (You don't have any usable DNS servers defined on your computer.) Do the following in a terminal:
sudo cat >>/etc/resolv.conf <<-END nameserver 208.67.220.220 nameserver 208.67.222.222 END
  • I put the above in my uit.sh script at the appropriate place.
  • Remember to turn off Internet Tethering and Bluetooth on the iPhone when you're done.
  • Disconnect tethering on your computer by running: sudo ./uit.sh -d
  • Don't forget to reconnect your computer to your usual networks after you turn off tethering.
Troubleshooting
  • My experience is that you have to do everything in exactly the right order. If something goes wrong, do the following and then start over:
  1. On the iPhone, go to Settings-> General-> Network-> Internet Tethering and turn Internet Tethering off.
  2. On the iPhone, go to Settings-> General-> Network-> Bluetooth and turn Bluetooth off
  3. On your computer, run the disconnect script: sudo ./uit.sh -d
  4. On your computer, restart Bluetooth: sudo /etc/init.d/bluetooth restart
  • The Bluetooth connection seems to be unreliable. Sometimes I can browse a page or two and then it stops working. Sometimes it just doesn't connect at all. After two or three tries I usually get a reliable connection. Every time it fails, be sure to do all the steps in the above list.

Friday, 26 June 2009

Tethered iPhone

I'm posting this from my laptop sitting outside Marc's Karate dojo with my iPhone in my pocket providing my Internet connection over Bluetooth. I can't help but be geekily happy about this. I never bothered to set up the tethering before OS 3.0, so it's new to me. This is old news to the hardcore users.

I guess a new thing is that Fido is cool with the fact that I've tethered. Not that I care what they think, but phone companies are vindictive enough to actually cut you off if they detected you were tethering, so I feel a little better that it's legit. (Make sure you read the details to be sure you're legit.)

The best instructions I found are here. The instructions here show the actual commands, which is useful to know when you're debugging. It wasn't smooth for me because I didn't do the sequence in perfect order, and it looks like once I messed it up I just couldn't get it to connect. By going System-> Preferences-> Bluetooth and undoing the Bluetooth pairing, I was able to go through the steps from the start and get it working.

The part I had out of order is that I didn't check to see that the iPhone was actually connected to my laptop before attempting to tether from the laptop. The Bluetooth screen on the iPhone has to say "Connected", not just show the name of your laptop.

While writing this I lost my connection and couldn't get it back until I restarted Bluetooth on my laptop (sudo /etc/init.d/bluetooth restart). I have no idea what that's about, but I've seen others on the Internet complain that the connection isn't always reliable.

Thursday, 25 June 2009

Keyboard Layouts Disappear when Plugging In Keyboard

I have USA and Spanish (Spain) keyboard layouts defined on my laptop, with USA being the default. When I plug in my external keyboard I can no longer choose the Spanish layout either from the keyboard layout indicator in the panel or via the keyboard shortcut I've defined. If I bring up the keyboard preferences, the Spanish keyboard is still in the list. To work around the problem, I either delete it and re-add the Spanish layout, or restart Gnome (log out and log in).

Sometimes after unplugging and plugging in the keyboard, attempting to switch layouts will cause the keyboard indicator to display "??" instead of "USA" or "Esp". Sometimes it simply displays "USA". In either case, the keyboard responds with the USA layout, meaning no easy access to the Spanish characters.

I'm running on a Lenovo Thinkpad x300. The original Ubuntu install was 8.04 and I've upgraded (using the upgrade process via Synaptic, not by reinstalling) to 8.10 and now 9.04. I have an external PS/2 keyboard in Spanish/Spain physical layout that I plug in to the laptop through a PS/2 to USB cable. The laptop has a USA physical layout.

I first noticed this with 8.10, but I can't say for sure that it wasn't a problem in 8.04 as I didn't use the external keyboard very much with 8.04. On 8.10, the problem also happened when I suspended and resumed, but that seems to be fixed in 9.04. I can suspend and resume and the Spanish layout is still available. However, if I actually unplug the external keyboard and plug it back in, I lose the Spanish layout.

UPDATE: There is a fix: Add the jaunty-proposed packages to your package source list. Through the GUI that's System-> Administration-> Software Sources. Then run System-> Administration-> Update Manager.

Here's the original fix:

  1. Read about updating from PPAs here: https://help.launchpad.net/Packaging/PPA#Installing%20software%20from%20a%20PPA
  2. Add Sergey's PPA to your apt sources: https://launchpad.net/~sergey-udaltsov/+archive/ppa
  3. Update your software, making sure that one of the packages updated is "libxklavier - 3.9-0ubuntu3"
  4. Restart your computer
This is Ubuntu bug #363169.

I spent a lot of time flailing around the Internet looking for a solution to this problem. I posted my problem to Ubuntu's Launchpad in mid-May and no one appears to have even looked at it except me. In the meantime, bug #363169 was posted in mid-April, and all my searches hadn't turned it up. Only when I posted the bug to Gnome (thinking it was a Gnome problem, not Ubuntu), did Sergey helpfully see it and point it back over to the correct Ubuntu bug, with a fix.

I've tried to update a few places in Launchpad where I was looking for solutions, but I fear that others having this same problem won't see it. That's why I've made this blog post.