Archive for August, 2007

120 CHAPTER 8 GETTING EVERYTHING UP (Abyss web server) AND

Friday, August 17th, 2007

120 CHAPTER 8 GETTING EVERYTHING UP AND RUNNING Transferring Files Between Bluetooth Devices 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. In order to transfer files via Bluetooth, you ll need to install some additional software from the Ubuntu repositories. If you haven t yet configured the Synaptic Package Manager, see the Setting Up Online Software Repositories section earlier in this chapter. Then open Synaptic Package Manager (from the System . Administration menu). Click the Search button and enter gnome-bluetooth as a search term. In the list of results, click the check box alongside the entry, and then click Mark for Installation. You should now find two new entries on the Applications . System Tools menu: Blue- tooth File Sharing and Bluetooth Manager. I found that Bluetooth Manager didn t work very well with my phone, so I will ignore it here. It s designed to allow you to manage Bluetooth connections, and you may like to explore its functions later. The following instructions detail how to transfer any kind of file to and from your PC using Bluetooth. Once again, I use a Nokia 6680 in the examples, but the instructions should work with any phone, or even any Bluetooth device capable of sending and receiving files. Note Some phones refuse to transfer files unless the phone and computer are paired, so follow the instructions in the previous section first. Phones like the Nokia 6680 don t need pairing for file transfer, although each transfer will need to be confirmed each time. Sending Files to a Ubuntu PC Follow these steps to send files from a Bluetooth device to your PC: 1. Select Applications . System Tools . Bluetooth File Sharing. Nothing will appear to have happened but, in fact, a new icon will have been added to the notification area. This indicates your computer is ready for incoming Bluetooth connections. 2. On the Bluetooth device from which you wish to send the file, start the file transfer. On the Nokia 6680, I clicked the file and selected Send . Via Bluetooth. 3. When the file transfer is initiated, a dialog box will appear on your computer asking if you wish to accept the file, as shown in Figure 8-17. Click OK. (If the two devices are paired, the file transfer may happen instantly without the confirmation dialog box.) The file will be saved to your /home directory.

CHAPTER 8 GETTING EVERYTHING UP AND RUNNING (Web design templates)

Friday, August 17th, 2007

CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 119 For Bluetooth to work, both devices need to have Bluetooth support. Many mobile phones come with Bluetooth nowadays, and an increasing number of notebook computers do, too. It s also possible to buy very inexpensive Bluetooth dongles that attach to the USB port of your computer. Bluetooth hardware is automatically recognized under Ubuntu, and the low-level driver software is installed by default. Therefore, all you normally need to do is install the software that provides the Bluetooth functionality you require. Pairing Bluetooth Devices When two pieces of Bluetooth-compatible hardware need to communicate on a regular basis, they can pair together. This means that they trust each other, so you don t need to authorize every attempt at communication between the devices. Pairing is very 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. Once the user has tapped in the PIN, the devices are paired. Pairing is easily accomplished under Ubuntu and doesn’t require any additional software. As an example, I paired my Ubuntu test PC to a Nokia 6680 mobile phone. It s easiest to initiate pairing on the phone, which should then autosense the PC s Bluetooth connection. On the Nokia 6680, I opened the menu and selected Connections . Bluetooth. Then I hit the right arrow key to select Paired Devices and selected Options . New Paired Device . More Devices. This made the phone autosense my Ubuntu PC, which was identified as ubuntu-0. I was then prompted to enter a PIN. The default PIN for pairing under Ubuntu is 1234, but you can change this by opening a GNOME Terminal window (Applications . Accessories . Terminal) and typing the following, which will open the PIN configuration file in Gedit: sudo gedit /etc/bluetooth/pin In the configuration file, replace 1234 with the PIN you want to use. Then save the file. Next, type the following in the GNOME Terminal window: sudo /etc/init.d/bluez-utils restart This will restart Ubuntu s Bluetooth service to take into account your reconfiguration. Some users report that they are unable to pair their phone with Ubuntu unless they edit another configuration file. If you find that pairing is refused, type this command: sudo gedit /etc/bluetooth/hcid.conf This will open the Bluetooth configuration file in the Gedit text editor. Look for the line that reads as follows: pin_helper /usr/bin/bluez-pin; And change it so it reads like this: pin_helper /usr/bin/bluepin; Save the file and restart the Bluetooth service: sudo /etc/init.d/bluez-utils restart Then try again to pair the device and your PC.

Web site designers - 118 CHAPTER 8 GETTING EVERYTHING UP AND

Thursday, August 16th, 2007

118 CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 3. After the installation has completed, open a GNOME Terminal window (Applications . Accessories . Terminal) and type sudo nvidia-glx-config enable. 4. Reboot your system. 5. To further configure the Nvidia card once your PC is back up and running, open a GNOME Terminal window and type nvidia-settings. You ll see a Settings window like the one shown in Figure 8-16. Figure 8-16. Once the correct driver has been installed, you can configure Nvidia cards by typing nvidia-settings in a GNOME Terminal window. Testing 3D Capabilities To test the 3D function of the graphics card, try running a screensaver. If the graphics drivers are correctly installed, the animations should run smoothly and with a high frame rate. To select the screensaver, click System . Preferences, and then click the Screensaver icon. Select an option from the list that is preceded by GL, although you might also try some of the Ant screensavers, such as AntSpotlight. Click the Preview button to see the screensaver in action. Note that these screensavers are visually very impressive. This is a good chance to show off your new Ubuntu setup to friends and colleagues! Configuring Bluetooth Bluetooth is the short-range networking facility that allows various items of hardware, usually those designed for mobile devices, 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 with your desktop computer.

Fedora web server - CHAPTER 8 GETTING EVERYTHING UP AND RUNNING

Wednesday, August 15th, 2007

CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 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-glxand also nvidia-settings, so that both are marked for installation. Then click Apply.

116 CHAPTER 8 (How to cite a web site) GETTING EVERYTHING UP AND

Wednesday, August 15th, 2007

116 CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 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).

CHAPTER 8 GETTING EVERYTHING UP AND RUNNING (Web page design)

Tuesday, August 14th, 2007

CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 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.

114 CHAPTER 8 GETTING EVERYTHING UP AND (Simple web server)

Monday, August 13th, 2007

114 CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 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 gocrprogram. Then select the OCR button on the toolbar of XSane s image preview window.

CHAPTER 8 GETTING EVERYTHING UP AND (Web site design and hosting) RUNNING

Monday, August 13th, 2007

CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 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.

112 CHAPTER (Graphic web design) 8 GETTING EVERYTHING UP AND

Sunday, August 12th, 2007

112 CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 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.

CHAPTER 8 GETTING EVERYTHING (Web design online) UP AND RUNNING

Saturday, August 11th, 2007

CHAPTER 8 GETTING EVERYTHING UP AND RUNNING 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.