Ask Klaus!


Klaus Knopper is the creator of Knoppix and co-founder of the LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

Sharing Printers

Question:

I am in charge of a computer lab with 25 laptops running Edubuntu Linux. I want to set up one printer to be shared by all the laptops so users can print from any laptop. We all connect to the Internet through an IPCOP.

I have tried to install the printer on one computer and then share it with the other laptops through the IP addresses, but this has not worked. How do I solve my problem?

Answer:

Sharing a printer with CUPS [1] should be the easiest solution, provided that no additional firewall rules prevent other laptops from accessing port 631 on the computer acting as the server. Setup of CUPS can be done via KDE or a web interface. You can install CUPS with the following:

apt-get install cupsys

on Debian/Ubuntu.

You probably will need some printer PPDs, so look for a Foomatic [2] or Gutenprint [3] package that matches your printer. The same packages will have to be installed on the clients to use the printer in native mode instead of "generic postscript."

Start CUPS on Debian/Ubuntu with

/etc/init.d/cupsys start

and configure the printer via the KDE Peripherals | Printer control panel plugin or via the CUPS web interface, which you can reach at:

http://localhost:631/

I usually name a single attached printer lp for its printer queue name. In either configuration interface, there should be a setting that allows sharing of that printer in the network. If you cannot find this, just check for and add the line

Allow @LOCAL

inside the <Location /> section of /etc/cups/cupsd.conf. Also add

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL

to allow clients to browse for and connect to the server's shared "IPP/Network" printers. If you have any Windows clients in your network, you also might want to enable the [printers] section that is given as an example in every default in /etc/samba/smb.conf on the server. For pure Linux clients, running a Samba server for exporting printers is not required, although most Linux systems will also work well with just native CUPS IPP printing. Figure 1 shows the KDE print client setup for a printer connected to a server with IP 192.168.0.1.

Figure 1: The KDE print client setup.

When letting the clients search for an IPP print server, make sure you enter the right network address in the Scan options, otherwise "localhost" will be checked for printers, which apparently is not what a network printer client wants.

Wireless

Question:

Congratulations on a wonderful product. We use Knoppix [5] as a Live CD for our work via the Internet. I was able to get the wireless to work. I found out via dmesg that Knoppix itself loaded the serial monkey driver - rt2x00 - I guess because RaTech hardware/firmware was found.

I had to

rmmod rt2500pci

and then load ndiswrapper and modprobe with the WinXP drivers. I get an instant connection to the router and it works well after that.

Is there a cheat code not to load the serial monkey version? Or, even though it doesn't seem to, should the serial monkey driver with Knoppix work?

Answer:

Short answer: Sorry, no cheat code for this (yet).You can add a knoppix.sh script to your Live CDs that contains the correct sequence of commands to remove the wrong driver and load the "right" (DOS/Windows) one via ndiswrapper.

In fact, I'm not sure whether I could legally include the proprietary Ralink firmware in one of the next releases, so it might be better to remove this driver entirely instead of distributing a non-working one.

Music

Question:

I am almost weaned off Windows except for one challenge - is there is a Linux version of a media player like Windows Media Player 10 that plays .wma and .mp3 audio files? Also, I would like to rip music and store the files in a similar database that is easily searchable for items such as songs, genre, artists, composer, etc. I previously used the Unix variant Xenix before Windows and Linux.

Answer:

Technically, you have the same fine player features in various Linux programs that you know from other operating systems.

Figure 2: Kaffeine is a full-featured media player for KDE3.

Legally, however, it is illegal to rip or deprotect music the same way under Linux that it is under Windows, so you are simply not allowed to play some file formats without a license - even though it is technically possible and free of charge, and even if you did pay for the music. For the playback part, I recommend XMMS [6] for audio and Kaffeine [7] for both audio and video.

For proprietary multimedia formats such as WMA, Kaffeine and MPlayer [8] support loading plugins from other operating systems. Legally, these plugins cannot be publicly redistributed in any free Linux distributions.

I'm not even allowed to tell you where or how to get these plugins (but a quick search on the Internet would provide this information).

For unprotected formats, such as MP3 and Ogg-Vorbis (which is my favorite audio format for both quality and file size), most Linux distributions already include the corresponding plugins and can display information about songs/genre/artists/composer, in addition to finding this information from a CDDB database when you insert a standard audio CD.

Kaffeine and XMMS also have nice visualization plugins, such as goom [9].

Samba PDC

Question:

I'm trying to configure Samba as a primary domain controller (PDC) that my WinXP machines can log onto. I'm using Samba version 3.023 on a Mandriva 2007 server. I've configured what I believe to be the correct settings in smb.conf. On the XP machines, I have gone into the Control Panel | Administrative Tools | Local security policy and set the following to be disabled:

Under XP, I was able to successfully add the machine to my domain using the Linux root username and password. If I try to log on to the domain using the root username and password, it works. If I try logging in using one of the other usernames, I am told: The system cannot log you on due to the following error: A device attached to the system is not functioning. Please try again or consult your system administrator.

As I said, this does not happen when using root or logging on to the local machine, so I'm not sure which device is being referred to.

I have set up smbusers to compensate for my logon name, using a capital letter under Windows and not under Linux. I set up pdbedit to automatically synchronize the Linux/Samba usernames and passwords. I have included a copy of my configuration files.

Answer:

I'm afraid I cannot really answer your question simply because I'm not familiar enough with Windows. However, your Samba settings look OK to me.

You might require a Windows "Registry patch" to allow "third party software" as PDC, or a change in the "Windows Security Settings." The standard Windows error message "A device attached to the system is not functioning" is obviously not very helpful.

You might also find help at the Samba forums and documentation [10], but I guess that you already looked there.

TV Card

Question:

I have been using Linux for quite some time, and although I have the distro on my laptop working nearly 100% (Beryl included), I still have several issues I haven't managed to figure out.

My first issue is with the multimedia card reader, a Texas Instruments PCIXX21. I have looked at several sites and it seems that these issues will be resolved shortly. My main problem is my analogical and digital TV card, a PCTV Hybrid Pro Stick 330e - is it possible to make it work, and what I would need (e.g., kernel version, module, etc.).

Also, is it possible to get my PC to administer my Nokia 6630 mobile phone? I have to use Windows to get into my phone, and some forums say there is a utility to access the Symbian file system, but I'm not sure how the utility works.

Answer:

I researched the PCTV Hybrid Pro 330e and found that it is not yet supported by the em28xx kernel module in the current 2.6.21.6 kernel. However, there seems to be an experimental pre-release of a driver at Mcentral.de [11] (see the section that mentions v4l-dvb-experimental).

If you are curious and are not afraid of compiling and running new drivers, you might want to give this one a try. Or you can simply wait until the driver is included in the official kernel.

For most mobile phones, ObexFTP, which is also built into Konqueror as a plugin with obex:/address as URI, will work in a Samba-like fashion once you have a connection via Bluetooth [12], IRDA, or a serial line.

For the Nokia 6630, there seems to be support in gnokii [13], which is a graphical interface software especially for Nokia phones.

Secondary External Hard Drive

Question:

I am a new Linux user and tried to install Mandriva Linux Free 2007 Spring [4]. I have a PC with a secondary external hard drive attached. The installation options only asked whether I wanted to erase and use the entire disk or repartition.

I selected the latter and then stopped the installation.

It looked like Mandriva was going to repartition my primary hard drive, which I didn't want it to do.

How do I install Mandriva onto the secondary hard drive only, leaving the primary hard drive for Vista?

Answer:

I don't really know if the current Mandriva installer has an option for installation on a second hard drive. Linux distributions usually allow this. You could partition the second hard drive with the use of a Live CD (one Linux filesystem partition and one swap partition, the latter about 500MB to 1GB in size) and then tell the installer to just use the existing partitioning. However, the installer will have to install a master boot record on the first drive for you to be able to select the operating system to boot at run time.

Also, it is important that all drivers that access the second driver's filesystem are included in the kernel, which might not be the case; if Mandriva insists on using a partition on the first drive for the system's root filesystem, this approach will not work.

In any case, don't forget to back up all important data from all drives that will be connected during installation.

Also, the installer might use a different sequence for the discovered and displayed hard drives.

If you see an "sda" drive as "primary harddisk" and an "hda" drive as "additional harddisk," sda is actually the external disk, even if it is shown before the internal disk.

INFO
[1] CUPS: http://www.cups.org/
[2] Foomatic: http://sourceforge.net/projects/foomatic/
[3] Gutenprint: http://sourceforge.net/project/showfiles.php?group_id=1537
[4] Mandriva Linux Spring 2007: http://www.mandriva.com/en/linux/spring
[5] Knoppix: http://www.knoppix.org/
[6] XMMS: http://www.xmms.org/
[7] Kaffeine: http://hftom.free.fr/
[8] MPlayer: http://www.mplayerhq.hu/design7/news.html
[9] Goom: http://sourceforge.net/projects/goom
[10] Samba: http://www.samba.org/
[11] Mcentral.de: http://mcentral.de/wiki/index.php/Em2880
[12] Linux Magazine`s Bluetooth Hacks issue: http://www.linuxpromagazine.com/issues/2007/80
[13] Gnokii: http://www.gnokii.org/