Answers 81

From LXF Wiki

Answers 81

<title>VMware not playing</title>

<question>I tried to install VMware Player on a Dell Inspiron 5150 laptop. However, I got the message `no vmmon modules suitable'. I then tried to uninstall the program, but the computer seemed to be in a loop and I aborted after 10 minutes or so. When I run the program now it gives the message `Previous installation of VMware software has been detected' and `Execution aborted'. Any help in clearing the installation and providing a suitable module would be appreciated. </question>

<answer> You don't tell us which Linux distribution you are using, so some parts of this answer will have to be generic rather than specific. Firstly, VMware Player is now installed, which is why you get the message when you try to install it again. Your problem is that it has not been configured, which is done with the program (the installer runs this for you when it has finished copying the files). It was that gave the `no vmmon module' error. VMware Player comes with a wide selection of kernel modules, but it cannot cover every possibility. For example, it has a module for a default SUSE 10.0 installation, but not for Mandriva 2006. If a pre-built module is not present, will build one from source, but to do this it needs a C compiler and your kernel source code to be installed. Most distros install a C compiler, but many do not install the kernel source by default. Open your distro's package manager and search for gcc and kernel-source. On some distros, such as Ubuntu, the packages are build-essential and linux-source. Whatever the name, make sure the source package you install matches the version of your running kernel. You can get the version of the current kernel with the command

uname -r

Install whatever is missing and run again. This time it should build the modules and everything should be fine from there on. </answer>

<title>Simple stats</title>

<question>We have got a dedicated server and are running multiple Apache virtual hosts. I would like to produce some simple statistics for each of the virtual hosts without having to buy an expensive statistics package that not all of our customers will need. Is there a way to add this without additional cost? </question>

<answer>You're in luck: there's a free web server log file analysis program called Webalizer (, which you can use to generate detailed usage reports in HTML. The first thing to do is set up Apache so that each virtual host creates its own log files:

CustomLog logs/
access_log common

The next step is to set up Webalizer to analyse each of the log files and generate individual reports. Create a central directory for your configuration files with mkdir ­p /etc/webalizer/vhosts. Copy the /etc/webalizer.conf configuration file to /etc/webalizer/vhosts/ for each virtual host. Give the file the same name as the domain and end it with a .conf extension so you can easily tell what host the configuration is for. (For example, for the file will be called /etc/webalizer/vhosts/ The file will need to be edited ­ you should have at least the HostName, OutputDir and LogFile configuration directives set to something appropriate. You'll probably also want to specify other settings that are specific to a domain, such as HideReferrer, HideSite and maybe others as well. More information can be found in the man page (man webalizer). It should look like this:

LogFile /var/log/httpd/
OutputDir /var/www/vhosts/

Now, in order to process the logs for all your sites you need a simple script that you can just drop into /etc/cron.daily to be run once a day:

for i in /etc/webalizer/vhosts/*.conf;
do /usr/bin/webalizer -c $i; done

Once this has been set up, all you need to do to add a new host is creat a new configuration file and put it in the central directory. It will automatically be picked up the next time the command is run KC </answer>

<title>No net for Firefox</title>

<question>I am running a dual-boot system with Windows XP and various Linux distros using interchangeable caddies. My box is connected to the internet by means of a Netgear DG632 router, which has proved OK in most situations. My preferred programs for browsing and mail are Firefox & Thunderbird, and these work fine in XP ­ but in any of my Linux setups they refuse to connect to the internet. The only way that I can connect satisfactorily is by using Konqueror and KMail. I do not use proxies and I have made sure that all my settings are identical. </question>

<answer>This is caused by Firefox and Thunderbird trying to use IPv6 to connect to the internet, while KDE programs default to the older, more widely supported IPv4 protocol. If your ISP does not use IPv6 and your router does not support it correctly, you'll see exactly the behaviour you describe. There are two possible solutions. The most elegant is to upgrade the firmware of your router. Some Netgear routers certainly benefit from this, correctly handling the fallback to IPv4 after a firmware upgrade. You can get firmware upgrades for Netgear products from support.php. The alternative is to disable Linux's IPv6 support, so Firefox doesn't even try to communicate with the router in this way. You disable IPv6 by adding or editing these two lines in your module configuration file.

alias net-pf-10 off
alias ipv6 off

The name and location of the file varies between distros, and you don't say which you have used, so here arethe favourites:

/etc/modprobe.conf Mandriva,
  Slackware and SUSE
/etc/modprobe.d/aliases Fedora
  Core, Debian & Ubuntu
/etc/modules.d/aliases Gentoo


<title>Kan't start KDE</title>

<question>I have bought your LXF Special with the OpenSUSE distribution, in fact I've also bought the Mandriva one. For an old newbie like me these are splendid distributions. As you say on p16 of the SUSE special, the default SUSE desktop is Gnome. But the KDE files are also on the CDs, and I have loaded them. For some tasks I would prefer to use KDE, but nowhere in your writeup or in the online help, can I find how to enable the choice of the desktop. Could you please advise how to do this? </question>

<answer>Did you install KDE through Yast? If not, run Yast, go into Software Management and search for KDE (set the search type to name only), tick anything you want and let Yast install it for you. You don't need to worry about any of the library packages ­ Yast will select any it needs. The one package that you must install is kdebase3-session. This adds the startup files used by the Gnome and KDE display managers. Once it's installed, log out from the desktop and click on the Session button at the bottom of the login screen. You should see KDE in the choice of desktops, and will be given the option to make it the default. If you want to be able to choose your desktop each time you start SUSE, open a superuser terminal (both Gnome and KDE have menu options for this) and run gdmsetup. Turn off the automatic login feature to be given the choice of desktop each time you boot. </answer>

<title>Use the source</title>

<question>I want to try Sweep, the audio app on LXF78's cover CD. I'm running Ubuntu (Breezy Badger) and all the help files just talk about the repositories. Having just a CD-ROM drive and no internet, I want to download from the coverdiscs, but it isn't obvious what to do! I pulled the files off the CD, unpacked the tarballs into a folder in my home directory, and just ended up with a pile of files and no idea what to do with them! Please make it easy so I can use your cover CDs! </question>

<answer>Software repositories are the easiest way to install packages on most distros, provided your distro's repository contains the package you want and you have internet access. However, they're not the only way to go ­ you can also build the package from source code. After all, that's what the repository maintainers do. The files you see after unpacking the Sweep archive are its source code. Compiling most software from source is not particularly difficult and requires no programming skills, just a little care. Open a terminal and move to the directory that contains the source code, then run configure, which checks that your system has everything it needs to compile the source code

cd sweep-0.9.1

If configure fails, it means that something is missing, which you can identify from the error message. Install, and try again. With a default Ubuntu installation, the first failure will be that a C compiler is not present, so fire up Synaptic from the System menu, click on Search, type in `build-essential', select it from the search results and click Apply. Then run /configure again to see what else may be needed. Once ./configure runs without error, run these two commands to compile and install the software:

sudo make install

Sometimes, ./configure may give an error about a package not being installed when it is. In this case you need to install the corresponding devel package, which contains information needed when compiling software. Some of the required software can be found in the dependencies directory on the DVD. Unfortunately, it appears that in this case, not everything you need in the way of -devel packages is included on the Ubuntu CD. If you have no internet connection, you would be better off with a distro that comes on several CDs, or a DVD, where there is space to include much more, including many more devel packages. SUSE 10.1 on this month's DVD would be a good choice. </answer>

<title>This is a RAID</title>

<question>I would like to use LVM and software RAID level 1 on my Red Hat-based server, but due to some administrative issues I'm unable to use the graphical user interface to set it up. Can I do it without going all graphical? </question>

<answer> You can set up RAID and LVM using the text-mode installation, but it is slightly harder that way. A minimum of two disks is needed for RAID 1. Start up the boot process, and when you get to the disk partitioning screen, switch to the free console screen by using Alt+F2. Using fdisk to partition the drives, create a partition of 100MB for a RAID 1 /boot on each of the drives (/boot cannot be a logical volume), and create another partition using the rest of the disk for other filesystems and swap. Change all partition types to fd for "Linux raid autodetect" and don't forget to write the changes to disk. The devices to use with fdisk are /dev/sda and /dev/sdc for SATA devices; /dev/hda and /dev/hdc for IDE drives (IDE drives need to be master device on their own cable); and /dev/sd* for SCSI drives. Create the RAID 1 devices, using the correct partitions:

mdadm --create --verbose /dev/md0--level=raid1 --raid-devices=2 /dev/
sda1 /dev/sdb1
mdadm --create --verbose /dev/md1--level=raid1 --raid-devices=2 /dev/
sda2 /dev/sdb2

Start the RAID devices:

raidstart /dev/md0
raidstart /dev/md1

See RAID rebuild status:

cat /proc/mdstat

LVM creation; first create the physical volume:

lvm pvcreate -M 2 --metadatacopies 2 /dev/md1

Next, create a volume group:

lvm vgcreate -A y -M 2 VolGroup00 /dev/md1


lvm vgchange -a y VolGroup00

Finally, create logical volumes (/ (root); /usr; /var; /tmp; /home and swap). Appropriate sizes are indicated by G for gigabytes and M for megabytes.

lvm lvcreate -L 512M -n lvroot
lvm lvcreate -L 10G -n lvusr
lvm lvcreate -L 5G -n lvvar
lvm lvcreate -L 128M -n lvtmp
lvm lvcreate -L 2G -n lvhome
lvm lvcreate -L 1G -n lvswap1

Logical volumes can be reduced or extended, so they only need to be sufficient size for the installation. When you're done, press Alt+F1 to go back to the Disk Druid. Continue the configuration of the mount points and then the rest of the installation. </answer>

<title>Firefox icons</title>

<question>I use Mandrake 9.2 and Firefox 1.0.6. In my bookmarks there is a small icon next to each entry ­ some of the time it appears as a sensible picture with a logo or initial letters appropriate to the name of the website, but some of the time it appears as a broad backslash. Try as I might, I cannot change this icon or discover where the detail or description of it is. Now here is the silliness; next to the LXF entry in my bookmarks is the entry for Linux Magazine ­ and the icon is the same! How can this be? How do I change it? </question>

<answer>These are favicons, which were introduced by Internet Explorer. If a site contains a file called favicon.ico, most browsers will use it to identify the site in the location bar and bookmarks. Your copy of Firefox seems a little confused as to which Linux magazine is which, but there are a couple of ways to fix this. The brute force approach is to type about:config into the location bar and search for the entries `' and `' ­ right-click each one to toggle it to false. Exit and restart Firefox, and clear the caches with Tools > Clear Private Data. Then re-enable favicons in about:config, restart again and visit the sites to reload the correct icons. A more targeted solution is to install the Favicon Picker extension. This enables you to change or delete favicons for individual sites. You can delete the incorrect icon, then revisit the site to have it load the correct one. Your version of Firefox is rather old, and has some security flaws. Updating would be advisable. If you do, you will need a newer version of Favicon Picker too, which you can get from viewtopic.php?t=321562. Download and save the file, then press Ctrl+O and select the file you just saved to install the extension. </answer>

<title>Scanner woes</title>

<question>I have a SCSI scanner, the node for which is /dev/sg0. I use KDE for my desktop and Sane and XSane to control the scanner. The problem is that the default permissions for sg0 do not permit me to access it. Whenever I click on the desktop icon for XSane, I get an error message that there is no device present. The device is owned by root and belongs to the group `disks'. My user also belongs to that group. The default permissions are read+write for owner, but only read for group. Group requires read+write in order for XSane and Sane to see the scanner. So whenever I need to scan, I have to open a console window as root and run the chmod command to alter the permissions. Unfortunately, the alteration only lasts for the session, and it reverts to the default on the next boot-up. This has only occurred since upgrading to SUSE 10 and never manifested itself on any of the earlier versions of SUSE I was advised to write a new udev rule. Based on the information revealed by udevinfo I have made several attempts at writing a rule to set the mode ­ but have not (yet) had any success. </question>

<answer> You are correct in thinking that udev is causing this, which is why it did not happen on earlier version of SUSE ­ they did not use udev. You already have a udev rule in place, in /etc/udev/rule.d/50-udev.rules.

KERNEL=="sg*", NAME="%k",
GROUP="disk", MODE="640"

All you need to get your scanner working is to change the MODE setting to 660, giving write permission to the disk group. However, changing this file is not recommended, because any subsequent update to udev will overwrite it and you'll be right back where you started. Instead, you should copy this line to /etc/udev/rule.d/10-udev.rules and modify it there. The lower-numbered file is processed first. To prevent its changes being overridden by a later rule, make the rule read:

KERNEL=="sg*", NAME="%k",
GROUP:="disk", MODE:="660"

The := assignations ensure that the settings will not be changed. Depending on how many people use your computer, and who you want to use the scanner, you may prefer to create a separate scanner group, either in Yast or with groupadd scanner and change the udev rule accordingly. Then you can add to that group only those users you want to be able to use the scanner. </answer>

<title>Restricting SSH</title>

<question>I have recently been given the task of running our internal Linux systems. We are planning to allow our developers to have remote SSH access. One of the requirements is that all users connecting from the exterior be presented with a message stating the terms and conditions of usage. Could you give me some hints on how I could get this configured in a RHEL4 operating system? Also, do you know if it is possible to prevent logins between 2 and 4 am? I have some Cron jobs running at this time that are quite resource intensive, and don't want people logging in and consuming more resources. </question>

<answer> Restricting access to services is a common task that most system administrators need to do in the course of their work. There is more than one way to do this with Linux (see man motd and man issue), but it just so happens that PAM (Pluggable Authentication Modules) will let you do both of the tasks you are trying to accomplish. PAM is a powerful and versatile system that allows any program compiled with it to use its modules for authentication, accounting, etc. Each program has its own configuration file in /etc/pam.d. This is what /etc/pam.d/sshd looks like by default:

auth      required
auth      required
account required
password required
session required
session required

For consistency, Red Hat configures PAM so that all modules that provide system authentication use stacked authentication rules (/etc/pam.d/system-auth). Since we do not want the message to appear for any other service, we need to change /etc/pam.d/sshd only. We will also add the pam_time lines to prevent SSH logins from 2 to 4 am. This is what it would look like:

account required
auth      required
auth      required
account required
password required
session required
session required
session required

Now all you need to do is put the message of the day in /etc/sshmotd and add the following to /etc/security/time.conf:


You should be very careful with PAM, as it is a very powerful authentication mechanism that can lock even root out of the system. I recommend that you first try any changes in a testing environment. </answer>

<title>Video editing</title>

<question>I want to get into a little video editing on Linux. My digital camera (Kodak DX6490), is not really a video camera, but it does take videos in QuickTime (*.mov) format, but these are not understood by Kino or Avidemux. I downloaded Cinelerra, but have seen other forums where this program has been called overkill for a video newbie like myself to be learning on. I tried rendering an AVI file from Cinelerra to port to other editing software and noted that the colours had changed (at least they appeared to have done when I played it in Xine). I don't know where to go from here. Is there a beginner's guide to simple editing to help me learn the basics of Cinelerra? Just enough to be able to cut sections from the videos, tie them all together and then save in whatever format? Also, is there a way that I can update my Fedora Core 4 system so that Kino recognises the *.mov files (I think it is meant to, but there is something different about the ones made by my particular camera). </question>

<answer>You need the latest version of Kino ­ 0.8.0 ­ which supports import of various files by means of FFmpeg or MEncoder. Fedora Core 4 includes Kino 0.7.6. You can find a suitable RPM for FC4 in the Dries repository at, which should let you import any file that FFmpeg or MPlayer can handle. You are likely to hit a couple of gotchas when you first try to import files. You may get an error that reads:

   The playlist is empty and the
   default preferences for video
   creation have not been
   specified ­ aborting.

To fix this you need to go to the Defaults tab of the preferences window and set Normalisation to either PAL or NTSC (the default is None). If you have MPlayer installed, you might still get the error message:

Failed to load media file'.

It appears that Kino doesn't always play nicely with MEncoder, which is Kino's default choice for loading most file formats. If this happens to you, open /usr/share/kino/scripts/import/ in a text editor, as root, and change line 13 to

which mencoderREMOVE > /dev/null

This kludge makes Kino fail to find MEncoder, and use FFmpeg instead. You can change the MEncoder name to anything that the which command won't find; adding REMOVE makes it clear what you have done. </answer>

<title>Linux in schools</title>

<question>I am a network manager in a large secondary school. I am interested in trying to reduce ICT operating costs by using Linux and open source software. I currently use an FC4 server for our intranet and web server, but I would like to extend the use of Linux and open source software with additional servers for file sharing/printing and also eventually to classroom workstations. What distributions would you recommend for server and workstation? Do you know of any good sources of information for using Linux in education? </question>

<answer>The best advice I can give is to download and test various different distributions until you find one that suits your needs and that you feel comfortable with. The website has many Linux distros available for download and burning to CD/DVD, including FreeBSD, NetBSD (which are not strictly speaking Linux, but are free to download and try). Mix and match distributions in your environment until you find one you like. I'd recommend a distro that is compliant with the LSB (Linux Standards Base, which should mean that you get some compatibility between distributions and enable software applications to run on any LSB conforming system. As to the question of which distribution is better to use in education, all the popular distributions that I have come across give opportunities to learn and develop the mind, so whichever one you pick for that purpose should be a useful asset to have in the classroom. And don't forget that you can legally copy and distribute all Linux distributions that are released under the GNU General Public License to your pupils, so they can continue to learn about the system at home. (For more on using Linux in schools, see our feature on p50.) </answer>

<title>SUSE doesn't like</title>

<question>I have two computers with a Belkin KVM switch connecting them to a KDS Visual Sensation 190 monitor. Both machines are running SUSE 9.3 with no problems whatsoever. However, I have tried to install SUSE 10.0, and I keep running into the same problem. Once I have finished installing it, my monitor doesn't report its size and resolution to the OS. This isn't a problem on SUSE 9.3, because I just enter the size and resolution information from the manual and everything works fine. However, when I try this with SUSE 10.0, the system prompts me to test my settings (via Sax2), but doing so just seems to disable my monitor (the LED even alternates between green and yellow as it would during powersave mode) and I can't wake it up. Since it happens on both machines, I think that it is either the KVM switch or the monitor. </question>

<answer>The most likely culprit is the KVM switch, which is easy enough to test. Remove it and connect the monitor directly to one of the computers. As the problem seems to be the KVM preventing the software from interrogating the monitor, running it like this once should sort it out. Then connect the monitor directly to the other computer and repeat the process. Once X has been configured with your monitor settings, SUSE won't ask about it again, and you can reconnect the KVM. Incidentally, the same thing happens to me when installing SUSE on a VMware virtual machine, because it cannot identify the monitor. Choose a suitable monitor from the list in Yast > Hardware > Graphics Card and Monitor sorts it out. </answer>


<question>I am using SUSE 10.0 (from your DVD), which incorporates 2.0 build I cannot get it to recognise my Canon MP 760 printer as the default printer no matter how I try. If I set it up and test print, it is then recognised in However, when I next restart my computer defaults to generic printer'. </question>

<answer> If you are running the CUPS printing system (which is the default on SUSE), the generic printer should work. This is because is just passing the data to lpr, which uses the system default printer (which you have already configured in Yast). If you want to change how presents this, you need to run spadmin, as root. Select System > Terminal > Terminal program ­ Super User Mode from the SUSE menu, then type:


You may now rename your printer, or add a new one. If the `generic printer' works, just rename it to something more meaningful. You can't delete the default printer, so add a new one and make it the default before you try to remove the generic option. Note that if you are running CUPS, spadmin will not allow you to add a new printer, because it expects CUPS to provide the information it needs. Press the New Printer button then Cancel in the Add Printer window to make OOo scan for printers and add them to its list. </answer>