Tuesday, April 24, 2007

7 Post-Install Tips for Ubuntu Linux - PCWorld article - Matthew Newton

So, you've just installed Ubuntu 7.04, otherwise known as the "Feisty Fawn" release of everyone's favorite (for now) flavor of Linux. You booted the installation disc, looked around the test environment to discover that your hardware was working, and double-clicked the Install icon on the desktop. The Ubuntu installer helped you make room for Linux on your hard drive, and even copied over some of your documents and settings from Windows.

Half an hour ago, you had only Windows on your PC, but now you have a choice at boot time, and a whole new world to explore. Congratulations!

But wait--before you dive in too deeply, here are seven steps you can take right away to prevent common headaches and help yourself enjoy your new surroundings.

1. Fix your right Alt key.

U.S. users may notice before too long that the right-hand Alt key on their keyboard doesn't work in Ubuntu. This will drive you nuts if you frequently use that key. (I use mine constantly for the Alt-F2 Run command in Gnome.)

By default Ubuntu assigns the right Alt key (but not the left one) to "third level" character input--that is, the key is reserved for entering extended and international symbols. This is good for our Ubuntu-using friends in places where third-level characters are in use, but the Gnome Keyboard Indicator applet shows that the U.S. English keyboard layout contains no third-level symbols. So for us statesiders, our right Alt key has been mapped to a function that we cannot use in the first place.

Click to view full-size image.

To get the right Alt key to behave like the left Alt key, select System, Preferences, Keyboard. On the Layout Options tab, open the 'Third level choosers' branch, and reassign the third-level chooser to another key. (I prefer the right Windows key--my laptop doesn't even have one of these, so I am actually assigning a useless function to a nonexistent key!)

2. Fix your screen resolution.

You've booted into Ubuntu and your expensive high-res display is running at a paltry 1024 by 768 resolution instead of the 1280 by 1024 or 1600 by 1200 you're accustomed to. So you click System, Preferences, Screen Resolution, only to find that the higher resolutions you know your display can support are not offered in the drop-down list. What the heck?

This is usually an indication that Ubuntu has failed to suss out the characteristics of your monitor. (Graphics card woes are also possible in this case, but in my experience monitor trouble is more common.) Luckily, a helpful Fix Video Resolution Howto in the Ubuntu wiki has solved this issue every time I've encountered it. The instructions there should be enough to get your display in gear.

3. Install Automatix.

Automatix is a gem that I've discussed before: It's the easiest way to add certain components to your system that are not included in a default Ubuntu installation for legal reasons. Automatix makes enabling DVD support, for example, a very simple point-and-click process.

Head to the Automatix installation page and follow the download and installation instructions for Feisty.

Once that's done, you'll find Automatix under Applications, System Tools, Automatix. See my previous coverage of Automatix for pointers that are still relevant with this latest version.

4. Make sure all your media files play.

Start double-clicking your various audio and video files to see if they play. (You'll find links to your Home folder and your Windows partition--if you have one--in the Places menu, so start there to find your media collection.) When Feisty encounters a file type it doesn't know how to handle, an automated codec installer will pop up to try to help you download and install support for the file in question.

If you find video files in your collection that do not play properly no matter what you try, use Automatix (see above) to install the AUD-DVD Codecs collection of packages; then use Synaptic (see below) to install the Totem-xine package, and try your videos again. (This procedure disables Feisty's ability to automatically search for codecs, but you're taking this step only if that functionality fails you in the first place.)

5. Give Desktop Effects a shot.

In my last column, I looked at Feisty's Desktop Effects--an experimental feature set that brings gee-whiz 3D effects to the Linux desktop. If you have a decent graphics card with 3D capabilities, it's totally worth your while to see if Desktop Effects will run well on your system. (The features work reliably on some machines, crash after a while on others, and completely garble the display on particularly unlucky PCs--hence the designation "experimental.")

To try out Desktop Effects, select System, Preferences, Desktop Effects. When the 'Enable the driver?' dialog box pops up, click Enable Driver. You'll now be prompted to restart your computer (a rare thing in Linux land).

Once you do, log back in and select System, Preferences, Desktop Effects again. In the new dialog box, click the Enable Desktop Effects button. After a few moments of on-screen craziness, your desktop should reappear, looking as it did before. But you'll notice a difference the moment you drag a window or open a drop-down menu. (Yowza, look at that!)

If everything looks good, click Keep Settings in the dialog box asking you to confirm the change. (If things look bad, this is your first chance to bail out. If things are so poor you can't even see the dialog box, have no fear: Feisty will automatically revert to your former settings after 30 seconds.)

Try enabling the workspace-switching effect back in the Desktop Effects box; when you click to a different workspace (via the widget in the lower right of your screen), you should see a nifty effect. Also note the altered behavior when you press Alt-Tab.

If you don't like what you see with Desktop Effects (or if you find that your system becomes crash-prone or otherwise behaves oddly with the Effects, uh, in effect), you can turn them off by once again summoning the Desktop Effects dialog box and clicking Enable Desktop Effects. Yes, you read that right: The button behaves as a toggle--though, alas, at this point in time its label doesn't change to 'Disable Desktop Effects' to indicate this to the user. But clicking the button when effects are enabled disables them, as you will see if you click the button and then move a window around.

6. Try Beryl for unbeatable eye candy.

Feisty's Desktop Effects are driven by software called Compiz, originally developed at Novell. Last year some enterprising hackers working on Compiz decided to fork (that is, split off from, using existing code as a starting point) the project, and came up with their own offering, Beryl. The two projects are actually slated to merge their efforts back into one program later this year, but in the meantime, if Desktop Effects work reliably on your machine, chances are the latest version of Beryl will work too. And Beryl is far more impressive--and far more configurable--than Desktop Effects.

To test-drive Beryl, first disable Desktop Effects by using the oddball toggle button I described at the end of tip #5. Now open a Terminal window (Applications, Accessories, Terminal) and enter the following command:

sudo gedit /etc/apt/sources.list

Add the following line to the top of the text file that comes up for editing:

deb http://ubuntu.beryl-project.org feisty main

Save the file and quit. Now back on the command line, issue the following four commands, one at a time:

wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -

sudo apt-get update

sudo apt-get install beryl beryl-manager emerald-themes heliodor beryl-manager

beryl-manager

There should now be a shiny red gem appearing in the notification area (Windows refugees, think "system tray") near the upper right of your screen. Right-clicking that icon gives you several useful options.

Select Window Manager lets you switch among Beryl, Compiz, or Metacity (the default, plain-vanilla window manager for Gnome). Select Window Decorator affects how the frames of windows are drawn. Select Emerald, and you'll get window frames designed with Beryl in mind. (See Emerald Theme Manager, also in the red gem's menu, for more of these.) Select Heliodor, and you'll get plain window borders imported from Metacity.

Selecting Beryl Settings Manager will bring up the labyrinthine configuration dialog box for Beryl. Warning: If you're a settings geek, you will lose a few hours of your life here. Take note of where you can assign functions to the corners of the screen: Select General Options along the top and Shortcuts along the right, and then click the Screen Edges tab. The horribly named 'Initiate Window Picker for All Workspaces' function is the equivalent of Mac OS X's Exposé feature--task-switching nirvana, if you ask me.

If Beryl runs stably and you'd like it enabled every time you log in, select System, Preferences, Sessions. On the Startup Programs tab, click New. Enter beryl-manager in both text-entry fields and click OK. Now click Close.

7. Make friends with the package managers.

An entire planet's worth of Free Software is out there for Ubuntu systems, and you don't have to trek across the Web and back to find it all. In the last tip, we interacted with a command-line package manager (the part of a Linux system that tracks what is and what is not installed) just for expediency's sake. But now it's time to meet two friendlier interfaces for package management.

Click to view full-size image.

First off, there's the Add/Remove Applications dialog box, reached via Applications, Add/Remove. Unlike its Windows counterpart, this tool is very good at downloading and installing new applications. You'll be surprised by the number of offerings, and in some cases you'll even be downright shocked by the high quality of the software you retrieve.

If you want to see a geekier, more fleshed-out listing of all available packages, select System, Administration, Synaptic Package Manager. Whereas Add/Remove Applications is a friendly little forklift of a package manager, Synaptic is a heavy-duty earthmover. If you're interested in learning more about the packages that make up your system (and the ones waiting to be discovered), Synaptic's various views are good places to explore.

I could spend a whole 'nother column telling you about all the great packages that are not installed by default, but for now I'll just leave you with this bonus tip: If you're running Ubuntu on a laptop and your Wi-Fi card is not detected or supported, try installing the Ndisgtk package (listed as such in Synaptic, but as 'Wireless Windows Drivers' in Add/Remove Applications). Then select the new System, Administration, Windows Wireless Drivers entry in Ubuntu's menu bar. The ensuing dialog box asks for the location of an INF file that represents the Windows driver for your wireless adapter. Have a driver disc? Find the INF file on there and see if Ndisgtk can get you up and running.