Tool tests on the fast track
Tool review: Dialog 0.7, virtenv 0.8.6, collectd 5.4.0, convmv 1.15, Drukkar 1.11, and ngIRCd 20.3.
Function: User Interfaces to Shell Scripts
Alternatives: Zenity, Xdialog
Adding graphical dialogs to your own shell scripts is not rocket science. With a tool like Dialog, users can quickly put together an intuitive, straightforward window for user queries. The return values then determine the future course of the script. The C program uses ncurses and thus does not require an X server. Users can control the tool with command-line parameters, thus modifying the appearance and content.
More than 20 different types of dialogs are available, including simple notification boxes, file selection dialogs, and password requests. Since I last took a look at the tool six years ago, the developers have been busy fixing numerous bugs and implementing many new features. For example, the types known from Xdialog
treeview were added; the makers also adopted the
--output-separator options. A new feature,
--prgbox, shows output from external programs in the ncurses interface, and
--programbox offers an alternative: Pipes let users embed the output from shell commands.
More new features, such as
--extra-button, allow users to customize the controls in the interface to suit their own needs. The
--default-button parameter defines a standard choice for the respective window. An upgrade to the current version of Dialog is definitely worthwhile.
Dialog is ncurses-based, does not require an active X server, and is thus quite frugal. Ideal for use in scripts, such as with SSH for remote maintenance.
Function: Graphical LXC Management
Alternatives: lxc-provider, virt-manager
The Linux Containers (LXC) virtualization solution has been an integral part of the kernel since 2.6.29. It supports both simple application containers and system containers – even for other distributions. The virtenv Qt4 program provides a graphical interface to help users create LXC environments step by step. Source code and packages for Debian and Ubuntu (64-bit) are available from the project website.
virtenv launches a wizard that displays the existing virtenv machines in the initial dialog. Clicking on an entry starts the VM. Alternatively, users can enter a new name and press Next. In the next step, the tool asks for the resolution if a graphical environment and an X server are required.
If you want the machine be networked, you also need to enter the IP address and gateway in the interface. Virtenv creates up to four interfaces. If the user has chosen an X server, the Openbox window manager then launches in a Xephyr server session.
The tool stores all its configuration files in the
~/.virtenv folder. The program mounts the root directory in the respective
rootdir on starting the virtual environment using copy-on-write. Root privileges are thus required to start a VM.
Virtenv lets users create Linux container environments in a few steps. Because these environments are mutually firewalled, the tool is ideal for quickly generating test systems and sandboxes.
Function: Collecting and Processing System Data
Alternatives: RRDutil, EcoStats
As the name suggests, this daemon collects data relating to system performance and passes it to the RRD tool for further processing. Data acquisition relies on plugins. Collectd has about 90 of these on offer (e.g., for Apache, Bind, iptables, Nginx, MySQL, PostgreSQL, and Oracle). Experienced developers can optionally use their own plugins; implementations in C, Java, Perl, or Python are possible according to the wiki on the project website.
The user specifies the services and resources to be monitored by collectd in the
/etc/collectd.conf configuration file. To enable a plugin, you need to first load it and then describe its configuration. Depending on the module, you need to define directories, ports, or thresholds. The C program stores the acquired data in RRD format. A corresponding RRD Tool front end generates meaningful and visually appealing graphs, whereas collectd itself only acquires data and does not dabble in drawing.
The tool can optionally save information in CSV format, which is useful if users want to process data automatically before visualization. In larger infrastructures, it is possible to link several collectd instances. A simple guide to this is available from the project wiki.
Collectd is a powerful service that reliably collects system data. Because of its plugin structure, users can customize and adapt the tool to reflect their own requirements.
Function: Converting File and Directory Names
Alternatives: rename, iconv
If you find yourself struggling with different character sets, help is at hand with convmv, a tool that converts the encoding of file and directory names and can even rename entire folder hierarchies, keeping the content as is. The Perl script also takes care of symlinks, resolving and converting the pointers where appropriate.
The current version of convmv supports 124 character sets. Called with the
--list option, it writes all its known encodings to standard output. To convert something, users add the current character set with the
-f option and a required new character set with the
-t option. If you want the tool to work recursively, add
-r. To adjust the spelling of the name in the same step, users optionally stipulate
--upper; the tool then converts file names to lowercase or uppercase.
The Perl script has several built-in safeguards. Before transforming, it checks to see that the file already exists in the desired coding and stops, if appropriate. The
--nosmart option lets you disable this check. By default, convmv also works in test mode and only details imminent changes; to perform the changes, users need to launch the tool with the
Convmv is a practical tool for correcting non-standard characters in file and directory names. Operations are intuitive, and the default test mode prevents damage that could result from hasty actions.
Function: Compact Blog Engine
Drukkar is a sleek blog and CMS program implemented in PHP 5 with no other dependencies. The compact engine requires very little in terms of system resources, saves all articles as XML files, and does not require a database back end. The software supports the Markdown simplified markup language and generates valid HTML.
The configuration file is in XML format. After unpacking the archive, users define the blog name and the URL in the
config.xml file, as well as the directories for posts and uploads. The configuration file also contains the salted password hash. User can change the default password and the salt value with the
makepass.php script. On our lab, this did not work; as a workaround you can call the hash_with_salt function manually in a simple PHP script at the command line and add the generated password manually to the config.xml by hand.
To write a new article, call the
edit.php script in the browser. After you enter the password, a form appears with boxes for the title and text. Drukkar understands tags and lets you add additional files, such as images or multimedia content. The
files.php script manages completed blog posts and uploaded files and provides functions for deleting, renaming, and uploading. Drukkar can also create RSS news feeds, using the
A small blog can be set up with Drukkar in next to no time. You will want to change the default password before publishing – manually, if necessary.
Function: Portable IRC Server
Alternatives: WeIRCd, RageIRCd
Linux certainly has no shortage of IRC servers. The Next Generation IRC Daemon (ngIRCd) stands out from the crowd and is not based on the original IRCd. The portable and lightweight server for Internet Relay Chat is particularly useful for small or private networks. It can be quickly configured and is capable of handling dynamic IP addresses; it supports IPv6, SSL encryption, and PAM authentication.
ngircd.conf setup file is clear-cut and easy to understand. The source archive contains some examples that can act as a template. The file is divided into configuration sections
[Global], users define the server name, the ports, and the interfaces on which the daemon accepts connections. The
[Limits] section limits the number of connections, nick lengths, and other things.
[Options] contains general settings for chroot or DNS lookups. Users can also specify here whether the IRC server uses IPv4 or IPv6. Settings for secure communication are located in the
[SSL] section. The
-t flag lets you check the configuration file for syntax errors. Other call parameters prevent configured, automatic links to other IRC servers and keep ngIRCd in the foreground for troubleshooting.
ngIRCd is a clear-cut, lean IRC server that provides all the important features. The daemon copes well with dynamic IP addresses, making it particularly suitable for ad hoc installations.
Buy this article as PDF
MSBuild is now just another GitHub project as Redmond continues its path to the light.
Malware could pass data and commands between disconnected computers without leaving a trace on the network.
New rules emphasize collegiality in coding.
Upstart lands in the dust bin as a new era begins for Linux.
HP's annual Cyber Risk report offers a bleak look at the state of IT.
But what do the big numbers really mean?
.NET Core execution engine is the basis for cross-platform .NET implementations.
The Xnote trojan hides itself on the target system and will launch a variety of attacks on command.
Spammers go low-volume, and 90% of IE browsers are unpatched.
Adobe scrambles to release patches for vulnerable Flash Player.