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 nameserver END
  • I put the above in my 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 ./ -d
  • Don't forget to reconnect your computer to your usual networks after you turn off tethering.
  • 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 ./ -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.