Answers 107

From LXF Wiki

Answers 107

<title>Inside information</title>

<question>I work in a mostly Windows environment but am constantly striving to move to Linux; one thing I find quite frustrating is good visibility of what devices I have running and their status with regards to device drivers. I hesitate to say but Microsoft does a good job with its Device Manager. Is there something in Linux that provides the same sort of visibility? </question>

<answer>The situation is rather different with Linux, because most drivers are included with the kernel, so there's not the same need to compare what is installed and running with what is available from various websites. As long as you keep your package manager up to date, it will inform you of any updates. There are various programs that will report on the status of your hardware, some generic and some specific to a distro. One of my favourites is lshw (, which is generally used in a console and gives a detailed listing of everything in the machine, from motherboard and CPU to USB devices. The default output is plain text, but it can also generate HTML for viewing in a web browser or open a window where you can click on items to see more information. It has a number of options to limit the information given, such as restricting it to certain types of device or removing sensitive information like serial numbers from the output. A similar program is HardInfo ( which displays plenty of information about your hardware and software in a GUI. This displays information in a tree view so you can zoom in on the specific details you need. There is a section showing the loaded kernel modules, so you can see which drivers your hardware is using. You may need to run these programs as root, or with sudo, to be able to read everything from your system. The main desktop environments have their own programs: the Gnome Device Manager and KDE's KInfoCentre, which provide similar information. Various distros also have their own variants of these programs: Ubuntu's Device Manager (which is probably closest to the Windows program, although it is a while since I used that), SUSE's Yast and Mandriva's Control Centre all provide hardware information. The SUSE and Mandriva offerings are integrated into their all-encompassing system administration programs, so they also have the option of configuring the hardware where appropriate. </answer>

<title>Moving pains</title>

<question>I installed Ubuntu from the DVD with LXF104 and all went well. I was impressed with the user interface and was able to get networking, Nvidia support and printing up and running quite easily. Unfortunately that's as far as I got. I decided to install some software, starting with FlightGear. I unzipped the files and then tried to find the install instructions, or as I would do in Windows, the install Exe file. I eventually found some instructions, obviously written by a programmer, telling me how to compile the program. I followed the command line instructions to the letter, but only succeeded in generating errors. Not to give up too soon I followed the instructions for installing Toribash on page 70. The first part worked, but when I typed toribash_ubuntu7 at the command prompt it gave me an error saying "bash: toribash_ubuntu7; command not found". I would love to be able to dump, or at least sideline Windows, but if it is this difficult to install a program on Linux, then I fear it will be some years yet. The descriptions in your magazine of the various programs available are fantastic, but what use are they if a normal person cannot install them? Given the enormous energy, intelligence and dedication the program writers have put in, could one of them not write a simple install.exe for Linux to allow those who wish to put their toes in the Linux water, the mechanism to do so? </question>

<answer>One of the biggest challenges when trying a new operating system is "unlearning" the ways you currently do things. Linux is not Windows and many things are done differently, and software installation is probably the most extreme example of this. There are three main ways to install a package in Linux: compiling from source, downloading a package from the program's website (or a DVD) and installing through the distro's package manager. The middle option is the closest to the Windows approach, although it does not use executable files ­ instead the file is a package containing all you need, and is loaded with a package manager. If there is a Deb file available, install it with

 sudo dpkg --install someprogram.deb

This works, but it suffers some of the same limitations as the Windows method. You have to revisit the website to see if updates are available, there may be conflicts with other installed software and you have no idea about the integrity of the package you have just downloaded. All of these are avoided by using the distro's package manager and repositories. A repository is a collection of packages that have been built and tested for your distro, and verified to be free of any known security vulnerabilities. Packages are digitally signed, and verified by the package manager, to ensure you get only "clean" software. Not only is this the best way to install software, it is also the most convenient and includes almost everything you can want. Simply start Synaptic (in the case of Ubuntu), press the Search button to find what you are looking for, pick what you want to install and click on Apply. The package manger takes care of sourcing the packages it needs, including any dependencies, packages required by your package, downloading and installing them. It will also keep you informed up any updates as they become available. Some of the graphical package managers, such as SUSE's Yast, will also install from a package you downloaded or found on a DVD, but Synaptic does not currently do this, hence the need for the dpkg command given before. If you want to compile programs from source, you will need the build-essentials package ­install this from Synaptic. The Toribash error arose because Linux will only look for commands in a list of specific directories, which as a security measure excludes the current directory. To run a command located in the current directory, prefix its name with ./, as in ./toribash_ubuntu7. </answer>

<title>UUID confusion</title>

<question>I run Ubuntu 7.10 and thought I would repartition my hard disk, and keep /home on a new separate partition, as described in Jack Knight's article in LXF100, but without the encryption. However a number of issues arose and before I do the deed I would appreciate some advice if possible. It is not clear from the article, nor from any of the books I have read, exactly how to ensure that the operating system knows where the new /home partition is. The instructions in the article apply to the situation where the encryption process has been completed. I thought that the answer might lie with fstab so I had a look at fstab (I've attached a copy) but found that the existing Linux partitions have a UUID entry, which is frankly incomprehensible. The fstab entries for the two Linux partitions on the drive also seem to be commented out.

 # /dev/sda3
 UUID=ff773431-fb57-48b4-bb55-01da6902c372 /
 ext3 defaults,errors=remount-ro 0 1

If I run GParted from the System/Administration menu I cannot change the sizes of the Linux partitions ­ I think this is because they are mounted and it is more dangerous to edit mounted partitions ­ however I have downloaded a Live CD version of GParted that boots the PC and allows any of the partitions to be edited. </question>

<answer>You are on the right lines with trying to add the new /home to /etc/fstab. The entry would normally be something like

 /dev/sda5 / ext3 defaults,errors=remount-ro 0 1

but, as you have discovered, Ubuntu uses UUIDs instead of partition numbers. The commented lines before them are simply to show you which partitions they applied to at the time of installation. A UUID is a unique identifier applied to a filesystem when it is created, one that doesn't change for the life of the filesystem. If you were to shrink /dev/sda2 and add another partition between it and the current sda3, that would change to sda4 and your fstab would no longer work, but the UUID stays the same, so the Ubuntu-style fstab would still work. You have a number of choices here when you add your new home filesystem. You can do it the way you know and use the traditional /dev/xxx method, knowing that you will need to edit fstab if you move partitions. Or you could do it the Ubuntu way by using the vol_id command to get the UUID of your new partition.

$ sudo vol_id /dev/sda5

Here you can see the UUID of the filesystem and you can paste it into fstab. There is a third option, and vol_id's output gives a clue ­ the filesystem label, which is the method preferred by Red Hat/Fedora. This has the advantages of UUID in terms of not changing when partitions are added, but is also more readable. All you need to do is give your partitions labels with

e2label /dev/sda5 HOME

then edit /etc/fstab to contain

LABEL=HOME / ext3 defaults,errors=remount-ro 01

You can change the label of an existing ext3 filesystem with e2label without disturbing the contents, so you can label your root partition and amend fstab. If you are using a filesystem other than ext3, they all have their own labelling tools, you can even label your swap partition with "mkswap -L ..." . You are correct about GParted not working on mounted partitions, but you don't need a separate Live CD; you can boot from the Ubuntu install disk and run it from there. </answer>

<title>Desktop fishiness</title>

<question>I am running Gnome on Mint 4.0, which is based on Ubuntu 7.10. Is it possible to use Sherman's Aquarium as a screensaver? I've installed it and it runs as an applet on the Gnome panel and I can manually start a larger version from the command line, but it doesn't appear as a screensaver in the screensaver list. It looks as though the list is generated with some XML config files, but I don't want to start fiddling without an idea of what I'm doing. </question>

<answer>Sherman's Aquarium works with XScreenSaver but not Gnome-screensaver. XScreenSaver is not installed by default with Mint Linux, so the first step is to install it. Installing Sherman's Aquarium in the usual way (via the Synaptic package manager), installs the program but does not add it to the list of screensavers used by XScreensaver, possibly because it is considered a hack. To add it to the list, you need to edit the file .xscreensaver in your home directory. If this file does not exist, run xscreensaver- demo this will create the file with the default settings. Now edit the file and find the line that says programs:. Add a line after this that contains

"Sherman's aquarium" shermans -root \n\

Then run xscreensaver-demo to configure the screensaver. Finally, you need to make sure XScreenSaver runs when you start a session, and disable Gnome screensaver. Go to System > Preferences > Sessions and press Add, type in a suitable name and description and set the command to

xscreensaver -nosplash

Disable the Gnome-screensaver, log out and in again and you should see a very fishy desktop when the screen blanks. </answer>

<title>Broadband wireless modem</title>

<question>I bought the Linux Format February 2008 edition with Mandriva 2008 [LXF102]. I have used Microsoft for about 25 years and I must confess Linux is vastly different and it really takes some coming to grips with. I still consider myself on "L" plates. I am using a Maxon Broadband Wireless Modem Model BP3-EXT to access the internet using Windows XP on a desktop PC. My ISP, Bigpond in Australia, has informed me that it does not support Linux operating systems. Can I connect to the internet? </question>

<answer>The answer to your question is "yes" but I suspect you also want to know how. The modem you have is a USB serial modem. Despite it using wireless to connect to the internet, it appears to the computer as a normal dial-up modem. Getting it to work in Linux involves two fairly simple steps. The first is to load up the driver, and make sure it is loaded every time you boot. The other step is setting up the dialler software to connect. The modem needs the USB serial driver, which is included with all distros, but it needs to be configured to work with your modem and for that you need its vendor and product ID codes. You can find these by running lsusb in a root terminal or by examining the output from dmesg (which prints out kernel messages). Open a root terminal, plug in the modem then run

dmesg | tail -n 20

to see the last twenty lines of kernel messages and look for something like this

usb 2-4.4: new full speed USB device using ehci_
cd and address 8
usb 2-4.4: new device found, idVendor=16d8,

Now, using the values from dmesg (which may not be the same as given here), load the driver:

modprobe -v usbserial vendor=0x16d8

Running dmesg again should show

usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support
registered for generic
usbserial_generic 2-4.4:1.0: generic converter
usb 2-4.4: generic converter now attached to
usbserial_generic 2-4.4:1.1: generic converter
usb 2-4.4: generic converter now attached to
usbserial_generic 2-4.4:1.2: generic converter
usb 2-4.4: generic converter now attached to

which means you have successfully loaded the drivers and enabled the modem. You can make this happen on boot by adding usbserial to /etc/modules.preload and the following line to /etc/modprobe.conf:

options usbserial vendor=0x16d8 product=0x6280

Now switch from root back to your normal user. As you can see from the dmesg output, the modem appears as three devices. The one you want is /dev/ttyUSB1, so fire up Kppp and set up a new connection using /dev/ttyUSB1 as the modem device, "*99#" as the number to dial and the login details given by your ISP. When setting up the modem, set Flow Control to Hardware and turn off "Wait for dial tone before dialling" </answer>

<title>Card readers</title>

<question>I am thinking of buying a Canon S5IS camera that uses SD memory cards. However I am told that I need a "card reader" My computer has lots of free 2.0 USB slots, but I don't know what reader is compatible with Linux. (I'm running OpenSUSE 10.3.) </question>

<answer>A far more difficult question to answer would be "which card readers do not work with Linux?". Some people have reported problems with the 99-in-one type card readers. This is usually caused by them running a home-built kernel stripped of all the superfluous options. These devices often need the SCSI_MULTI_LUN option enabled, which will be the case with any default distro kernel, because each card port on the reader is seen as a separate device. If you only want to use it with one type of card, the single-format readers that look like a USB pen drive are more convenient; you just plug the card into the slot and the reader directly into the USB port. You may not need a card reader; Gphoto2 is able to download pictures from most cameras via their USB cable. Your camera is not in their list of supported devices, but if it is a newish camera, this should change soon. If you use KDE, type camera:/ in the Konqueror location bar to see a list of connected cameras and the photos on them. Having said that, I find a card reader faster and more convenient, especially as it means I can put a card in my laptop and carry on shooting with another. </answer>

<title>Internet or internot?</title>

<question>I have tried several distros including Fedora, Mandriva and SUSE, and I always have the same two problems. The first problem is that Firefox rarely manages to connect to the internet, giving a `timed out' message, which I also get if I try to update the system, while Konqueror has no problems. The second problem is that after anything from a few minutes to an hour or two, the screen will freeze and not respond to the mouse pointer, which is still able to move. I am using an Nvidia graphics card but had tried unsuccessfully several times to install the proprietary driver for it. I tried Ubuntu Feisty from the LXF94 DVD after reading that it had a simple method of installing the Nvidia driver. This worked very easily and now my screen no longer freezes. I have also found that Firefox works on Feisty too, and so do updates. Then I decided to try Ubuntu Gutsy on another partition when it appeared on LXF100's DVD. I found that the Nvidia driver would not install on Gutsy as the internet connection could not be made, even after trying a different download server, and updates would not work either. My problem with Firefox also returned, although Konqueror still worked with no problems. Is this a problem with my hardware or settings, and why does Ubuntu Feisty work? </question>

<answer>Your internet connection problem is almost certainly caused by your browser trying to talk to your modem or router using IPv6. If the connection does not work with IPv6, the system is supposed to fall back to using the older IPv4. However, some routers do not do this and get confused when dealing with a client that talks IPv6 and an upstream connection (your ISP) that does not. There are three ways to deal with this: fix the router, disable IPv6 at system level or disable it in the browser. It would be worth checking the router manufacturer's website to see if there is a firmware upgrade available. The problem may completely disappear after doing this. If not, you can tell your computer not to use IPv6 so Firefox, or any other program, doesn't even try to communicate with the router in this way. You disable IPv6 by adding or editing these two lines in your modules configuration file. This is /etc/modprobe.d/aliases in Ubuntu, but can be /etc/modprobe.conf or /etc/modules.d/aliases in other distros.

 alias net-pf-10 off
 alias ipv6 off

These should replace any existing lines that refer to IPv6. The third option, which should only be used when neither of the others is possible, is to disable IPv6 in Firefox, which won't help with anything else. Type about:config into Firefox's location bar, then IPv6 in the Filter box. If network.dns.disableIPv6 is set to false, right-click on it and pick toggle from the menu to change it to True. Most distros now have the Nvidia drivers in their repositories, but installing them is fairly simple if you download the package from Press Ctrl+Alt+F1 to switch from the desktop to a console, log in as root (or run sudo -i from Ubuntu) then execute these commands

 init 3
 init 5

Debian and Ubuntu users should replace the first and last commands, which turn off and on the X server, with

 /etc/init.d/dm stop
 /etc/init.d/dm start

The Nvidia installer bails out if X is running, hence the need to switch to a console and disable X. Part of the installation process may involve compiling a module for your kernel, if this fails, make sure the build-essentials package is installed. Nvidia-config modifies your X configuration file to use the new driver. </answer>

<title>HomePlug and play</title>

<question>I have a Devolo dLAN HomePlug 85Mbps Ethernet Starter Kit. Devolo provides a software utility to enable encryption between each device, but I don't know how to install the provided software. </question>

<answer>This is a source package: you need to compile it, but first there are a couple of requirements you should install from Synaptic. Dlanconfig depends on libpcap, which is installed by default in Ubuntu, but to compile against it you also need the libpcap-dev package. You also need to the build-essentials package, which includes the compiler and other tools needed to build software from source. Once these are installed through Synaptic, open a terminal and change the the directory containing the file you downloaded from, then run

tar xf dLAN-linux-package-XX.tar.gz
cd dLAN-linux-package-XX
make cfgtool
sudo make install-cfgtool

The first two lines unpack the archive and change to the directory containing its file. The next two build the config tool from source and the last one installs the files to your system. If you decide to remove the software at any time, repeat the process, but make the last command

sudo make uninstall

Now you can start the program with

sudo dlanconfig eth0

and change your passwords. You will need the devices' security codes, which cannot be read when they are plugged in, so make a note of these first. Run dlanconfig and take the option to change the remote password, which also changes the one for the local device. If you change the local device first, you will not be able to connect to the remote one to change that because the passwords no longer match. If you have the USB version of the dLAN devices, you need to change the last two lines of the build process to

make usbdriver
sudo make install-usbdriver

to install that or simply

make install

to install both. Building the USB driver requires the kernel sources, so use Synaptic to install the linux-source package first. </answer>

<title>Use an iPod with Linux</title>

<question>I've just bought an iPod nano and seem to be having some problems with it using Linux. Every time I try to put music on it, it goes wrong. Banshee and Gtkpod fill all the space up on my iPod without putting anything on it and it doesn't mount in Amarok. This is very frustrating, as I have to put all my songs on my iPod using the family computer, which runs Windows. My computer is running Ubuntu 7.10. </question>

<answer>There are several options for transferring music between a Linux system and an iPod. Banshee and Amarok both include the functions within a media player, and Gtkpod is a dedicated program for the job. There are ways to integrate it with other software, such as the fusepod Fuse filesystem to mount an iPod and the Kpod KIO slave for KDE. Although it's possible to mount the iPod as a USB mass storage device, simply copying files to the device does nothing but fill it up. You have to use a suitable tool to manage the music on Apple's devices. The simplest is probably Gtkpod. Start the program and go to Edit > Edit Repository/iPod Options. Set the mount point to wherever your iPod is automounted and select the correct model number. You can find the model number on the device, on the first line of the file iPod_Control/Device SysInfo. Now you can add your music collection to Gtkpod and copy tracks to the iPod by dragging them from the local window on to the iPod's entry in the left-hand pane. You must then click Save Changes to write the files to the iPod and, importantly, update the iPod's database. The procedure is similar with Amarok. First, tell it about your device in the main configuration windows, then go to the devices tab in the main window and click on the iPod icon above it to set the correct model. Now, you can drag tracks or entire playlists to your iPod. They will appear in the Transfer pane at the bottom-left of the window, until you press the Transfer button. This step is necessary to copy the tracks and update the database. It's likely to be the lack of database update that's causing your problems, and this can be caused by setting the wrong iPod model. Or you may prefer Banshee, which can also copy to iPods. This is the easiest of the lot to set up. Just tell it where your music files live, plug in the iPod and drag tracks from the library. To copy the files and update the iPod's database, right-click on the iPod's name in the left-hand pane and select Synchronise iPod and Save Manual Changes to copy over the files you dropped on the device. Alternatively, use the Synchronise Library option to copy your collection to the iPod. To access the device directly, there's a Fuse filesystem for iPods available from and a KDE KIO slave from With the latter, you type ipod:/ in Konqueror's location bar to access the iPod directly, and copy files by dropping them on the Transfer folder. Then go into the Utilities folder and run Synchronise to write the changes. </answer>