This chapter guides you through setting up all the essential components of your Ubuntu installation. This includes hardware configuration, as well as setting up e-mail. It covers the post-installation steps necessary to get your system up and running efficiently.
Like all modern Linux distributions, Ubuntu is practically automated when it comes to setting up key hardware and software components. Key software will work from the start, and most hardware will be automatically configured. However, you might need to tweak a few settings to make everything work correctly. Read on to learn more.
The age-old criticism that the Linux OS lags way behind Windows in terms of hardware support is long dead. The majority of connectable devices, such as digital cameras and printers, will work with Ubuntu immediately, with little, if any, configuration.
Most underlying PC hardware is pre-configured during installation without your knowledge and without requiring further work, so with luck there will be less hunting around for drivers than you might be used to with Windows. Your graphics and sound cards should work without a hitch, for example. In addition, nearly all USB and FireWire devices you plug in after installation will be supported. (Table 7-1 lists some online sources of information about hardware support for Ubuntu). You'll be surprised at how many user manuals now have a section for Linux—often given equal weight to Mac OS. Documentation for Netgear routers is one example.
However, it's still the case that a substantial number of devices are not supported by Ubuntu. Generally, it's a black or white situation: Ubuntu either works with a piece of hardware or it doesn't.
The types of hardware that Ubuntu doesn't support are often esoteric devices that rely on custom software provided by the hardware manufacturer, but even in mass-market areas such as printers, scanners, and wireless adapters, some manufacturers are still frustratingly uninterested in publishing their own Linux drivers, and even refuse to provide details about the hardware to volunteer programmers who offer to write free and open source drivers at no expense to the company. It's also sometimes the case that brand-new models of hardware won't work with Ubuntu when they first hit the market. Companies prioritize developer resources, so Windows drivers generally get written before Linux drivers. However, as soon as a new piece of hardware comes out, work is usually undertaken to ensure that Linux is made compatible with it, by the company, the community, or a combination of the two. This is especially true of hardware such as printers and scanners, and it's one more reason why you should regularly update your system online.
Tip Before you hit the stores to buy a new piece of hardware, it's a good idea to do a little research. Compatibility with Linux is sometimes listed on the hardware box or at the manufacturer's web site (even if you sometimes need to search through the FAQ section to find out about it). And, of course, others may have tried your particular small object of desire, so searching <hardware name> + Linux compatibility in Google may provide enlightenment. Another good source for information on Ubuntu hardware compatibility, is www.ubuntu.com/certification.
Unfortunately, unlike with Windows, it's not very common to find Linux drivers on the CD that comes with the hardware. Even if you do find a Linux driver supplied, chances are that it will work with only certain enterprise-oriented versions of Linux, such as Red Hat Enterprise Linux or SUSE Linux Enterprise Desktop. Some drivers are usable but imperfect or lack features that are available in their Windows counterparts. At the time of this writing, Ubuntu has yet to gain the kind of momentum that leads manufacturers to specifically produce drivers for it, but this may change in the future, especially as more users encounter the system via Netbooks and mobile devices. Various OEMs have dipped their toes in the open source water. Dell and Shuttle are the biggest names currently bundling Linux with some of their desktop offerings, with smaller specialist companies like System 76 competing with excellent pre-installed offerings.
At the other end, Linux takes care of addressing most hardware through the kernel. If the hardware manufacturer has made specifications for a device available to the public, there probably is an open source driver available in the kernel to address your hardware. This is especially true for hardware devices that are a bit longer on the market (which means that open source developers have had time to develop specific drivers. If that is the case, you'll see that Ubuntu just recognizes the device and no additional configuration is needed at all.
Note It's possible to use a program called alien to convert software installation packages designed for other distributions into Ubuntu installation files. Doing so isn't complicated but may not work well with driver files because of the subtle differences in where system files are stored across different Linux distributions. You can find more information about alien at http://kitenet.net/~joey/code/alien/
. It's contained within the Ubuntu software repositories and can be downloaded using the Ubuntu Software Center or Synaptic Package Manager. A graphical front end to alien is available at http://code.google.com/p/foxoman/wiki/PackageConverter
.
As discussed earlier in this book, Linux is an open source OS. This means that the source code underlying Linux programs is available, so that everyone who is interested can contribute to its further development, or study the way the software was written. This is a good thing when it comes to hardware drivers, because bugs in the code can be spotted and repaired by anyone with an interest in doing so. If you consider that a bug in a graphics driver could mean your PC crashes every 5 minutes, the value of such an approach is abundantly clear.
Unfortunately, some hardware manufacturers don't like to disclose how their hardware works, because they want to protect their trade secrets. This makes it impossible for them to release open source drivers, because such drivers would expose exactly how the hardware operates. Because such companies are aware that growing numbers of people use Linux, they release proprietary drivers, whose source code is not made publicly available (in the same way that Windows source code is not released to the public).
Aside from ethical issues surrounding not being able to study the source code, the biggest issue with proprietary drivers relates to bug fixing. To use a proprietary driver is to be at the mercy of the hardware manufacturer's own development and release schedule. If the driver has a serious bug, you'll either have to work around it or put up with troubling issues until the manufacturer offers an update. A few years ago, a proprietary driver for a 3D graphics card stopped any computer it was installed on from going into hibernation mode (that is, suspending to disk). Those using the drivers had to wait months until the fix was released.
Despite this, and although the folks behind Ubuntu strongly support free and open source software, they realize proprietary drivers need to be used in certain situations. For example, it's impossible to use the 3D graphics elements of some graphics cards unless you have a proprietary driver, and this means that visual effects will be unavailable to users who happen to have hardware that isn't currently fully supported by open source drivers.
Because of this, Ubuntu automatically installs wi-fi proprietary drivers by default if no open source alternative exists (or if the open source version is not yet good enough). It also offers the opportunity to easily install some proprietary graphics card drivers if they provide more functionality than the open source versions.
Note Linux sees hardware in a technical way, rather than in the way humans do. If you attach something such as a USB CD-R/RW drive, Linux will recognize the drive hardware and attempt to make it work. It won't try to find a driver for that specific make and model of CD-R/RW drive. Thus, Linux is able to work with a wide range of hardware, because a lot of hardware is similar on a technical level, despite the differences in case design, model names, and even prices!
WHAT HARDWARE WORKS?
When using Windows, you might have come across Device Manager, the handy tool that lists your PC's hardware and provides access to various properties. Ubuntu offers a similar piece of software, as shown in Figure 7-1, but it isn't installed by default.
After you can connect to the Internet (following the instructions in the “Getting Online” section of this chapter), you can install Device Manager by using the Synaptic Package Manager (see the “Installing Software” section of this chapter), as follows:
device manager
.After you've installed Device Manager, you can open it from the Ubuntu menu by typing Device Manager in the Search bar. Next click the icon to launch the program. You'll need to click View Device Properties to ensure that Device Manager adds the useful (but occasionally overwhelming) Properties tab.
You should be aware of a few important differences between the Windows and Ubuntu versions of Device Manager. Though the aim of Ubuntu's Device Manager is to manage hardware devices, the project is still in its infancy and can provide only hardware information at the time of this writing. On the other hand, Ubuntu's list is far more comprehensive than that in Windows. In Ubuntu, Device Manager thoroughly probes the hardware to discover its capabilities.
Perhaps the biggest difference, however, is that just because a piece of hardware is listed within Ubuntu's Device Manager doesn't mean that the hardware is configured to work with Ubuntu. In fact, it doesn't even imply that the hardware will ever work under Ubuntu. Device Manager's list is simply the result of probing devices attached to the various system buses (PCI, AGP, USB, and so on) and reporting the data.
Nonetheless, Device Manager is the best starting place if you find that a certain piece of hardware isn't working. If a piece of hardware is listed, then it proves, if nothing else, that the system recognizes that the hardware is attached. For example, later in this chapter, we describe how you can use Device Manager to discover crucial details about wireless network devices, which you can then use to install drivers.
Tip If your computer is not yet online, you'll need to use a computer that is online (perhaps another computer, or Windows if you dual-boot) to download the software, and then copy it across to your Ubuntu computer for installation. To download the software, visit the following two addresses in your browser. You will be prompted to download a file after typing each address:
http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gnome-device-manager/gnome-device
-manager_0.2-3_i386.deb
http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gnome-device-manager/libgnome
-device-manager0_0.2-3_i386.deb
After the files are downloaded, copy them to the Desktop on your Ubuntu machine, using a USB memory stick or similar storage device. Right-click the icon for libgnome-device-manager0_0.2-3_i386.deb
and select the first choice in the context menu, Open With Gdebi Package Manager. A Package Installer window will appear. Click the Install Package button and supply your password when asked. Close the window when the package has finished installing. Next, right-click the other icon, for gnome-device-manager
itself and repeat the same procedure.
Unlike some versions of Linux, Ubuntu doesn't rely on a centralized configuration software package. Instead, it uses smaller programs to configure hardware. For example, to configure the network, you'll use the NetworkManager program, and printers are configured using a separate printer configuration program. Because using some of the configuration software involves reconfiguring your entire system, doing so requires administrator privileges. Therefore, you'll be prompted for your login password each time you use some of the programs. In some cases, after you've made changes, you'll need to click the Apply button to put the changes into effect. When you've finished configuration, simply close the program window by clicking the Close button.
Note Ubuntu remembers your password for 5 minutes after you enter it. Therefore, if you open the same application or another that requires administrator privileges within that amount of time, you won't be prompted to enter your password again.
GETTING HELP FROM THE COMMUNITY
Mouse and key repeat speeds are personal to each user, and you may find the default Ubuntu settings not to your taste, particularly if you have a high-resolution mouse such as a gaming model. Fortunately, changing each setting is easy.
Open Applications and in the search bar, type mouse to display the Mouse Preferences icon. Click it to open the Mouse Preferences dialog box, which has General and Accessibility tabs. On a laptop, you might also see the Touchpad tab.
On the General tab of the Mouse Preferences dialog box, shown in Figure 7-2, you can configure several options.
These options are as follows:
Changes are made as each setting is adjusted, so to test the new settings, simply move your mouse.
The settings on the Accessibility tab can help people with physical disabilities use the mouse. However, to enable these features, you need to enable Assistive Technologies in Ubuntu first, as follows:
From the Accessibility tab, you can enable Simulated Secondary Click and dwell click options. Selecting the “Trigger secondary click by holding down the primary button” check box simulates a right-click after you hold the left-click for a certain amount of time (useful for those having trouble right-clicking). The right-click actually occurs when you release the mouse button, for instance bringing up a context menu if you're clicking on a file icon. The amount of time you have to hold down the mouse button can be configured by moving the Delay slider to the left for a faster response or to the right for a longer delay.
A dwell click allows you to simulate a mouse-click action after the mouse pointer has been left idle for a certain amount of the time so, for instance, hovering over an icon for a few seconds could double-click it to launch an application. To enable this feature, select “Initiate click when stopping pointer movement.” You can set the length of the idle time by moving the Delay slider to the left for less idle time or to the right for a longer delay. The Motion Threshold setting determines the amount of pointer movement allowed while the mouse is still considered idle (useful for those who might be unable to control small movements of their hands). Moving the Motion Threshold slider to the left makes the mouse pointer sensitive; moving it to the right makes the pointer less sensitive. You can choose two types of dwell click:
Note Orca, GNOME's screen reader software, also includes a tool that magnifies the area under the mouse pointer. It is available in the Assistive Technologies Preferences. Select the Preferred Applications option and set Orca to “run at start.” The software can be used to both magnify an area of the screen under the mouse and, using a speech synthesizer, read onscreen elements out loud.
The Touchpad tab in the Mouse Preferences appears on laptops only. You can set the following options:
From the applications interface, type keyboard. This shows the Keyboard icon which you can use to open the Keyboard Preferences dialog box. This dialog box has five tabs: General, Layouts, Accessibility, Mouse Keys, and Typing Break.
The General tab offers Repeat Keys settings and a Cursor Blinking slider. You can alter the rate of key repeat, which can be useful if you often find yourself holding down the Backspace key to delete a sentence; a shorter setting on the Delay slider and a faster setting on the Speed slider can help. However, if you make the delay too short for your typing style, you may find double characters creeping into your documents; typing an f may result in ff, for example.
Modifying the Cursor Blinking slider setting may help if you sometimes lose the cursor in a document. A faster speed will mean that the cursor spends less time being invisible between flashes.
On the Layouts tab, you can choose your keyboard model, add an alternative keyboard layout, and configure layout options, as shown in Figure 7-3. Typically, the generic keyboard works fine for most setups. However, if you want to make full use of the extra keys on your keyboard, such as Mail, Web, Power, Sleep, Suspend, and so on, you should select your keyboard model.
If you write in two different languages on your keyboard, it may be helpful to be able to switch between them. Click the Add button, and select the second language from the list. To switch from one language to another, you can add the Keyboard Indicator applet in a panel and toggle from one language to another by clicking the applet.
The Keyboard Layout Options dialog box, accessed by clicking the Options button, lets you select from a multitude of handy tweaks that affect how the keyboard works. For example, you can configure the Caps Lock key to act like a simple Shift key, or you can turn it off altogether. You can configure the Windows key so that it performs a different function too. Put a check alongside the options you want after reading through the extensive list.
As with the mouse, there are also accessibility options for keyboard users to help people with physical disabilities. On the Accessibility tab, you can configure the following settings:
Caution Do not check the box labeled “Accessibility features can be toggled with keyboard shortcuts” unless you are sure you need it. Once enabled, if you happen to hold down the Shift key for eight seconds, or tap the Shift key five times, a dialog window will appear asking whether you want to enable the Sticky or Slow Keys features. This can be a source of confusion!
At the bottom of the dialog box is a text box for typing to test the settings you've just configured. You can also enable sound notifications by clicking the Notifications button. These notifications will let you know when the keyboard accessibility features have been enabled or disabled. You can set sound alerts for accessibility in general, sticky keys, slow keys, and bounce keys.
The mouse keys feature lets you use your numeric keypad to control the mouse pointer. By selecting the “Pointer can be controlled using the keypad” check box and pressing the Num Lock key, you can move the mouse pointer by typing from the numeric keypad.
With mouse keys enabled, the 5 key both simulates a mouse click and acts as the center of a directional wheel surrounding it. The 1, 2, 3, 4, 6, 7, 8, and 9 keys simulate mouse direction. Some numeric keypads have arrows on them to indicate this.
You can move the Acceleration slider to adjust the time it takes while pressing the mouse keys for the mouse movement to reach full speed.
The Speed slider sets the distance offset of the mouse pointer when you press a mouse key. By moving the Speed slider left, the mouse pointer covers a smaller distance when you press a mouse key, giving you the illusion that the mouse movement is slower. By moving the Speed slider right, the mouse pointer covers a larger distance when you press a mouse key, giving you the illusion that the mouse movement is faster.
The Delay slider determines the amount of time to press the mouse keys before the mouse pointer starts to move. You can set the delay by moving the Delay slider to the left for a quicker response time and to the right for a longer delay.
The Typing Break tab features a function that can force you to stop typing after a predetermined number of minutes, to give your fingers and wrists a rest. It does this by blanking the screen and displaying a “Take a break!” message. Note that a notification area icon will appear before the break time to give you advanced warning of the lockout.
Ubuntu lets you define your own keyboard shortcuts for just about any action on the system. To create a shortcut, from the Panel, open Applications and type keyboard. This shows a few icons, including the Keyboard Shortcuts icon. Click it andin the dialog box, search through the list for the action you want to create a shortcut for, click it, and then press the key combination you want to use. For example, you might locate the Volume Up and Volume Down entries in the list, click each, and press Ctrl+left arrow and Ctrl+right arrow. Then you will be able to turn the volume of your sound card up or down by holding down Ctrl and tapping the left or right arrow key, respectively.
Caution Be careful not to assign a shortcut to a popular key. It might be nice to make Totem media player appear when you hit the spacebar, for example, but that will mean that it will start up several times whenever you type a sentence in a word processor! Also be aware that some key combinations are used by applications. Within OpenOffice.org's Writer, for example, the Ctrl+left/right arrow key combination moves you from word to word in a paragraph. If you define those combinations as shortcuts, you will no longer have this functionality.
An example of a handy shortcut is to configure your Home
folder to appear whenever you press Ctrl+Home. This can be done by locating the Home Folder option under the Desktop heading.
Getting online is vital in our modern Internet age, and Ubuntu caters to all the standard ways of doing so. Linux was built from the ground up to be an online operating system and is of course based on UNIX, which pioneered the concept of networking computers together to share data back in the 1970s. However, none of this is to say that getting online with Ubuntu is difficult! In fact, it's easy.
Regardless of whether you use a mobile broadband connection, a standard wired Ethernet network device or a wireless network device, the same program, NetworkManager, is used to configure your network settings under Ubuntu. Support for many makes and models of equipment is built in, so in most cases, all you need to do is enter a few configuration details.
Note Linux runs about 60 percent of the computers that make the Internet work! If you use Google, Facebook, or Wikipedia, you're using Linux. As your Linux skills increase, you'll eventually get to a stage where you, too, can run your own Internet servers. It sounds difficult but can be quite easy.
NetworkManager lets users easily manage wireless (also known as wi-fi) and wired connections, as well as mobile broadband connections. An icon for this utility sits in the notification area at the top right of the Desktop and changes according to the type of connection currently active (up/down arrows for wired network, radio waves for wireless network, and so on). NetworkManager automatically detects any wireless networks that are in range, as well as if you're currently plugged in to a wired network. If you automatically connect to a network, a black notification box will appear on the top right of your screen for a few seconds and then fade away.
Clicking the NetworkManager icon in the upper right corner of the screen will show a list of networks detected. By selecting an entry in the list, you can then connect to the network, and you'll be prompted to configure WEP/WPA protection, if applicable.
Caution At times we have been prompted for the wrong kind of wireless protection—for example, we were asked for a 128-bit WEP key rather than a 64-bit key when trying to connect to a network. In other words, it pays to check that you're being prompted for the right thing, and to select the correct option if you're not. Failure to do so might result in frustration! If you are really stuck, make sure to read your wireless router documentation.
Following this, the NetworkManager icon will display the signal strength of the connection for as long as you're connected. By clicking it, you'll be able to see at a glance what network you're connected to and any others within range. If you want to switch networks, just click the NetworkManager icon and select a different network in the list. If it's a secure network, you'll be prompted for a password before you're granted access.
Tip By right-clicking the NetworkManager icon, you can opt to completely disable your network hardware if you wish. This is quite useful if you don't need a network and would like to conserve your laptop battery.
NetworkManager settings persist across reboots, provided the network that was last configured is in range. This means that NetworkManager is ideal for all kinds of wireless network users, from those who frequently switch between different networks (that is, mobile workers) to those who just use a single wireless network connection, such as that provided by a wireless network broadband router in a home/small office environment. NetworkManager will also let you switch to a wired (Ethernet) connection, if and when you attach one to your computer.
NetworkManager will automatically detect networks and the type of connection. If you want to manually supply details, such as the IP address and gateway, or the name of the wireless base station—which might be necessary if your base station doesn't broadcast its name or if you need to connect to a specialized setup—you can do so by editing the connection.
Every conventional desktop or laptop computer comes with an Ethernet port which is used to make a wired network connection to a router, hub, or switch.
Wireless networking as an alternative is extremely popular, particularly of course for portable devices such as laptops, but connecting via a cable offers advantages in speed, reliability and security. For these reasons wired Ethernet connections are still the standard in office environments. Even at home, if you have a desktop computer located close to your router, you may as well connect them using the Ethernet cable that came with your router.
In most cases, NetworkManager will sense a wired Ethernet connection and automatically connect using the Dynamic Host Control Protocol (DHCP). This means that your computer receives its IP address, gateway, subnet mask, and Domain Name System (DNS) addresses automatically. All routers manufactured today are set up to automatically use DHCP out of the box.
Tip If a DHCP server is not available, Ubuntu will attempt to set up a network automatically using the Zeroconf (or Zero Configuration Networking) system, just like Microsoft Windows systems. (Microsoft refers to this as Automatic Private IP Addressing, but it's also known as link-local.) In other words, if a bunch of computers plug into a hub or router on an ad hoc basis, without being configured and without a DHCP server operating, they will be able to network with each other. To make this work, each computer randomly assigns itself a unique IP address that starts with 169.254
with a subnet mask of 255.255.0.0
.
If you need to manually specify network details such as IP and router addresses, perhaps because you work in an office environment with nonstandard systems, start by speaking to your system administrator or technical support person to determine the settings you need. Ask the administrator for your IP address, DNS server addresses (there are usually two or three of these), your subnet mask, and the router address (sometimes called the gateway address). The settings you will get from your system administrator will usually be in the form of a series of four numbers separated by dots, something like 192.168.0.233
. After you have this information, follow these steps:
Tip If you're using a static IP address with a router, such as that provided by a DSL modem, the DNS address is often the same as the router/gateway address.
Your network connection should now work. If you now have more than one wired network connection set up, you can switch between them by clicking on the NetworkManager icon and selecting the appropriately named connection under Wired Networks. If your newly set up connection isn't working, try rebooting. However, if your system administrator mentioned that a proxy must also be configured, you'll need to follow the instructions in the “Working with a Proxy Server” section later in this chapter.
A wireless (wi-fi) network is, as its name suggests, a network that does away with cabling and uses radio frequencies to communicate. It's more common for notebooks and handheld computers to use wireless connections, but some desktop computers also do. Indeed, it's increasingly the case that many workplaces are switching to wireless networking, eschewing old-fashioned, cable-based networking.
Note Slowly but surely, wi-fi is replacing wired Ethernet networks. However, sometimes wi-fi networks are impractical or simply undesirable. For example, the metal infrastructure in some buildings means the signal becomes unreliable. Wi-fi is also considered too insecure for some companies, as the wi-fi signal often spreads to the street outside the building. Although such transmissions are nearly always secured and WPA2 is considered secure, wi-fi security implementations have been broken. Ethernet might be considered old technology, but trying to steal data from physical cables is an order of magnitude more difficult, to the point of being practically impossible.
Notebooks and PDAs typically use built-in wireless network devices, with an invisible antenna built into the case. However, some older notebooks might use PCMCIA cards, which have an external square antenna, and some desktop computers might use PCI-based wireless cards or USB dongles, which have external rubber/plastic antennas, in the style of old cell phones.
Ubuntu includes support for most wireless network devices. However, it's possible to use Windows wireless network device drivers for unsupported hardware. In the past this was necessary rather often, nowadays you'll find that your wireless network card is supported in most cases. In rare cases, Ubuntu appears to support a wireless network device, in that it identifies it and lets you configure it, but you might find that it simply doesn't work (or works very badly, perhaps with an intermittent connection). In this situation, you can also try installing Windows drivers. See the “Installing Windows Wireless Network Device Drivers” section later in this chapter for details.
Note Ubuntu is rare in the Linux world in that it uses some proprietary (closed source) wireless device drivers by default. Ubuntu is, after all, an open source OS and is committed to the goals of free and open source software. The use of proprietary drivers is considered a necessary evil because not all devices have open source drivers right now, and not all open source drivers support all the functions you might be used to (typically, they might not support the WPA functionality of your wi-fi device, for example). The use of proprietary drivers is regarded as a stopgap measure, and it's hoped that manufacturers will realize that it is in their interests to support open source driver development, making proprietary drivers redundant.
Connecting to a wireless network device is easy with NetworkManager. Just click the NetworkManager icon, and you will see the available wi-fi networks in the Wireless Network list. Networks protected with WEP/WPA have a padlock in the wireless icon to the right of the name, as shown in Figure 7-5. Those that are “open” don't have this padlock.
You might see many wi-fi networks listed, depending on your location. The wireless base stations are identified by their Service Set Identifier (SSID) or sometimes ESSID, with E standing for Extended.
If the SSID you would like to connect to is not listed by NetworkManager, it could mean that your wireless base station isn't set to broadcast its SSID or, worse, Ubuntu's wi-fi drivers aren't functioning correctly. If it's the former, all you need to do is right-click the NetworkManager icon and select Connect to Other Wireless Network. Then, in the new dialog box, type the SSID under Network Name, set Wireless Security to None or the appropriate security type, fill in the other information depending on the type of wireless security you selected, and click Connect. If it's the latter, you may need to use a Windows driver, as described in the next section.
Tip If you are not offered any wireless networks at all, ensure that the wireless hardware is switched on. Some notebooks have a keyboard combination to turn it off to save battery power. Others have a little switch located on one of the edges of the notebook. Left-click the NetworkManager icon and ensure that Enable Networking and Enable Wireless are both selected.
To connect to a wi-fi network, select the wireless base station you want to connect to in the list. If it isn't protected by WEP/WPA, you will be connected to it automatically.
If the wi-fi network you wish to connect to is protected with WEP or WPA, a dialog box will appear, prompting you for the password/passphrase, as shown in Figure 7-6. In the Wireless Security field, make sure the correct type of security for the wireless network is selected—it's usually right, but don't assume it's automatically correct! By default, the password/passphrase is obfuscated by circle characters so that anyone looking over your shoulder can't see what you're typing. If it helps (and if your shoulder is clear), check the Show Password box. This can be really handy when you're typing a particularly long passphrase.
Note WEP keys come in either hexadecimal (hex) or plain text (passphrase) varieties. Hex keys look similar to this in their 128-bit form: CB4C4189B1861E19BC9A9BDA59
. In their 64-bit form, they will be shorter and may look similar to 4D9ED51E23
. A passphrase will take the form of a single short sentence. In home and office environments, WPA networks are usually protected with passphrases. In larger corporate or academic environments, you might find that the network is protected with a WPA certificate.
When you're finished, click the Connect button. You should see the NetworkManager icon start to animate as the program attempts to connect and find an IP address. After a few seconds, when the animation finishes and the icon switches to display signal strength, you should find yourself online.
If your computer doesn't seem to connect, try rebooting. If the hardware doesn't work after this, it might be that the drivers Ubuntu installed by default are incompatible with your network device. In this case, you can try using a Windows wireless network device driver, as described in the next section.
Should you find yourself in the unusual situation of needing to specify the IP address, subnet mask, and gateway for a wireless connection, you can do so using the manual configuration mode of NetworkManager, as outlined in the “Configuring an Ethernet Network Device” section earlier in this chapter. Simply follow the instructions in that section, but select the Wireless Connection entry in the list rather than Wired Connection. In the dialog box that appears, you'll see additional areas for entering your SSID and WEP/WPA protection details.
WEP VS. WPA
NdisWrapper is effectively an open source driver (technically described as a kernel module) that allows Linux to use standard Windows drivers for wireless network devices. You might describe NdisWrapper as being a translation layer between the Linux kernel and the Windows drivers, which can be installed by using NdisWrapper's configuration tools.
You should use NdisWrapper in only one of two situations:
Using NdisWrapper is relatively simple, and just a handful of commands are required. However, getting hold of the necessary Windows driver files is harder work because, unfortunately, NdisWrapper isn't designed to work with the usual method of driver distribution: .exe
files. Instead, NdisWrapper needs the specific .inf
and .sys
files that constitute the driver—effectively, the Windows system files. These are contained within the .exe
file and must be manually extracted.
Note Sometimes drivers are distributed as .zip
files, in which case the relevant files are easy to get at. Keep your fingers crossed that this will be the case for your particular hardware!
NdisWrapper is far from perfect. Not all wireless devices have been proven to work with it, and it's not necessarily the case that a driver available for Windows will work under Linux. Sometimes trial and error is required. Annoyingly, Windows drivers sometimes appear to work but then prove unreliable. Some might stop working. Some might even crash your system. The best plan is simply to give it a try.
Tip NdisWrapper gets better and better with every new release. This is why it's a good idea to update your system on a regular basis.
In the instructions in this section, we explain how to make an Atheros AR5008 wireless network device that's built into an Apple MacBook work under Ubuntu using NdisWrapper. The instructions remain essentially the same for all types of wireless network hardware. However, some specific details, such as download addresses, will obviously differ.
First, you'll need to install the NdisWrapper software and then you can install the necessary Windows drivers. These steps will make your wireless network device available under Ubuntu. Then you can follow the instructions in the previous section to connect to that wireless network.
NdisWrapper consists of two components: a kernel module and configuration tools. The kernel module comes as part of the default kernel package, so is installed by default, but you will need to install the configuration tools manually.
To do so, ensure you are online using a wired connection to your router have an active wired network connection, following the previous “Configuring an Ethernet Network Device” section. Then start up the Ubuntu Software Center, which you'll find under Applications. Do a search for windows wireless and install the Windows Wireless Drivers package which will come up in the search results. You will need to enter your password when prompted. Installing this package automatically installs not only the graphical Windows wireless driver installation tool, but also the underlying packages ndiswrapper-utils
and ndiswrapper-common
.
After the NdisWrapper configuration software is installed, you can install the Windows wireless network device drivers. There are several parts to the procedure:
.sys
and .inf
files from the driver archive (and possibly .bin
files, although this is rare).These steps are covered in the following sections. You will need another computer that's already online to download some files and check the NdisWrapper web site for information. If your computer dual-boots, you can use your Windows setup to do this, or if you have an Ethernet port on your computer, you could plug into a wired network.
To identify the wireless network hardware for use with NdisWrapper, you need two pieces of information: the make and model of the hardware and the PCI ID number. The former is the make and model of the hardware as identified by Ubuntu as a result of system probing, rather than what's quoted on the packaging for the wireless network device or in its documentation. These details discovered by Ubuntu will usually relate to the manufacturer of the underlying components, rather than the company that assembled and marketed the computer. The PCI ID is two four-digit hexadecimal numbers used by your computer to identify the device internally (such as 168c:001a)
. The same PCI ID numbering system is used by both Windows and Ubuntu, which is why it's so useful in this instance.
You can find both the PCI ID and the make/model information by using the Device Manager tool. Follow the instructions in the “Installing Device Manager” section earlier in this chapter if you haven't already installed this program. Then follow these steps:
info.udi
. Look at the end of the line and make a note of the two sets of characters that are separated by an underscore and preceded by pci_
. Look at Figure 7-7 for an example taken from our test machine. Yours may differ, but the line should always end with pci_
and then the digits. If it doesn't, you have selected the wrong entry in the list of devices on the left. Try examining a different entry, such as the parent of the entry in the list.pci_
at the end of the info.udi
line. Written alongside each other, the two sets of digits that are separated by an underscore form the all-important PCI ID number. In written form, they're usually separated by a colon. If either of the sets of letters or numbers is fewer than four characters long, simply add zeros before them in order to make four characters. In our test machine, the end of the info.udi
line reads 168c_1a
. We add two zeros before 1c
, making a complete PCI ID of 168c:001a
. On another PC, the end of the line reads 168c_13
. Adding two zeros before 13
gives a PCI ID of 168c:0013
.http://sourceforge.net/apps/mediawiki/ndiswrapper/index.php
. Under the Documentation heading, click the “List of known working devices” link. This is a community-generated listing of the wireless network devices that have been proven to work with NdisWrapper.
Figure 7-7. Find the PCI ID of your wireless network hardware by looking at the end of the info.udi
line.
Tip The URL in step 5 was correct as this book went to press. If you find it no longer accurate, search Google, using NdisWrapper list as a search term.
Caution Watch out for any mention of x86_64
in the description of the driver file. This indicates that the entry in the list relates to 64-bit Linux. The version of Ubuntu supplied with this book is 32-bit. If you encounter an entry relating to x86_64
, keep searching.
After downloading the drivers, you'll need to extract the .sys
and .inf
files relevant to your wireless network hardware. These are all that NdisWrapper needs, and the rest of the driver files can be discarded. However, extracting the files can be hard to do, because often they're contained within an .exe
file. (Most driver .exe
files are actually self-extracting archive files.) Additionally, the driver file might contain drivers for several different models of hardware, and it's necessary to identify the particular driver .inf
file relevant to your wireless network device.
If the driver you've downloaded is a .zip
file, your task will probably be much easier. Simply double-click the downloaded .zip
file to look within it for the directory containing the actual driver files.
If the driver is an .exe
file, it's necessary to extract the files within it. With any luck, you might be able to do this by using an archive tool like WinZip (www.winzip.com
), assuming that you've downloaded the file using Windows. Simply open the archive by using the File Open menu option within WinZip. You may have to select All Files from the File Type drop-down list in order for the .exe
file to show up in the file list. However, if you're using Windows, we recommend an open source and free-of-charge program called Universal Extractor, which can be downloaded from www.legroom.net/software/uniextract
. This program can extract files from virtually every kind of archive, including most driver installation files. After it is installed, simply right-click the installation .exe
file, and select UniExtract to Subdir. This will then create a new folder in the same directory as the downloaded file, containing the contents of the installer file.
After you've extracted the files within your downloaded driver file, look for the files you need. The driver files will likely be contained in a folder called something like Driver
or named after the operating system, like Win_XP
. After you've found the relevant directory, look for .inf
, .sys
, and .bin
files (although you may not find any .bin
files; they're used in only a handful of drivers). You can ignore any other files, such as .cab
and .cat
files. Click and drag the .inf
, .sys
, and .bin
files to a separate folder.
The task now is to find the .inf
file for your hardware. If there's more than one, you'll need to search each until you find the one you need. You need to look for text that corresponds to the PCI ID you noted earlier. Open the first .inf
file in a text editor (double-clicking will do this in Windows) and, using the search tool, search for the first part of the PCI ID, as discovered earlier. For the example in Figure 7-7, we would search for 168c
. If you don't find it within the file, move on to the next .inf
file and search again. When you get a search match, it will probably be in a long line of text and to the right of the text VEN_
. Then look farther along that line to see if the second part of the PCI ID is mentioned, probably to the right of the text that reads DEV_
. In the case of the driver file we downloaded for the example, the entire line within the .inf
file read as follows (the two component PCI ID parts are shown in bold):
%ATHER.DeviceDesc.001B% = ATHER_DEV_001B.ndi, PCIVEN_168C&DEV_001A
If you find both component parts of the PCI ID in the line, as in this example, then you've found the .inf
file you need. (In fact, you'll probably find many lines matching what you need, which is fine.)
You must now transfer the .inf
file, along with the .sys
and .bin
files (if any .bin
files were included with the driver), to the computer on which you want to install the drivers. This can be done by putting them onto a floppy disk, CD, or USB memory stick. Create a new directory called driver
on the Desktop and save them there.
Your procedure from this point depends on whether Ubuntu recognized your wireless networking device when you first booted but was unable to make it work correctly. If it did, you will need to blacklist the built-in driver so that NdisWrapper can associate with the hardware. If the device wasn't recognized, you can skip straight to the “Using NdisWrapper to Install the Drivers” section.
To blacklist the existing built-in driver that didn't work with your wireless device, you need to find out the name of the kernel module and then add it to the /etc/modprobe.d/blacklist
file. Here are the steps:
info.linux.driver
. Then look in the Value column and make a note of what's there. For example, on one of our test notebooks, the Value column read ath5k
. Close Device Manager.blacklist
configuration file in the Gedit text editor:
gksu gedit /etc/modprobe.d/blacklist.conf
blacklist modulename
modulename
with the name of the module you discovered earlier. For example, on our test system, we typed the following (as shown in Figure 7-8):blacklist ath5k
You should now find that the wireless network device is no longer visible when you click the NetworkManager icon, and all you see is a Manual Configuration option. This is good, because it means the hardware no longer has a driver attached, and you can now tell NdisWrapper to use the hardware.
On the Ubuntu computer on which you want to install the drivers, you should now have the .inf
file from the previous steps, plus the .sys
and possibly .bin
files that constitute the driver. You should have copied these files from the removable storage device into a new folder on your Desktop named driver
.
Note If you've used a USB memory stick to transfer the files, its icon should appear automatically on the Desktop as soon as it's inserted. When you've finished with it, right-click it and select Unmount. You must do this before physically removing any kind of USB memory device, as explained later in this chapter.
To install the driver by using NdisWrapper, follow these instructions:
.inf
file for your wireless device. Click the Location drop-down list to open a file-browsing dialog box..inf
file you copied to your system, which you have placed in the driver
folder on your Desktop. Double-click the Desktop folder and then double- click the driver
folder listed in the right column. Select the .inf
file you copied in the driver
folder and then click the Open button..inf
file, or might be using the wrong driver file. Return to the previous sections and try to get an alternative Windows driver.Following this, you should find that the network device is available for configuration. Follow the earlier instructions for connecting to a wireless network.
As mentioned earlier, although NdisWrapper can solve a lot of headaches with nonworking wireless hardware, it isn't perfect. You might find that the Windows driver you install simply doesn't work. In such a case, you can download a different version of the driver and try again. But first you'll need to remove the existing driver.
From the Applications menu in the panel, selectWindows Wireless Drivers and enter your password when prompted. In the Windows Network Drivers dialog box, select the driver you want to remove in the left column and click Remove Driver. Click Yes when prompted to confirm the removal. Click Close to exit the tool.
SECURE CONNECTIONS ON THE NET
Many countries now have widespread 3G cellular networks capable of delivering data at broadband speeds to mobile devices. Smartphones now come with 3G capability by default, with 3G USB adapters (“dongles”) to plug into your notebook now commonplace on pay-as-you-go or contract arrangements. Higher-end notebooks and Netbooks now come with mobile broadband adapters built as standard.
Ubuntu offers excellent support for mobile broadband devices, whether you want to connect via a 3G USB adapter plugged into your notebook, an inbuilt 3G adapter, or your 3G-enabled cellphone connected (“tethered”) via USB cable.
You can set up your mobile broadband device as follows:
If you're within a 3G coverage area, your mobile broadband device should now make a connection, and all necessary settings such as IP address, gateway, and domain name servers should be automatically configured.
Some networks in offices, schools, and universities require that you use a web proxy (often referred to as an HTTP proxy). A proxy is a server computer that provides additional security by providing a single portal to all web pages. It also helps speed up Internet access by storing frequently accessed pages. This means that if ten people request the same web page, there's no need to get the same ten pieces of data from the Internet. The proxy computer can send them its own copies.
You'll need to speak to your system administrator to see whether your location uses a proxy. If it does, your administrator will most likely give you an address, which may take the form of a web address (a URL) or an IP address. When you have this information, follow these steps to configure the proxy:
If you have a laptop that is used in various locations, you can set up a series of proxy configurations that can then be selected whenever you move around. To create a new one, select New Location from the Location drop-down at the top of the window, input a name, and then set the appropriate values. After it is saved, each configuration remains available under the Location drop-down.
Tip Some ISPs run proxy servers too. However, unlike proxies in offices, it's typically up to you whether you choose to use them. You might find that using a proxy speeds up your connection, especially when you access popular sites, so it's worth trying out. To find out whether your ISP offers a proxy, visit its technical support web pages or phone its technical support line.
Ubuntu supports a wide variety of printer models— everything from laser printers to color ink-jet models, and even some of the very old dot-matrix printers.
If you work in an office environment, you might be expected to access a shared printer. Sharing a printer is usually achieved by connecting the device directly to the network. The printer itself typically has special built-in hardware to allow this to happen. Alternatively, the printer might be plugged into a Windows computer, such as a Windows server (or even simply someone's desktop PC), shared so that other users can access it—a setup known as Windows printer sharing. Ubuntu will work with network printers of both types.
Caution The vast majority of printers are now supported by Linux and work brilliantly. However, several manufacturers are still reluctant to release information about how their printers work, making Linux support difficult or impossible. If you're in the market for a new printer, and you want it to work with your Ubuntu system, be sure to check the OpenPrinting printer listings at www.openprinting.org/printers
so as to avoid buying an expensive paperweight.
A local printer is one that's directly connected to your computer, typically via USB. Any printer you attach to your computer will be configured by Ubuntu automatically and ready to use immediately, as shown in Figure 7-12. In case your printer needs a proprietary driver, you will be prompted to supply your password and then Ubuntu will guide you to download and install the driver.
However, if the printer malfunctions when printing, such as churning out paper when a print job is sent to it, printing garbage, or not working at all, you can attempt to configure it yourself. To set up a local printer, follow these instructions:
Tip You can find PPD files on the CD that came with your printer or download them. OpenPrinting (www.openprinting.org
) and Adobe (www.adobe.com/products/printerdrivers/winppd.html
) offer many printer drivers for download.
Tip Sharing your printer on the network so that other computers can use it is simple: open the Printer configuration window (from the Panel click Applications and in the search bar type Printing), select Settings from the Server menu, and put a check in the Publish Shared Printers Connected to This System box. Then click the OK button.
After installation has finished, the printer will then appear in the Printer Configuration window. To see whether it's working correctly, double-click to see the printer properties, as seen in Figure 7-13, and then click the Print Test Page button at the base of the window.
If the printer is installed correctly, you should find yourself with a test page showing color gradations.
If the printer hasn't been installed correctly, it either won't work at all or will start spewing out page after page of junk text. If this is the case, click Cancel Tests (where the Print Test Page button used to be) and then turn off the printer. Delete the printer driver by selecting the printer in the list on the left and clicking the Delete button at the top of the Printer configuration window. Then repeat the installation steps, this time trying different settings or a different driver.
A network printer is one that is not directly connected to your computer. Instead, it connects to the network via an Ethernet cable, or sometimes via a wi-fi adapter. In this way, all computers in the office will be able to use it. It's also possible to share a printer that's attached to your computer to other computers on the network. The sharing is typically done using the Windows networking protocol (SMB). In this case, follow the instructions in the next section.
Some printers have the required server hardware built in, but others might use a special print server module that attaches to the printer's USB or parallel printer port. Ubuntu can work with both types of hardware.
Ubuntu is compatible with UNIX (LPD), HP JetDirect, and Internet Printing Protocol (IPP) server types. These are the most ubiquitous types currently in use for stand-alone printer servers.
Before beginning, you'll need to find out the printer's network (IP) address and, if relevant, the queue name or the port number. You should be able to find out these details by speaking to your network administrator or the person who configured the printer. If it's up to you to configure the network printer, consult its manual to find out how to set a static IP address.
Follow these steps to configure a network printer:
If the printer doesn't work, it's likely that you set the wrong server type. Try an alternative type; if you chose IPP the first time, try App Socket/HP JetDirect the second time. Many print servers can emulate a variety of modes, so trying a different setting may work.
If the printer starts spewing out page after page of text, you likely selected an incorrect printer driver. Cancel the job at the printer by clicking Cancel Tests. Next, select the printer in the list on the left and click the Delete button at the top of the window to remove the printer. Then repeat the installation steps, this time trying an alternative driver.
A Windows (or SMB) printer is one that's directly connected to a computer and then made available across the network via the network sharing function of the OS. Effectively, the computer acts as the printer server. Often, in corporate environments, such printers are attached to server computers, but an individual may share the printer attached to a workstation.
In a home situation, a Windows/SMB share is an excellent and inexpensive way of sharing a printer among many computers, but you shouldn't use it if your printer can connect to the network directly. The printer is attached to one PC, and, as long as that computer is switched on, the printer will be available to the other computers in the household. This also is the biggest disadvantage: if you shut down the computer, the printer is no longer available.
Assuming that the printer has been correctly set up to be shared on the host computer, connecting to a Windows/SMB printer share is easy. In fact, you may find that Ubuntu finds the printer in the background and sets it up automatically! If you find the printer is available when you choose to print from an application, try it out and see if it works.
However, more likely, you'll need to add it manually. Follow these steps to set up a Windows/SMB shared printer:
smb://
field manually, as shown in Figure 7-14. This entry will probably take the form of the address followed by the printer name (for example, officepc/epson
). Speak to your system administrator or the individual in charge of the shared printer to find out what these are.Guest
for the username and leaving the Password field blank. After the details have been filled in, click Forward.If the printer makes a noise as if to start printing but then decides not to, you might need to change a setting on the Windows machine. On Windows, click Start Printers and Faxes and then right-click the shared printer's icon. Select Properties and click the Ports tab in the Properties window. Remove the check in the Enable Bidirectional Support box and then click OK. Then restart both the Windows and Ubuntu computers.
If the printer starts spewing out page after page of text instead of the test page, it's likely that you selected the wrong printer driver. Cancel the job at the printer by clicking Cancel Tests. Next, select the printer in the list and click the Delete button at the top of the Printer configuration window to remove the printer. Then repeat the installation steps, this time using an alternative driver.
Like Windows, Ubuntu uses the concepts of print queues to handle printing. When you print from an application, the print job is held in the print queue. If the queue is empty, the job is printed immediately. If there are already jobs waiting to be printed, or if a print job is already in progress, the new job is added to the queue.
Tip If you have more than one printer installed (maybe you have a printer attached to your PC but also print to a network printer), you can set one as a default, which will automatically be chosen whenever you choose to print. In the printing application, your current default printer is indicated by a tick in a green circle. If you'd like to make another printer your default, right-click its icon and select Set As Default.
When you print a document, the Document Print Status icon appears in the notification area (it looks like a printer). Single-click the icon to view the jobs waiting to be printed, if any. Right-clicking a job displays a context menu that lets you cancel, delete, hold, and release the job, and even move it to a different printer.
When you print from applications, Ubuntu will display a unified printer interface, as you might be used to in Windows. You will find similarities when you print in Gedit, GIMP, and Firefox. The only exception is LibreOffice, which offers its own simplified print dialog box.
Most applications that use the unified print dialog box will provide additional unique options related to that particular application. For example, the F-Spot photo manager offers settings useful for photographs, such as laying up multiple images on a single page, whereas Gedit offers functions related to basic text printing.
Ensure that you select your printer in the list on the left of the print dialog box (on the General tab) in order to see all the available options.
Removable storage is the term applied to peripherals that you might attach to your computer and that contain their own storage. Examples include USB memory sticks, external hard drives, MP3 players, digital cameras, and photographic memory card readers. You might also find that devices such as mobile phones are treated as removable storage devices when you attach them directly to your computer.
When you attach any removable storage device, Ubuntu does the following:
The contents of the removable storage device will be accessible in exactly the same way as any other files on your system. You should be able to copy, delete, and create files on the device, provided the device isn't read-only (if the read-only switch isn't set on a USB memory stick, for example). If the device contains MP3 tunes, you should be able to double-click them to play them, provided the playback codecs are installed (see Chapter 14).
However, a very important rule must be followed when you've finished with removable storage devices under Ubuntu (or indeed any operating system): the device must be safely removed (or in technical terms unmounted) before you physically remove it. This applies also to memory cards that are inserted into a card reader—before removing any card from the card reader, it must be safely removed.
Safely removing is quite simple to do. Just right-click the icon on the Desktop or within the Computer window and select Safely Remove Drive, as shown in Figure 7-15. Make sure you save and close any files that you may have been working on before you do so, or you may see an error. You'll need to close any File Browser windows that might have been browsing the storage device too.
Following this, you can safely physically remove the card or unattach the device. Reinserting it will make it available once again.
Caution Be very careful not to remove a memory card from a card reader while you're writing to or reading from it on your PC. This will most likely damage the card irreparably. At the very least, it will wipe the contents of the card.
Scanners may seem like archaic machines that have been superseded by digital cameras or absorbed into multifunction devices, but they're still the best method of transcoding nondigital images and textual documents into a digital format.
A lot of flatbed scanners can be made to work under Ubuntu, but not all types are supported. You can check the list of currently supported scanners by visiting www.sane-project.org
. Additional models are added to the list all the time, and this is another reason to make sure your system is completely up-to-date (see Chapter 8, which explains how to update your system software).
The best test of whether your scanner is supported under Ubuntu is simply to see whether it will work. Scanning within Ubuntu is handled by the Simple Scan utility. This is a stand-alone program that operates like the TWAIN drivers that you might have used under Windows.
To configure a scanner and scan images, follow these steps:
Simple Scan should be good enough for most purposes, but if you'd like a little more control over your scanning, with capabilities such as adjusting gamma, contrast and brightness, you might consider installing Xsane, which is available in the Ubuntu Software Center.
The modern trend is for operating systems to incorporate flashy graphical effects into ordinary Desktop functions. For example, when windows are minimized in Windows Vista, they physically shrink and fade down to the Taskbar. Under Mac OS X, program windows appear to be “poured” into the Dock when minimized. In Windows Vista and Windows 7, when you press Alt+Tab to switch through open programs, the program windows are previewed vertically in a graphical arrangement, and you can flick through them, rather like searching through a card index. These effects are achieved using the 3D processing power of the computer's graphics card, even though the effects aren't necessarily 3D in nature.
Note On a technical level, the technique is known as compositing. What you see on the screen is first drawn in the graphics card memory and then transferred to the screen, rather than everything simply being drawn directly onto the screen.
Ubuntu includes similar Desktop visual effects, courtesy of a system called Compiz (www.compiz.org
). However, all Desktop visual effect systems have a couple requirements, and these apply to Ubuntu as well:
Note For most graphics cards, the open source graphics drivers will now support 3D Desktop effects. You will probably only need to install the proprietary driver if you want high performance from intensive 3D applications such as Google Earth and first-person shooter games.
Some proprietary 3D graphics drivers are provided under Ubuntu, but only if open source equivalents are missing. It is hoped that open source drivers will one day replace the need for proprietary drivers.
So do you actually need to install new drivers? It all depends on how you experience your Linux environment. If you find that Desktop effects are working, the correct drivers are already installed. A good way to test this is to hold down Ctrl+Alt and then tap the left or right arrow key. This will switch to the next virtual Desktop. If the entire desktop physically slides out of the way, Desktop effects are activated. If the Desktop remains static, and a small dialog box appears in the center of the screen to let you choose a virtual Desktop, then Desktop effects are not activated. A utility called Additional Drivers lets you manage proprietary drivers for your graphics card. This utility should appear automatically in the notification area immediately after installation if your hardware requires proprietary drivers. After installing a proprietary driver, restart your computer to activate it.
Bluetooth is the short-range networking facility that allows various items of hardware to work with each other wirelessly. You can use Bluetooth for everything from file transfers between a mobile phone and computer to employing a wireless keyboard or mouse with your desktop computer.
For Bluetooth to work, both devices need to have Bluetooth support. Many mobile phones come with Bluetooth nowadays, as do an increasing number of notebook computers. It's also possible to buy very inexpensive Bluetooth USB adapters.
Bluetooth support is built into Ubuntu and should activate automatically if Bluetooth hardware is present on your PC. You will know if this is the case because a Bluetooth icon will appear in the notification area. This is used to administer all Bluetooth devices that you might want to connect to your computer.
When two pieces of Bluetooth-compatible hardware need to communicate on a regular basis, they can get together, a process also known as pairing or bonding. This means that they trust each other, so you don't need to authorize every attempt at communication between the devices. Indeed, some devices won't communicate unless they're paired in this way.
Pairing is simple in practice and works on the principle of a shared personal ID number (PIN). The first Bluetooth device generates the PIN and then asks the second Bluetooth device to confirm it. After the user has typed in the PIN, the devices are paired. Pairing is easily accomplished under Ubuntu and doesn't require any additional software.
As an example, the following are the steps for bonding a mobile phone to an Ubuntu PC. Bonding for devices without a user interface, such as keyboards, is handled differently, as explained in the “Using a Bluetooth Keyboard or Mouse” section a little later in the chapter.
Figure 7-17. A pairing request is easily accomplished through the Bluetooth applet.
If you subsequently want to remove the pairing, click the Bluetooth icon and select Preferences. In the list of Devices at the bottom of the dialog box, select the entry for your Bluetooth device and click the Delete button. Don't forget to remove the pairing on the Bluetooth device too.
If you own a Bluetooth-equipped camera phone, you might be used to transferring pictures to your computer using Bluetooth. It's by far the easiest way of getting pictures off the phone and avoids the need for USB cables or card readers. To transfer files via Bluetooth, you can use the Bluetooth applet.
Note Some phones refuse to transfer files unless the phone and computer are paired, so follow the instructions in the previous section first. Phones such as like the Nokia 6680 don't need pairing for file transfer, although each transfer must be confirmed manually.
The easiest way to get files to or from a device is to use Nautilus:
There are two ways to send files to another Bluetooth device from your Ubuntu PC. The first is to use the Bluetooth applet. The second is to right-click the file in question and select Send To. The second method is useful if you want to send many files at once, and you will have the option of automatically zipping the files into a single archive (but bear in mind that the Bluetooth device receiving the file will need to be able to subsequently unarchive the file).
Follow these steps to use the Bluetooth applet to send files:
To send one or more files using the Send To option on the context menu in the File Browser or on the Desktop, follow these steps:
.zip
archive and add the files to it automatically. Otherwise, each file will simply be sent one after the other. If you are sending a folder, the Send Packed option is already checked and cannot be unchecked.Your Bluetooth-equipped keyboard or mouse may work automatically under Ubuntu. However, if not, you may need to pair it to your PC, as follows:
If the keyboard or mouse does not work after a reboot, try turning it on and off again. If that doesn't work, deactivate the Bluetooth functionality on the PC, perhaps by momentarily unplugging the Bluetooth dongle or, on a notebook, using the relevant keyboard combination to turn off and on again the Bluetooth system.
Generally speaking, your sound card shouldn't require any additional configuration and should work immediately after you install Ubuntu. The icon for the volume control applet is located at the top right of the Ubuntu Desktop, and it offers a quick way to control the master volume.
However, if you want to change your balance or microphone level, or if your sound card offers more than stereo output, such as multiple-speaker surround sound, then it might be necessary to take some simple steps to allow full control of the hardware:
Depending on the degree to which your computer supports power-saving functionality, Ubuntu will let you configure your display to go into standby mode after a certain amount of time and will also allow you to configure your notebook to enter sleep (standby) mode. In addition, if you use a notebook computer, Ubuntu might let you configure additional aspects, such as the display brightness. These functions are controlled by using the Power Management Preferences. To start this, from the Panel select Applications and in the search bar type Power. Now click the Power Management icon. If Ubuntu is installed on a notebook computer, you'll see three tabs in the program window: OnAC Power, On Battery Power, and General. If Ubuntu is installed on a desktop computer, you'll see just the On AC Power and General tabs.
Note Not all PCs are created equal when it comes to power-saving features. Some support more functionality than others. In addition, Ubuntu is compatible with most but not all power-management systems, and it might not be able to support certain power-management functionality on your system, even if such functionality works under Windows.
Notebooks have the additional tab because it's possible to define two separate power management profiles: one for when the computer is plugged in and one for running on battery power. This makes sense, because you might never want your display to switch off when connected to an outlet, but it's advisable that it should deactivate within, say, 15 minutes of inactivity if the computer is running on battery power (to extend the life of the battery).
The three tabs of the Power Management applet are explained in the following sections.
If your computer is a desktop PC without a battery, you'll see two options under the On AC Power tab: Put Computer to Sleep When Inactive For and Put Display to Sleep When Inactive For. The dropdowns next to each of these options allow you to define one of a number of preset time limits before each feature kicks in, including the option of Never. There is also a check box which enables you to spin down the hard disks when possible, at the same time as the computer is put to sleep.
Note The sleep mode can be to either suspend to RAM (that is, standby) or hibernate. You can set this under the General tab.
If your computer is a notebook computer, you'll see some extra options. Depending on the technology used in your computer, you might see a Set Display Brightness To slider, which you can use to set the brightness of the screen when the power is connected. Whenever mains power is connected, the display brightness will be changed to match this setting.
You may see a When Laptop Lid Is Closed option, with a drop-down list. As it suggests, this will control what happens when the notebook is closed. Depending on the hardware contained in your computer, you might have the choice of doing nothing, blanking the screen, suspending the computer (shutting down all systems but RAM), hibernating (suspending RAM to disk and turning off the notebook), and shutting down the computer. However, not all computers support each of these modes, so the choices you see might vary.
Additionally, you may see a Dim Display When Idle check box, which you can select to conserve power by dimming the screen when your system is idle.
The options under the On Battery Power tab, present only on a notebook computer, are largely the same as those under the On Mains Power tab, as you can see in Figure 7-20. These settings come into operation the instant the mains power is disconnected from your notebook and the battery kicks in.
An extra option appears as the last item in the Actions section: When Battery Power Is Critically Low. Here you can opt to automatically suspend, hibernate, or shut down the notebook when the battery power is nearly gone.
The check boxes at the bottom of the Display section could help save battery power considerably. You may select the Reduce Backlight Brightness option, which as it suggests, sets backlight brightness to a lower setting when you run on battery power. As with On AC Power, the Dim Display When Idle option may also be available for battery power.
Caution Be aware that sleep mode requires a little battery power to work and will eventually drain your battery, especially if it's already on its last legs.
Under the General tab, you have options to customize button actions and notifications. These settings persist whether the computer is on mains or battery power.
In the Actions section, you can set what happens when the power button is pressed and the computer is active. Effectively, this controls whether pressing the button when Ubuntu is running should shut down the computer, suspend it, or hibernate it. You can select Ask Me, which will cause the standard Quit dialog box to appear (that is, the same dialog that appears if you click the Session Menu icon in the top-right corner of the screen). You can also customize the action for the suspend button. The available actions are to do nothing, suspend, or hibernate. Hibernate writes the contents of RAM to the hard disk and then shuts down the computer. Suspend shuts down most systems of the computer except for the RAM, which is kept active. Then, when you press a key or move the mouse, the computer wakes up almost instantly as the subsystems are reactivated.
Caution Hibernate doesn't work on all systems. The best plan is to test it by bringing up the Session Menu (top-right corner of the screen) and selecting Hibernate. Even if Hibernate appears to work, there are reports of it being unreliable. Some users report that their computer occasionally fails to wake up, causing a loss of data. Therefore, you should always save any open files before using the hibernate function or before leaving your computer unattended for any period in which hibernate mode might kick in automatically. Hibernate will definitely not work unless your swap partition is at least as large as your RAM.
The General tab also lets you select whether the power icon is visible in the notification area. If you're using a notebook, you can choose to display the icon only when the battery is nearly drained, when your battery is charging or discharging, or regardless of the battery state. Desktop PC users will probably opt not to display the power icon at all. The most fuss-free option is perhaps Only Display an Icon When Charging or Discharging, which is selected by default.
Finally, there's also an extra option you can select to play sounds when error events occur.
Tip The power icon in the notification area will give you an indication of the charge status of your battery if you're using a laptop. If you click it and select Laptop Battery Discharging, a Power Statistics window will be displayed, giving you masses of information about your mains adapter, battery, and processor.
POWER SAVING: IS IT WORTH IT?
In this chapter, you learned how to set up the common types of hardware you might have attached to your computer. Additionally, you looked at configuring various software components that are vital for Ubuntu's correct functioning.
You stepped through getting online with Ubuntu (including joining a wireless network), adding a printer, connecting to a digital camera, configuring a 3D graphics card, and much more.
In Chapter 8, we move on to look at how you can ensure that your system is secure and protected.
3.16.68.121