Thursday, October 7, 2010

Stuck on dial-up (Updated)

My mother has been a happy Ubuntu user ever since I installed Dapper to solve the countless problems she was having with Windows Me. Since her computer is starting to age, and she's a 5-hour drive away, I bought her a brand new computer for her birthday, which I've been installing with Lucid this week.

Problem is, she is still stuck on Dial-Up internet access no matter how hard she's tried to get broadband from the local phone and cable companies.

Unfortunately, NetworkManager still doesn't have 56K modem support, so a few steps are necessary to setup Ubuntu for dial-up.

Since her phone line is noisy, I purchased a reliable modem that doesn't need special drivers to work in Linux, along with an appropriate USB-to-serial adaptor.

Once I made sure the modem was visible by searching through dmesg for the right serial port, and testing it with minicom, I performed the following steps:

  1. Installed the gnome-ppp package
  2. Added her user to the "dip" group so gnome-ppp could spawn the pppd daemon
  3. Configured gnome-ppp with the phone number, username and password provided by her ISP

Once that was done, connecting to the Internet worked great, except for a single problem: Firefox would always start up in "Work Offline" mode. It turns out Firefox uses NetworkManager to figure out if an Internet connection is available when it starts. To fix this:

  1. Type "about:config" in the Firefox URL bar
  2. Search for the "toolkit.networkmanager.disable" key
  3. Switch it to "true"

I'm looking forward to seeing her go from Hardy to Lucid this weekend!

Updated 2010-10-22:

So, I ran into a couple of extra difficulties when I actually installed her new computer. It seems her ISP uses CHAP or PAP to authenticate which wasn't the case when I tried connecting with my ISP at home. Gnome-PPP uses WvDial to perform the actual dialing, and WvDial tries to add the necessary authentication information itself to the /etc/ppp/pap-secrets and /etc/ppp/chap-secrets files. Problem is, those files are owned by root and are 600 by default. The pppd man page states "this file should be owned by root and not readable or writable by any other user. Pppd will log a warning if this is not the case.", so this isn't an easy problem to solve. Since I didn't want her running gnome-ppp as root, I changed both files' ownership to root:dip and permissions to 660. This allowed gnome-ppp to authenticate to her ISP, even though pppd is logging a warning.

The second problem I encountered was that Evolution would always come up as offline. Like Firefox, it integrates with NetworkManager to check if the computer is online. Unfortunately, unlike Firefox, Evolution doesn't seem to have a way to disable NetworkManager integration. Since time was limited, and I knew she wouldn't be using the Ethernet port on her computer, I simply disabled NetworkManager entirely by editing the /etc/init/network-manager.conf file.

My stepfather owns a Dell Vostro laptop with Lucid on it, and uses it to connect to the high-speed wireless network at work. He asked me if I could get a modem for his laptop so he could use Dial-Up when at home. I'm not sure how I will be able to handle this for now, as disabling NetworkManager won't be an option in his case...


Jonathan Carter said...

My mother also uses gnome-ppp and it works great! She has mobile broadband at least but she's currently on Ubuntu 7.10 (before nm got dial-up support for mobile broadband), and it's a bit hard to upgrade there since she's about 24 hours of fly-time away currently :)

dschulz said...

How about getting rid of networkmanager entirely and installing wicd instead? Using wicd your stepfather should be able to use full speed broadband at office (wifi, ethernet), and gnome-ppp at home.

mdeslaur said...

@dschulz: thanks for the suggestion, I'll look into that!