Issue #1 November 2004

Tips & Tricks

Is there any way to speed up my display while using remote X servers or VNC?

With standard GNOME or KDE settings the screen is constantly refreshed when windows are dragged around the screen. This causes a lot of graphics data to be sent over the network which can be problematic over a slow network connection. It can also cause problems where windows in the background are not properly redrawn. To fix these problems, GNOME or KDE can be configured for decreased graphical complexity by using wireframe dragging for windows. This prevents screen refreshes until the window is released. The required settings are not global, so each user wanting to use reduced graphical complexity needs to perform this procedure. Here are the steps to follow to for GNOME or KDE:


Open a terminal window and run the command gconf-editor. When the GConf editor window appears, open the apps folder, then the metacity folder and finally click on the general folder. Find the variable called reduced_resources and click the check box next to it. This enables wireframe dragging and prevent screen updates until the window is released. Changes take effect immediately so after checking this box the GConf editor window may be closed.


Open a terminal window and run the command kcontrol. When the KDE Control Center window appears, click the "+" symbol next to the Desktop menu item to expand it. Then click the Window behavior menu item. Under the Moving tab, uncheck the options Display content in moving windows, Display content in resizing windows, and Animate minimize and restore. Click Apply to apply changes, and close the KDE Control Center.

How can I delete files with weird characters in the filename?

It is possible to create files with control characters or characters which are unable to be input on a keyboard. The simplest method for deleting them is to use the Nautilus file manager to browse to its location, highlight the file, then press the delete key.

If graphical access is not available to this machine or the file is not owned by a normal user, the solution to this problem is to find the "inode" number of the file then delete this file using that number.

Each file on a disk has an inode number. However, a file can be addressed using a symbolic link. To erase a file, all symbolic links must also be removed.

The first step is to find the inode number for the offending file. The inode number of any file can be found by running the command ls -i1 in the directory in which the offending file exists.

For example:

# ls -i1

 622769 mygraphic.svg
4882544 anotherfile.txt
4882548 annual-report.gmc
4489301 -^H[[ac

The offending file in this circumstance has an inode number of 4489301.

Using the find command in the same directory modify the command below, replacing 4489301 with the inode number of the file from the ls command.

find . -inum 4489301 -ok rm '{}' ;

You should then be asked to confirm the removal of the file.

< rm ... ./nsmail.html > ?

Press Y to confirm removal of the file.

What is the alternatives system and how do I configure it?

The alternatives system is used to automatically maintain symbolic links to binary files on a priority based system. This eliminates having complex path variables and having to put all the binary files in the /usr/bin/ directory. For example:

/usr/bin/java -> /etc/alternatives/java -> /path-to-binary-files

This configuration adds a layer of abstraction so you can update, switch versions, and/or switch vendors with out breaking applications. When these binary files are installed via RPM each one has a default priority associated with it based on information about the program like version and release number. The alternatives system determines which program has the highest priority and assign it the master link, usually in /usr/bin/.

To see a list of alternatives for a given link group, you can use the --display option. The following example shows all the alternatives for Java:

/usr/sbin/alternatives --display java 

If the default is not desirable, then you can manually set the symlinks to a lower-priority alternative:

/usr/sbin/alternatives --set java /usr/lib/jvm/jre-1.4.1-ibm/bin/java 

You can reset to the highest-priority alternative with --auto:

/usr/sbin/alternatives --auto java

More information can be found in the man page for alternatives(8) using the man alternatives command.

I made some changes to my /etc/inittab file. How can I make those changes effective without rebooting?

To make changes to the /etc/inittab effective without a reboot, issue either of these two commands as the root user:

init q
telinit q

The init q or telinit q command wakes up init and tells it to re-examine the /etc/inittab file so changes to the file are effective immediately.

How do I view the perl or cgi errors in a browser?

You can insert the use CGI::Carp qw(fatalsToBrowser); line in your script to get your error messages to show up in your browser window instead of having to check your error log all the time.

Add the following two lines after the Shebang line (usually: #!/usr/bin/perl) in your script:

use CGI; 
use CGI::Carp qw(warningsToBrowser fatalsToBrowser); 

When you execute the script from the browser, it should generate any error messages in the browser display. Also be sure that the script does not send any header information before the print "Content-type text/html" line.

Note: This will not work if CGI::Carp module is not install with Perl. RPM for CGI::carp can be found at sites like

How do I prevent the reuse of old passwords?

The PAM module can be configured to maintain a list of old passwords for every user prohibiting the reuse of old passwords. The list is located in the /etc/security/opasswd file. This is not a plain text file, but it should be protected the same as the /etc/shadow file. This is normally referred to as password history.

To remember the last 15 passwords, add the line below to the /etc/pam.d/system-auth file:

password   sufficient   /lib/security/ use_authtok md5 shadow remember=15

You can replace the number 15 used above with an integer you want, to enforce your password security policy.

How can I reduce the amount of resources used by Metacity?

GNOME uses the Metacity window manager, which can be tuned to minimize the amount of resources that it uses. This can be useful to allow GNOME to run smoother on older machines or to correct misbehaving applications.

You can configure Metacity to use this mode by running the following command as the user that is running the current X session:

gconftool-2 --type bool --set /apps/metacity/general/reduced_resources true

These changes should take place immediately, you can test that it is working by resizing a window. Notice that a wireframe model of the window is now visible.

You can reset this behavior back to default by issuing the following command:

gconftool-2 --type bool --set /apps/metacity/general/reduced_resources false

This article is protected by the Open Publication License, V1.0 or later. Copyright © 2004 by Red Hat, Inc.

For more tips & tricks check out the Red Hat Knowledgebase.