Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Beginning Ubuntu Linux - From Novice To Professional (2006)

.pdf
Скачиваний:
67
Добавлен:
17.08.2013
Размер:
25.54 Mб
Скачать

108

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

Figure 8-11. Once the printer is configured, it appears in the Printers 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, turn off the printer, and then double-click the printer icon. In the window that appears, right-click the printer job and select Cancel. You have either selected the wrong port or, more likely, installed incompatible printer drivers. Right-click the new printer’s icon and select Remove. Then repeat the installation steps, this time trying different settings.

Configuring a Network Printer

A network printer is one that is not directly connected to any computer. Instead, it connects to the network via an Ethernet cable. In this way, all computers in the office will be able to use it. If the printer is directly connected to a computer, it will very probably be shared via Windows/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.

Before beginning, you’ll need to find out the printer’s network 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.

Follow these steps to configure a network printer:

1.Click System Administration Printing. In the Printers window, double-click the New Printer icon.

2.In the Add a Printer dialog box, click Network Printer.

3.In the drop-down list, select the type of printer server. If you’re unsure of which to choose, try CUPS Printer (IPP). If you wish to connect to a Hewlett Packard printer, select HP JetDirect.

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

109

4.Enter the network address of the printer. In the case of HP JetDirect, the default port number should be okay, unless you have been specifically told to enter a different number. Depending on which server option you chose, you may also need to enter the queue name.

5.Choose the printer make and model (see step 3 in the previous section for guidance). Then click Finish.

6.When the printer is installed, right-click its icon in the Printers window, select Properties, and then click Print a Test Page.

If the printer doesn’t work, it’s likely that you set the wrong server type. Try an alternative type; if you chose CUPS the first time, try 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, it’s likely that you selected an incorrect printer driver. Cancel the job at the printer. Then double-click the printer icon, right-click the job, and select Cancel. Then right-click the printer, select Remove, and repeat the installation steps, this time trying an alternative driver.

Configuring a Windows/SMB Shared Printer

A Windows (or SMB) printer is one that’s directly connected to a computer, and then made available across the network. 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. 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.

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 most cases, Ubuntu will do the hard work for you.

Follow these steps to set up a Windows/SMB shared printer:

1.Click System Administration Printing. In the Printers window, double-click the New Printer icon.

2.In the Add a Printer dialog box, click Network Printer.

3.In the drop-down list, select Windows Printer (SMB), as shown in Figure 8-12.

4.Wait for a minute or two while Ubuntu probes the network to see if any shared printers are available. When Ubuntu discovers a printer, you might find an Authentication dialog box appears. Here, you should type the username and password (if applicable) for the shared printer. Ask the person who administers the computer that’s sharing the printer for this information. (When connecting to the shared printer attached to a Windows XP Home machine, I was able to click the Cancel button in the Authentication dialog box.)

110

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

Figure 8-12. Ubuntu should be able to automatically detect any Windows or SMB shared printers on your network.

5.In the Host drop-down list, select the computer to which the printer is attached. If there is more than one shared printer on the network, you may need to choose between several options, so make sure that you know the correct network name of the machine sharing the printer. The best way to do this is to speak to your system administrator or the person who set up the printer share.

6.Wait a few more seconds, and then, in the Printer drop-down list, select the shared printer. Once again this should be detected automatically.

Note If you find that the Host and Printer details aren’t automatically configured, you will need to enter them manually. Speak to the system administrator or the individual in charge of the shared printer to find out what these are.

7.In the Username and Password fields, type the username and password that might be required to access the shared printer, if they haven’t already been filled in automatically. (With the Windows XP Home host I used for testing, I found that I could type any username and leave the Password field blank.) To connect to a Windows XP Professional or Windows 2000 host, you will most likely need to enter both a username and password. These can be the login details of any user of the computer or, if the shared computer and printer are configured for Guest access, you can try typing Guest for the username and leaving the Password field blank.

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

111

8.Select the printer driver (see step 3 in the “Configuring a Local Printer” section for guidance). Then click Finish.

9.When the printer is installed, right-click its icon in the Printers window, select Properties, and then click Print a Test Page.

If the printer doesn’t work at all, the username and password details may be wrong. Alternatively, if you entered the printer network address manually, you might have entered it incorrectly. Try repeating the installation steps and using alternative settings.

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. Click Start Settings Printers and Faxes, and then right-click the shared printer’s icon. Select Properties, and then click the Ports tab in the window that appears. Remove the check on the Enable Bidirectional Support box and 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 an incorrect printer driver. Cancel the job at the printer. Then double-click the printer icon in Ubuntu, right-click the job, and select Cancel. Next, right-click the printer and select Remove. Then repeat the installation steps, this time trying an alternative driver.

Setting Up Digital Imaging Devices

One of the ironies of computers is that they’re ruthlessly logical yet allow people to pursue their creative hobbies. Photography is just one example. If you want to transfer your photos into your Ubuntu system, you can use one of the two usual ways: get them from your digital camera or scan them in using a scanner. We’ll look at both methods here, starting with digital cameras.

Transferring Photos from a Digital Camera

Digital cameras have been around for a while now and offer a genuine alternative to traditional film photography. They store pictures on computer memory cards rather than on film, meaning their images can quickly and easily be downloaded to a PC.

You can transfer your pictures from your digital camera to your computer via a direct cable connection into your USB or serial port, or by using a card reader. The latter requires buying an extra piece of hardware into which you insert the memory card from the camera so you can download images from it. Ubuntu supports both ways of transferring digital images.

Note Very nearly all card readers are supported by Ubuntu. If you find that your camera doesn’t work via a direct cable connection, consider buying a card reader.

Using a Card Reader

When you use a card reader, Ubuntu simply mounts the contents of the memory card into a folder on your hard drive. I’ll describe how mounting works in Chapter 14, but basically it makes a virtual folder on your hard disk, from which you can access the contents of the memory card. In most cases, you can read, delete, and even write new contents to the card in this way.

112

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

No extra software is necessary, and you can simply use Nautilus, the standard hard disk file browser under Ubuntu, to access the folder’s contents.

Note If there’s no card in the reader, it probably won’t be identified by Ubuntu when you plug it in. The reader will not be recognized until a card is present.

With a card reader, the setup procedure is simple: attach it to your PC, and then insert the memory card. Within seconds of doing so, you should see an icon for your card appear on the desktop. You’ll also find that all the card reader slots are accessible via the Places Computer menu, even if they don’t have any cards in them, as shown in Figure 8-13. This can prove handy if, for whatever reason, the desktop icon doesn’t appear.

Figure 8-13. Whenever you insert a memory card, it will be made available in the Computer file browser window, as well as an icon on the desktop.

Double-click the desktop icon to open the virtual folder containing the card contents, and you can then copy them to folders on your hard disk or otherwise manipulate the files.

A very important rule must be followed when accessing memory cards with Ubuntu: the card must be unmounted before you remove it from the card reader. This is quite simple to do.

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

113

Just right-click the desktop icon and select Unmount Volume. Make sure that you save and close any files that you may have been working on before you unmount the card.

Following this, you can safely remove the card. 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 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, so you’ll lose your photographs.

Using a Camera’s Cable Connection

Setting up a digital camera cable connection is usually easy. In most cases, you can simply plug it in to your USB port, turn it on, and Ubuntu will recognize it and make its contents available in a folder (in a virtually identical way to that described in the previous section for a card reader).

Ubuntu comes complete with the gThumb software, which includes support for the vast majority of older cameras (those a few years old that directly connect to your PC by its serial or USB port). Because of the way these cameras work, they are not usually automatically configured by Ubuntu, hence the need for a separate software package.

To configure your camera through gThumb, follow these steps:

1.Select Applications Graphics gThumb Image Viewer.

2.Click File Import. If you’ve already set up your camera in the program, skip to step 5.

3.The first time you use the program, you’ll need to set up your camera. To do so, click the camera icon at the top left. In the Camera Model dialog box, select your model from the drop-down list. This should fill in the Port field automatically, but it’s a good idea to check that this setting is correct. If your camera isn’t listed, select the nearest match. (For example, my Olympus C920 Zoom wasn’t listed, but the Olympus C900 Zoom choice proved to be compatible.) Click OK.

4.Close the Import Photos dialog box. Then open it again by clicking File Import. This time, your camera will be recognized, and thumbnails of the photos stored on the camera will be shown in the dialog box, as shown in Figure 8-14.

5.In the Import Photos dialog box, select the photos that you wish to import by clicking them (hold down the Ctrl key to select multiple photos). Then click the Import button. The pictures will transfer across to your PC. Bear in mind that this might take some time if you’re using a serial connection! It might appear as if the program is doing nothing, even though it is in fact working.

6.After importing has finished, you should find your pictures available in your /home directory. When gThumb imports the pictures, it creates a directory based on the date and time.

114

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

Figure 8-14. gThumb Image Viewer supports most of the older-generation cameras that connect directly to your computer.

Configuring a Scanner

Although scanners have fallen out of favor recently with the advent of digital photography, they’re vital for getting nondigital photos and old documents onto your PC.

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/ sane-mfgs.html. 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 9).

The best test of whether your scanner is supported under Ubuntu is simply to test if it will work. Scanning within Ubuntu is handled by the XSane utility. This is a stand-alone program that operates like the TWAIN drivers that you might have used under Windows, except it’s a lot more powerful.

Tip XSane is even capable of optical character recognition! Simply use the Synaptic Package Manager to download and install the gocr program. Then select the OCR button on the toolbar of XSane’s image preview window.

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

115

To configure a scanner, and also scan images, follow these steps:

1.Select Applications Graphics XSane Image Scanning Program. On startup, the program will attempt to detect your scanner. If it finds a compatible model, you will then see its findings in a splash screen, in which you can click the OK button. If the scanner hasn’t been detected, you’ll be told that, and XSane won’t start.

2.The main XSane program window is similar in appearance to the TWAIN scanner drivers you might have used under Windows, as shown in Figure 8-15. At the top of the window is the XSane mode drop-down list. Here, you can select from a variety of scanning modes, such as those to scan documents for faxing. However, in most cases, the Viewer setting is best. This lets you preview your scans and then save them to disk if you’re happy with them.

Figure 8-15. The XSane program works a little like TWAIN drivers under Windows and makes scanning easy.

3.Beneath this is the color/monochrome drop-down list. Here, you can select to scan Binary (line-art), Gray (grayscale), or Color.

4.Below this, you’ll find the drop-down list that sets the scanning type. You should select Full Color Range for scanning photographs or artwork, but you might also select slide (transparency) and negative scanning modes, if you have a compatible scanner.

116

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

5.Next is the dots per inch (DPI) setting. Generally speaking, 300 DPI is acceptable for scanned photos, while 150 DPI will be acceptable for artwork such as diagrams.

6.Beneath are the gamma, brightness, and contrast sliders, in that order. You can use these sliders to adjust the quality of the scan.

7.To scan a preview, click the Scan button.

8.When the scan is complete, the image viewer window will display the scan (note that XSane is clever enough to crop the picture and delete any space around it). Here, you can choose to manipulate the image by rotating it or applying cleaning filters (look under the Filters menu). Once you’re happy with the results, click the Save button on the preview window’s toolbar (the first button on the left).

9.If you wish, you can adjust the brightness/contrast settings and scan again. Just close the original preview and click the Scan button.

Using a USB Memory Stick

Although at one time the floppy disk drive ruled when it came to transferring small files between computers, nowadays, the USB memory stick has taken its place. These small devices, often incorporated into key rings, contain nonvolatile memory and retain their contents even when no power is applied.

The good news is that Ubuntu works with just about every make and model of memory stick. Simply insert the device, and then wait a few seconds while Ubuntu recognizes it. It will then make the contents of the stick available via a desktop icon. Alternatively, you can click Places Computer to access the device. The standard Nautilus file browser window is used to access the device, so you can copy, delete, and rename files as usual.

An important caveat is that when you’re finished with the device, you shouldn’t simply unplug it. Instead, you need to unmount it first. Make sure you’ve saved and closed any files on the memory stick. You might also need to close any Nautilus file browser windows that are browsing the stick. Then right-click its desktop icon and select Unmount Volume.

Installing 3D Graphics Card Drivers

Virtually all graphics cards are automatically supported and configured within Ubuntu, so you can stick with the default X.org drivers installed by Ubuntu. However, if you want to use their 3D functionality—usually to play 3D games or run 3D modeling software—then some extra steps may be necessary.

ATI and Nvidia 3D cards are well supported under Ubuntu, including the Radeon series and the GeForce series.

Adding 3D graphics support involves downloading and installing special driver software from the Ubuntu repositories via the Synaptic Package Manager. If you haven’t yet configured the Synaptic Package Manager, see the “Setting Up Online Software Repositories” section earlier in this chapter. The drivers are provided by the manufacturer of the graphics card and are closed source (sometimes referred to as binary only or proprietary).

C H A P T E R 8 G E T T I N G E V E R Y T H I N G U P A N D R U N N I N G

117

Note If you experience seemingly random system-wide crashes or freezing after installing a 3D graphics driver, consider reverting to your old setup by using the Synaptic Package Manager to simply remove the old driver. If you find your system won’t boot to the GUI after removing the drivers, type sudo dpkg-reconfigure xserver-xorg at the command prompt to reconfigure your graphics settings.

Installing an ATI Driver

To install support for ATI 3D cards, follow these steps:

1.Select System Administration Synaptic Package Manager.

2.Click the Search button and enter xorg-driver-fglrx as a search term. Find your card among those listed in the Description box. Click the box next to the entry in the results list and select Mark for Installation. Then click Apply.

3.When the Synaptic Package Manager has finished installing the driver, open a GNOME Terminal window (Applications Accessories Terminal) and type sudo fglrxconfig. This will configure your X.org configuration file to work with the ATI drivers. Note that you will need to answer some questions about your keyboard and mouse. In most cases, the default answers should work fine.

4.Once the configuration program has finished, reboot your system.

5.When the system is up and running, you will be able to further configure the card by opening a GNOME Terminal window and typing fireflcontrolpanel.

There are mixed reports about the effectiveness of the ATI drivers, and some people report they don’t work very well. If you find that the drivers crash X, or prevent you from running a GUI, try manually configuring the X server to use the new drivers by typing sudo dpkg-reconfigure xserver-xorg. When prompted to choose a driver for your graphics card, select fglrx from the list. Complete the X.org setup wizard, and then restart your computer.

If you find the drivers still don’t work, then it’s time to give up and restore the original settings: simply run sudo dpkg-reconfigure xserver-xorg and choose either the ATI driver or, if that doesn’t work, the Vesa driver.

Installing a Nvidia Driver

The Nvidia driver supports practically all Nvidia 3D cards produced in recent times—everything from the latest GeForce cards to the oldest TNT cards from the mid-1990s.

To install support for Nvidia cards, follow these steps:

1.Select System Administration Synaptic Package Manager.

2.Click the Search button and enter nvidia-glx as a search term. In the list of results, click the check box next to nvidia-glx and also nvidia-settings, so that both are marked for installation. Then click Apply.