Tips on Adding Ethernet Cards, Image Editors, and How to Shut Down and Reboot

The Linux world is full of good graphical-editing and image-manipulation programs. One is the excellent xv, a program that lets you read and write several image file formats, capture screenshots, and perform other basic image operations. Electric Eyes ships with GNOME, and this one is pretty sharp too. It handles file exporting and has some nice integrated tools.


What’s the best way to edit a .gif file in Linux? – Curious Web Artist

Tech Support Gimp
The GIMP Is Great: The very popular graphics program is ideal for scanners, too.

The Linux world is full of good graphical-editing and image-manipulation programs. One is the excellent xv, a program that lets you read and write several image file formats, capture screenshots, and perform other basic image operations. Electric Eyes ships with GNOME, and this one is pretty sharp too. It handles file exporting and has some nice integrated tools.

If you’re looking to do more than basic image editing, however, the best program is the GIMP (GNU Image Manipulation Program). The GIMP is simply a great program; its design and execution really show the strength of the Linux platform.

Many third-party developers have been attracted to Linux because of the GIMP, resulting in some pretty amazing extensions to it. One of these is SANE, a scanner plug-in This lets you scan an image directly into the GIMP, where you can tweak it as you wish.

2I am running Linux on a
four-processor box with a RAID
controller. When I try to do a shutdown and reboot (shutdown -r -y 0), the system returns this:

Turning off swap & acct.
unmounting file systems
Please stand by while
rebooting the system
Stopping all nd devices
Restarting system
disabling symmetric IO mode….done

It never reboots. I’m worried that I won’t be able to reboot remotely. – Worried about Reboots

Your shutdown command doesn’t have a valid -y parameter. If you wish to reboot the machine immediately, the command you may wish to use is shutdown -r now.

Below I have listed the standard syntax that is used for the shutdown command:

/sbin/shutdown [-t sec]
[-rkhncfF] time

To halt the machine immediately, you can use shutdown -h now. The next option that might help you with your problem is the ability for the shutdown command to use a specific time delay that is defined with the -t option. I have listed an example below:

/sbin/shutdown -t10 -r now

This tells init to wait a certain amount of seconds (here 10 seconds) between sending processes the warning and the kill signal along with the signal to change to another runlevel. There are other options that can give even more flexibility with this command. Table One (above) shows some of the options not discussed in this article, but which you may want to use with the shutdown command.

Table One: Shutdown Options

-kDon’t really shut down; only send the warning messages to everybody.
-rReboot after shutdown.
-hHalt after shutdown.
-n[DEPRECATED] Don’t call init(8) to do the shutdown but do it ourselves. The use of this option is discouraged, and its results are not always what you’d expect.
-fSkip fsck on reboot.
-FForce fsck on reboot.
-cCancel an already running shutdown. With this option it is of course not possible to give the time argument, but you can enter an explanatory message on the command line that will be sent to all users.
TimeWhen to shut down.


I have two Ethernet cards, a 3Com Elink III 3C509 and a Netgear FA310TX (PCI 10/100). Linux found one card in my system, but I don’t know which; it just says it’s the en0 card. How do I know which it sees, and how do I get it to see both? – Matt

We should figure out which Ethernet card is being identified by the system. This can be done with the dmesg command, which prints the kernel boot message. Enter:

dmesg | more

Now what you are looking for is the actual en0 (en0 is the Debian name; in Red Hat, it would be eth0) message. This will identify what card your kernel is seeing. Listing One shows how my computer identifies my en0.

Listing One: Identifying an Ethernet card in dmesg

  3c59x.c:v0.99H 11/17/98 Donald Becker
eth0: 3Com 3c905B Cyclone 100baseTx at 0xdc00,00:c0:4f:6b:9f:49,IRQ 14

Here, you can see my en0 device is a 3Com 3c905B card. Of course, Matt will see either the 3Com Elink III 3C509 showing up as a 3c509, or Netgear FA310TX (PCI 10/100) showing up as a tulip driver.

Now to get that second card to show up. There are two files you should know about. The first is /etc/modules. conf. This configuration file determines what kernel modules are loaded when the machine is booted up. It will look something like Listing Two.

Listing Two: A Snippet from the /etc/module/conf File

  alias scsi_hostadapter aic7xxx
alias en0 3c59x
alias parport_lowlevel parport_pc
pre-install pcmcia_core /etc/rc.d/init.d/pcmcia start

So to add the second Ethernet card, you will have to create the alias for it within this file. You would add an entry that looks like this after the alias en03c59x line in my example:

alias en1 tulip

Here en1 refers to your second Ethernet card and tulip is the name of the Netgear driver. Now, go ahead and save the file and you will have fixed half the problem. You might want to ensure that you have the modules already compiled into modules at this point. So at the command line, you will have to cd into the /lib/modules/2.2.x/ net/ directory, look through the list of modules, and make sure you see that the tulip.o and the 3c59x.o modules are listed. If they’re not, you will have to recompile the kernel.

The next step is to define your en1 device. (This is your second Ethernet card). You need to tell the system how it should be defined and what IP address will be assigned to it. This is done through the /etc/init.d/network script. Listing Three shows an example of a file on a Debian or Corel Linux system.

Listing Three: The /etc/init.d/network Script

  #! /bin/sh
ifconfig lo
route add -net
ifconfig en0 x.x.x.x (IP address for this adapter)
route add -net x.x.x.x (This is where you will add your
default gateway IP address)
ifconfig en1 x.x.x.x (IP address for this adapter)
route add -net x.x.x.x (Default GW)

Now, once these two issues have been addressed, you will likely be able to get the two cards to work. You will also have to make sure that routes in your routing table are correct after you get both cards recognized. (You do this with the route command). You can also use the ping utility to determine if the card itself is actually working and receiving packets.

App Tips

* AbiWord: After writing my last column, I was e-mailed a document whose filename ended with the suffix .abw. Turns out this is the format of the open source word processor, AbiWord. I downloaded it and now
I’m a convert. This app has potential. http://www.abiword.com

* J-Pilot: Since I have a Palm V, I’ve been trying to find an application with an equivalent functional desktop application that I can use in Linux that can help keep me organized and in sync with all of my responsibilities. J-Pilot can sync PalmPilot data with ease, and it also helps me add data via my computer, instead of trying to handwrite everything with the Palmstylus. I am very happy with this package. http://jpilot.linuxbox.com

* iplog 2.1.1: After a friend of mine got broken into via his DSL connection at home, I decided to help him add more logging to his machine. I tested this application and it helped me set up a better tracking system for various types of traffic like UDP, ICMP, and TCP. It also includes packet filtering and detection for security purposes, in case someone tries another attack. http://download.sourceforge.net/ojnk/iplog-2.1.1.tar.gz

Gaylen Brown is a senior consultant at Linuxcare, Inc. He can be reached at tech@linux-mag.com.

Comments are closed.