LJ Archive

Best of Technical Support

Various

Issue #84, April 2001

Our experts answer your technical questions.

Programming with Shared Memory Segments

I have some processes that create shm segments and others that link to those segments. The problem is that some processes create shm segments with a key, but the addresses of the attachment are the same as that of previous shm segments created by other processes with different keys. —Christian Grunfeld, cgrunfeld@uolmail.com.ar

There is a good Linux shared memory tutorial at www.acm.uiuc.edu/lug/presentations/shm/shm.html. —Felipe E. Barousse Boué, fbarousse@piensa.com

Nice Keyboard, but Where Are the Accent Marks?

How do I enter a foreign/high-ISO8859 character, for instance ê, from inside an X Windows System? At a console screen, I can do Alt+237 and get that character. Various documents talk about the “Compose” key, but I'm unable to get results by following any of those instructions. —Kevin Goess, knet@goess.org

I was able, by building an .Xmodmap (notice leading dot) file, to remap all the keys in order to accept Spanish, English, Portuguese and French characters by using dead-keys, CTRL, ALT and ALTGR sequences. I will put my /usr/lib/X11/xinit/.Xmodmap on-line at http://www.piensa.com/xmodmapfile/. This file is “run” whenever X is initialized. You can run it manually with the xmodmap command. —Felipe E. Barousse Boué, fbarousse@piensa.com

A GUI utility to pick special characters is the Gnome Character Map, available at http://www.gnome.org/. —Paul Christensen, pchristensen@penguincomputing.com

Login Won't

I'm running a small home network with Linux/Win95/WinNT all coexisting. Recently, the Linux machine stopped allowing Telnet sessions or direct (text) logins on the console. I'm receiving this message: /sbin/login: /lib/libc.so.6: version `GLIBC_2.1.3' not found (required by /sbin/login)

The file /lib/libc.so.6 is linked to /lib/libc-2.1.1. Can you tell me what I am missing? —Larry Busse, ljb@one.net

It looks like you upgraded /bin/login (probably through the util-linux RPM), and you now have a dependency problem since your binary was built for glibc 2.1.3, and you have glibc 2.1.1. I'm not quite sure how the RPM was installed, considering that it should have complained due to library incompatibility. One possibility you should be looking at is that someone accessed your system without your knowledge and installed a modified /bin/login to compromise your system. If that's not the case, re-install the util-linux package that came with your RH 6.0 distribution (rpm -U --force) and you should be okay. —Marc Merlin, marc_bts@valinux.com

CD-ROM Mounts...but Where?

I'm trying to install Sun StarOffice 5.1 on my machine. I mount the CD-ROM (mount /mnt/cdrom), but when I go to the cd-rom directory (/cd) to try to see the files, nothing is there. —Luis Embalo, zulobaby@hotmail.com

Make sure you're looking in the right directory. If mount /mnt/cdrom doesn't give you any errors you should be looking in /mnt/cdrom for the contents of the CD-ROM. One thing you can try is using the mount command with no arguments. On my system it returns this line:

/dev/hdc on /mnt/cdrom type iso9660 (ro)

This tells me that my CD-ROM drive (hdc) is mounted at /mnt/cdrom. If you would like to mount your CD at /cd, try:

mount /dev/cdrom /cd
--Paul Christensen, pchristensen@penguincomputing.com

Full-Duplex or Not?

In an HP-UX system, to find out a duplex status of an Ethernet card, one simply issues a command: lanadmin -x lan0. This will report if a card is in full-duplex 100MB mode or not. I've been trying to find out for a long time what would be an equivalent of something similar in Linux but cannot find it. —Boleslaw Mynarski, bman@bolek.com

Sure, you have two of them: mii-tool and mii-diag. One place you get those from is: ftp://ftp.valinux.com/pub/support/flory/mii-tool/. —Marc Merlin, marc_bts@valinux.com

Setting up Apache jserv

I'm trying to install Apache jserv on Linux Mandrake 7.2. The installation process installs Apache for me. The path given in books and in Apache jserv documentation says the default directory is /usr/local/apache or /usr/local/src, but I don't have either directory.

I have also tried an example from the book Java Programming on Linux:

./configure --with-apache-install=/usr

--with jsdk=/usr/local/Java/JSDK2.0

It returns the error ./configure no such file or directory. Any help would be greatly appreciated. —Christopher Nallo, cnallo1@home.com

/usr/local/apache is where Apache is installed if you compile and install the application. Otherwise, it was probably installed as an RPM installation file. If you do:

rpm -qa | grep apache

you will find how many Apache components you do have installed, including which versions. If you do:

rpm -ql <apache-package>
where <apache-package> is one of the output lines of the first command, you will get the location where each file of that package was installed. Regarding ./configure you should run configure files from the directory in which they are located. You are sitting somewhere else in your directory tree, not where the configure file of the package you want to install is located. —Felipe E. Barousse Boué, fbarousse@piensa.com

Install Problems on NEC Laptop

I have been trying to install Caldera 2.3 on my laptop, an NEC Versa 4230, and have run into major problems! First, I can't get the X server up and running at any decent resolution. Second, even though I get the basic system installed and supposedly running, it will not boot; it just locks—Ed Money, edmoney@turbosport.com

If you have an old X server it will only support your chip in VGA mode, which is bad. Upgrade to XFree86 3.3.6 or better. —Marc Merlin, marc_bts@valinux.com

Check out http://www.cs.utexas.edu/users/kharker/linux-laptop/ and search for your laptop model. You'll find lots of useful notes and links from people who have made it work. —Paul Christensen, pchristensen@penguincomputing.com

X on Intel 810

I have an Intel 810 chip set with an onboard sound and graphics card. My problem is that I cannot configure X to work properly. I want to know if I can get device drivers for the above-mentioned chip set? —Ashutosh, a_m_pandey@hotmail.com

You need a fairly recent version of XFree86; 3.3.6 should work according to http://www.xfree86.org/3.3.6/RELNOTES4.html#4/. You can also upgrade to XFree86 4.0.2, which supports your chip set, too, http://www.xfree86.org/4.0.2/RELNOTES3.html#8/. —Marc Merlin, marc_bts@valinux.com

Blanking in VTs

After a period of inactivity, my terminal blanks. For various reasons, this is less than desirable. How can I extend the timeout or disable the blanking? I am not in X, but at the 80 x 25 screen. —Garth, garthb@digitalwave.com

The command you're looking for is setterm. The format is simple:

setterm -blank 10

This will give you 10 minutes of terminal inactivity before the screen goes blank; 0 (off) to 60 is valid. If you add

setterm -powerseve powerdown
your monitor will actually go into sleep mode to conserve energy. —Paul Christensen, pchristensen@penguincomputing.com

Using a Parallel-Port Zip Drive

I want to be able to access my Iomega ZIP250 parallel drive. —Mark Adams, mradams@accusys.com

This drive uses a module called imm. At the command line, while logged in as root, type modprobe imm. This will load the module. Create a mount point after that: mkdir /mnt/zip. Then you need to mount the drive: mount /dev/sd[x]4 -t vfat /mnt/zip, [x] being the next available SCSI drive letter i.e., if you have an SCSI hard drive or CD-ROM, it will be /dev/sda, and your ZIP will be /dev/sdb4. The 4 means the partition number, which is always 4 for the preformatted ZIP disk. To make it permanently load at boot, do the following:

echo modprobe [module] >> /etc/rc.d/rc.local

Also, you should create a mount point for it in /etc/fstab:

/dev/sd[x]4   /mnt/zip    auto    defaults    0 0
--Garrett Mickelson, gmickelson@penguincomputing.com

Moving from Microsoft to MySQL on Debian

I'm wondering about the best way to transfer the content (text and graphic files) of an SQL 7.0 database (running on NT Server) into a MySQL database running on Debian GNU/Linux. A related question is how to best migrate ASP pages to a Debian (or other version) Linux platform. Your guidance is greatly appreciated. —Carl Lawson, lawson@oz.net

First off, moving one database to another is not a trivial task. It's like porting a program from one platform to another, there are implementation-specific issues to consider. For example, MySQL does not support some SQL features that Microsoft SQL Server does. The easiest way to port this would be to dump the contents of the SQL Server database to a text file, re-create the tables in MySQL and then use the mysqlimport command to read the data into your new database. Another option would be to move the data programmatically, using Perl or Java with ODBC. This would allow you to validate or manipulate the data before inserting it. As for ASP, install Apache with mod_perl support and then install the ASP module. For more information and downloads, go to http://www.nodeworks.com/asp/. —Paul Christensen, pchristensen@penguincomputing.com

LJ Archive