May 17, 2007

SolutionBase: GUI replacements for Linux command line tools by Jack Wallen Many have shied away from Linux in fear of having to use the command line mode. To dissuade those reservations, the open source community has created GUI tools for nearly every command line application known. This article will introduce you to the tools that will get your desktop and server PCs running smoothly.

Author's note For the purposes of this article, I’ll be looking at the GUI configuration tools available in Mandriva. Most of the tools can also be found in other Linux distributions, but the screens make look different or be found in different locations. This article will serve to point you in the general direction, but double-check your specific distribution to find the exact tools.

Network configuration Once upon a time, you had to edit a ton of scripts to get a network connection up and running. Remember the days of chap-secrets, pap-secrets? Those days are mostly gone. Now, Fedora Linux network connections are configured, effortlessly, with a tool called system-config-network. You’ll open the tool as the root user from the System menu. The exact menu entry you’ll use will depend on which desktop environment you are running, and the version of that environment. Once the tool is opened, you will see a window similar to that in Figure A. From this window, you can begin to configure any number of networking settings. Let's walk through the various windows and configurations.

Figure A

You can administer network settings from here.

Press the Edit button from the Devices tab; you will be able to edit the settings for your Ethernet device from there, as seen in Figure B.

Figure B

This is where you edit settings for your Ethernet device.

From within this main sub-window, you can edit the primary settings of the device. These configurations include: • • • • •

Nickname Activate when computer starts Enable Ipv6 Device address MTU speed

On the Route tab (shown in Figure C), you can add, edit, and delete routes to other hosts. From within this tab, you can create static routes to different hosts. Figure C

The Route tab controls routes to other hosts.

The last tab in the device window is the Hardware Device tab. This tab (shown in Figure D) allows you to give the device an alias number as well as set the MAC address for the device. There is a probe option for the MAC address (in the event the MAC address is overwritten).

Figure D

This tab lists the hardware settings for your NIC.

From the main window, press Hardware | Edit. The window that opens allows you to configure the network adapter resources, as seen in Figure E. From this window, you can configure the following: • • • • • • •

IRQ MEM IO IO1 IO2 DMA0 DMA1

Figure E

You can fine-tune NIC settings here.

If you press Add under this window, you will be allowed to configure a new device. Choose from the following types: • • • • •

Wireless Ethernet Modem ISDN Token Ring

The next tab, IPsec, allows you to configure IPsec tunnels on your system. Press New to be walked through a setup wizard. This wizard is incredibly simple to use (the tool will even generate a key pair for you) and will easily walk you through setup. The DNS tab is fairly self-explanatory; the Hosts tab edits your /etc/hosts file.

system-control-network Another useful tool is the system-control-network tool. This tool allows you to activate, deactivate, and configure network devices. Open this tool and all your configured network devices will show up in a list. Click on any given device, and you can activate or deactivate that device. If you highlight a device and click Configure, it will open up the system-configure-network tool.

MCC (or PCLinuxOS Control Center) The Mandriva Control Center (MCC) – or, in my case, the PCLinuxOS Control Center -is one of the more amazing tools I've seen. When you open up this tool, click on the Network And Internet tab (in PCLinuxOS, press the Configure Your Computerbutton on the KDE panel) and you will see the abundance of configuration options available, as shown in Figure F. Figure F

The Control Center has lots of options.

One of my more recent dealings with this tool was while writing an article about Linux and wireless networking. After spending a good amount of time getting a wireless device working with ndiswrapper, I decided to fire up mmc to see what would happen. Roughly two minutes later, I had a wireless connection up and running. Needless to say, mmc won me over rather quickly. What I really like about this tool is that it serves as a one-stop shop for nearly all of your networking needs. From setting up a network device, to monitoring that device, to NAT: mcc does it all.

Printing Another important arena for IT administrators is printer configuration. Linux has some outstanding tools for the job. The first tool is system-config-printer. When you first open up this tool, you will be greeted by the main window, as seen in Figure G. From that

window, you will see a list of available printers. If there are none, you will have to add a new printer with the New Printer button. Figure G

You have graphical options for configuring printing.

If a printer is already available (recognized and set up at installation via HAL), you can click on it to edit the printers' configuration, as shown in Figure H. Figure H

After selecting a printer, you can make changes to its configuration.

There are quite a few settings that are controlled from the Print tool. This tool goes well beyond the proprietary Windows printer driver software included with most printers. From within this tool, you can connect to printer servers, control access to a local printer (when that printer is acting as a shared printer), edit printing policies, or set up classes of printers (i.e., color or laser printers, or classes based on departments). If you're looking to use a printer on a Linux desktop served up from a remote Linux printer server, you might want to look into the MCC (as mentioned above). The printer setup section is found in the Hardware tab of the control center, as shown in Figure I. Figure I

Use the Setup Printers button to modify printer settings.

To set up a remote printer from within the mmc tool, press the small red circle with the wrench in the middle. This will open up the CUPS configuration tool, shown in Figure J.

Figure J

You can set up remote printers using CUPS.

Press the Remote CUPS Server And No Local CUPS Daemon button to open up a new window. You'll then see the screen shown in Figure K. Figure K

Enter CUPS specific settings here.

Press On and configure the IP address (or host name) of the remote printer; press OK. If the remote printer server is configured properly, mmc will see the printer and set it up ready for printing.

Services The next configuration I would like to introduce is the services configuration. A Linux administrator used to open up individual files in /etc/rc.d/init.d and set them to start at boot. Those days are long gone with the help of the system-config-services tool. When you open this tool, you will be greeted with a window similar to Figure L. Figure L

Here you enable and disable services that are running on your workstation.

In the bottom left window, you can scroll through every available service. If you want to set that service up to start at boot, select the check-box next to it. If you want to stop that service from being started at boot, uncheck its box. Pay close attention to what you have started at boot. Combing through these services can aid boot time of your servers and desktop machines. Another nice feature of this tool is that it will allow you to edit the runlevel of the machine. Before, you would have to open up the /etc/inittab file and edit the line: id:3:initdefault:

to change the runlevel to either 3 (text based login) or 5 (graphical login). From the system-config-services main window, select the run level you want from the Edit

Runlevel drop-down menu. You must save any changes that are made, or your changes will not come into play. A nice feature included with the save is the ability to revert to last save. This could help you out in a bind if you forget which services you have changed or need.

Users Remember the good old days of useradd? Those days have been long gone for a long time. The system-config-users tool allows you to add/edit/remove users and add/edit/remove groups. This tool does everything the old command line tool did without the hassle of having to remember all the necessary switches and flags. Need to set an expiration date for a password? It's simple: Open up the user for editing (double-click on the username), press Password Info | Enable Password Expiration, and enter the necessary information.

Security The system-config-security tool allows you to edit both the firewall settings and the SELinux settings. Check out Figure M to see the main settings window. Figure M

You can edit firewall settings here

The first thing you will notice is you can either enable or disable the firewall. If you enable the firewall, you can choose which services you wish to allow through the firewall.

The next tab is SELinux, which allows you to change your SELinux settings. Please use this with caution: If you make changes to your SELinux settings, the system will have to re-label the entire file system on the next boot, as shown in Figure N. Figure N

Firewall changes take place after reboot.

Authentication The last tool we'll discuss is used to configure system authentication. From this tool, seen in Figure O, you can configure the following: • • •

User Information via NIS, LDAP, Hesiod, Winbind Authentication via Kerberos, LDAP, Smart Card, Samba, Winbind Options (cache information, use shadow passwords, use MD5 passwords, local authorization, authenticate via network services) Figure O

This screen controls how users authenticate to the system.

For example, let's say you wanted to configure authentication via Kerberos. Press Authentication, check Enable Kerberos Support, press Configure Kerberos, and enter the required information in the new window shown in Figure P. Figure P

Here's how you enable Kerberos support.

Final thoughts Although many of us will always frequent the command line, it's a tool that often scares a new Linux admin away. It's good for newbies that the open source community has recognized this and created GUI front ends for all those necessary tasks. Although this is not an exhaustive list of tools (or an exhaustive look at each tool), this article serves as a reference point to offer hope to all those administrators new to the Linux OS.