Adding or removing font paths from X
You can edit the XF86Config file to add or remove your font paths. You can do the same while working in X, using the xset command. Use the command ‘xset +fp,fp+,fp- fontpath’. Here, the plus sign before fp adds the new font path before the current path. The plus sign after fp appends the font path. Similarly, the minus sign removes the specified font path. For instance, xset +fp /usr/X11R6/lib/fonts/truetype will add the truetype directory fonts before the existing selection.
Shutting down from a desktop environment
Even within the desktop environment, you can use the terminal window or console for shutting down or restarting. Open a terminal emulation window and type shutdown -r or shutdown -h to reboot or shutdown your system, respectively. You will have to enter your password in the dialog box. Note: this will close all running applications, and you will not have the option of saving your work or the session.
Killing an X session
It’s possible that a KDE or Gnome session might crash. In such cases, you can kill the X session and get the login prompt, by using the [Ctrl] + [Alt] + [Backspace] keys. Make sure you save your work before doing this.
Copy-paste in terminal window
To copy-paste text with the mouse, you need to have gpm installed. You can then highlight the text with the mouse, move the cursor to the desired location and use the centre-button to paste the text. If you don’t feel like using the mouse, you can always use [Shift] + [Insert] to paste the text.
Optimising terminal emulators
Most of us don’t really bother about which terminal emulator we have. We generally end up using the default xterm, which is standard with most distributions. But, in case you have a slow video card, rxvt is a better option-xterm contains legacy codes, and seems unduly bloated for a simple terminal emulator, as it also has the capability to emulate graphical modes, which are rarely used. So you should switch to rxvt, which also has some features, such as pixmap backgrounds and a better scrollbar. You can use the pixmap option on the command line to any .xpm format picture in the background, and without hogging system resources.
Sound and mouse configuration
You can disable the terminal bell in X, by running the command xset -b. You can also specify settings for the bell with this command line. For instance, xset b 50 500 5 would change the setting of the bell to 50 per cent of the original volume at 500 Hz for 5 milliseconds. A similar tool known as gxset is available with a GUI interface, which also allows you to modify mouse acceleration features.
Command line tools
There are some nifty command line tools that let you better your X experience.
- Xfig: Xfig is a vector drawing program that can be quite useful for charts and documentation.
- xfontsel: xfontsel is a font selection utility for X.
- xterm: You can use the command ‘xterm -fn xfontsel -print &’, to choose a font in which to open the xterm window.
- xmag: xmag acts like a magnifying glass in X, and sports some other cool features too.
- xmodmap: xmodmap allows you to edit and display the keyboard modifier map and keymap table.
- xsetroot: With xsetroot you can change the colour of your desktop, and it can work in conjunction with a colour selector tool, such as xcolorsel.
- xcolorsel: xcolorsel will allow you to select the colour, and set your desktop to that colour.
- xwininfo: Run xwininfo and then click on any window to get additional information.
Combating spam with KMail Bounce feature
Most e-mail clients tend to have filter rules for combating spam, but quite often these filters are useless, and you are bombarded with spam. KMail uses quite a different feature to combat spam mail. It uses a feature known as Bounce. When you receive a spam mail, you can opt to send a reply to the spammer with the subject ‘mail not delivered’, because of different reasons. The reasoning is that the spam list will automatically remove you from the list, when it gets a ‘mail not delivered’ message. To access this feature, go to the Message options in the KMail toolbar.
Automatically checking e-mail
Instead of constantly running Netscape Mail or KMail, you can use the mailcheck applet to notify you of new e-mail. Right click on the Gnome panel, and choose to Add applet > Network > Mailcheck. Click the middle mouse button to access the mailcheck properties. The Execute option runs a program before checking for new e-mail. Using the Execute option, you can specify the program that receives control of execution, when new e-mail arrives. You can specify the time lapse before checking for e-mail, and also what pre-defined sounds or animations to play, when e-mail arrives. The mailbox option is where you enter the details of your POP3/IMAP account, such as the username, password and servers.
Making Konqueror assume Netscape’s role
Many sites check the browser you are using and render pages accordingly. You can set Konqueror to appear as Netscape to such sites. For this, open the KDE Control Center, go to Web Browsing > User Agent, and add the desired user agent.
Running Java applets in Konqueror
To run Java applets within Konqueror, go to Settings > Configure Konqueror > Konqueror Browser, and select to run Java applets.
Download managers for X
You can use download managers, such as WebDownloader, with your browser. This program can automatically download almost everything, is much faster and stable. All you have to do is paste the download link in WebDownloader. It also has the ability to resume downloads..
Faster Web browsing
Browsing is much faster when you use IPs, instead of domain names. Linux has several methods of converting IPs and domain names, and the most common is the /etc/hosts file that contains the IP address and the corresponding domain name. The best thing to do is to install a DNS server on your machine. But, even without the DNS server, the /etc/hosts file helps, as your system will check this file first for known domain names to IP address resolution. Editing this file is quite simple; all you have to do is add the IP address, domain name and any aliases. You can also use a script that will automate the adding of addresses to the /etc/hosts file. Use the following command: ‘!/bin/bash HOST=”$1″ IP=$(host “$1″ | cut -f3 | head -1) ALIAS=”$2” echo “$IP” “$HOST” “$ALIAS” > > /etc/hosts.’ You can invoke this by using the domain name, and an alias if you want. For example, ./hostit thinkdigit.com d, will add the site www.thinkdigit.com with the alias ‘d’.
Ripping CDs to your hard disk
A very efficient tool for extracting songs from audio CDs, transferring them to your hard disk or converting them to MP3s, is grip-available for download from www.nostatic.org/grip. grip is based on GTK, and can also be used as a CD-player. It provides an interface, with which you can directly convert extracted audio to MP3.
For these purposes you might want to use a free encoder, such as bladeenc-check out http://bladeenc.mp3.no/-that uses similar compression routines to mpegEnc.
Open grip and select the Config > MP3 option, and point the encoder to bladeenc. Start the extraction process and you have your MP3s. grip has the ripping capabilities of cdparanoia built-in, and also facilitates the use of other external rippers.
Playing Ogg Vorbis files
If you think MP3 is passé, and Ogg Vorbis is in, you definitely want support for this format. You can install plugins and libraries for Linux, which will allow xmms to play Ogg Vorbis files. Alternately, you can download FreeAMP 2.1, which has built-in support for Ogg Vorbis-download it from www.freeamp.org. Before playing Ogg Vorbis files though, you need to ensure that certain libraries are installed. You can find the libraries from the official Ogg Vorbis site, www.vorbis.com.
Converting MP3/Ogg Vorbis files to Wav
You can use FreeAMP to convert MP3/Ogg Vorbis files to Wav, using the WaveoutPMO output plugin. You will have to select the plugin from the Plugins panel, in the Options menu. So, whenever you play an MP3 file, after selecting the WaveoutPMO plugin, the song is automatically decoded to the Wav format, in the MyMusic directory.
Creating a playlist of all MP3s
Instead of adding individual MP3 files to the playlist in xmms, you can just add MP3s. A simple method is to use the command locate .mp3 > /path/to/playlistname. If you want to make a playlist of all the MP3 songs on a CD, you can use the command /mnt/cdrom -name *.mp3 -print >> allthesongs.list. Here a file called allthesongs.list is created that acts as a playlist for xmms or even x11amp.
Playing DivX with xmms-I
Installing the DivX 3.11 alpha codec for xmms tends to be a problem. To ease your task, this is the step-by-step method to install the DivX Codec.
First, download and install RPMs from following locations: www.xmms.org/files/1.2.x/rpm/rh7.x/xmms-1.2.5-1.i386.rpm & xmms-devel-1.2.5-1.i386.rpm
ftp://ftp.rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/glib-1.2.9-1.i386.rpm, glib-devel-1.2.9-1.i386.rpm, SDL-1.1.7-3.i386.rpm, SDL-devel-1.1.7-3.i386.rpm
To install an rpm, type rpm ?i xxxxx.rpm, where xxxxx.rpm is the RPM file you downloaded. If you are in terminal mode, you need to just type the above command at the prompt itself. Make sure that you are in the same directory as the files that you have downloaded, before you have given the command. In case you are in the GUI mode, then you need to go to a console or terminal window, and type the above command.
Now, get the AVI plugins for xmms from http://www.xmms.org/files/plugins/avi-xmms/avi-xmms-1.2.2.tar.gz.
Changing the default desktop environment
If you have both KDE and Gnome desktops, then switching desktops is easy. The simplest method is to run the command ‘switchdesk’, from the terminal window. It not only allows you to switch desktops, but also lets you specify different desktops, with different displays.
Changing your window manager in Gnome or KDE
To Change the window manager in Gnome, go to the Settings options and select Gnome Control Center. In the Control Center, go to Window Manager. Select the window manager you want, and click on Try, to make it the default. If you want, you can add window managers to the list through the Add button, and by specifying the path.
In KDE, open the terminal window, and use the command ‘kwmcom go:window manager’, to specify the window manager that you want to use. However, you must first ensure that you have kwmcom installed.
Alternatively, you can use a tool known as guichooser that lists all the window managers, and lets you select the one you want.
Handling your documents
If you want to change the way certain file types are viewed, edited or manipulated, you can do so from the Document Handlers section in the Gnome Control Center. The Default Editor option, for instance, will allow you to specify your default editor, while working with text of any sort. When you click on files associated with editing or text, the selected editor will open up automatically.
Working with different browsers
You can specify which browser handles URLs, through the URL Handlers option in Gnome Control Center. You can specify the default browser for a Web page, or for ghelp-which is used for all Gnome documentation, and by default, opens in Nautilus (the Gnome file manager and help browser).
The ghelp URL is usually used for documentation, and there are also URLs associated with man (manual) pages that are also opened in Nautilus. You can change the browser for any URL, by changing the browser in the handler textbox, and clicking on the Set button.
Selecting themes in Gnome
You can work with different themes for your window manager, using the Theme Selector capplet. The GTK themes that you get, are settings that allow you to change the look and feel of the interface, including the buttons, menus, scrollbars, etc, for all Gnome applications. From the Theme Selector capplet, select a theme from Available Themes. Enable auto-preview, and you can see the changes live. Click on the Try button to apply the theme. While you get a basic set of themes loaded with Gnome, there are others that you can get from http://gtk.themes.org.
Download the theme, and then click on the Install new theme option, in the capplet. Browse to the downloaded theme. Click OK and Gnome will automatically install the theme. You can preview it from the Available Themes option. You can also customise your fonts, if you want, from the themes. Just select the custom font checkbox, and click on the font button. Now, you will be presented with a font selection option, wherein you can specify the font, the style and its size.
Using the KDE taskbar
The taskbar helps you keep track of all the applications that are running. The taskbar can be placed in a separate location, or right there on the desktop. By default, the taskbar is located at the top of the desktop, while the panel is at the bottom. If you want to change the default settings, then right click on the panel, select Settings to open the Kpanel Control Module, and choose the placement from the Panel Location option in the General tab. You can also maximise the application currently running, or bring it to the front by clicking on it in the taskbar.
Reading the manual pages in KDE
Use [Alt] + [F2] to open the run window and type ‘man command name’-where command name is the actual command. This will open the manual pages and even unzip them on the fly-if they happen to be zipped. You can also use the Help Center for the same purpose. Click the Help Center icon on the toolbar, and you will see an entry called Unix manual pages in the left pane. Click on it to view all the installed manual pages in the system.
Disabling KDE defaults for non-KDE applications
If you are running KDE as your default desktop environment, you will find that some non-KDE applications behave strangely, with fonts not displaying properly. You can prevent this from happening by using the Look and Feel option. Click on the K icon, go to Preferences > Look and Feel > Style, and disable the option to apply fonts and colours to non-KDE applications. If this does not work, ensure that you click on OK directly without clicking on Apply in the same Preferences menu. If the problem persists, then another method is to delete the app-defaults directory, located at /KDEDIR/share/ apps/kdisplay. The result is that it prevents KDE from locating the X resource files, which it needs in order to apply the default settings. Now, exit your KDE session, and everything should be back to normal.
Using the Windows shortcuts of your keyboard
You can configure KDE to use the Windows key. To do this, you will have to configure your X server, using xmodmap, to link the keycodes for those extra keys to useful X functions. The first step involves creating a file Xmodmap in the home directory. Use a text editor, and add the following entries:
This is done assuming that you have the standard keyboard mapping. To check the actual codes for your keyboard layout, use the command xev. Then type the command, xmodmap ~/.Xmodmap. The result is that it will assign [F13] to the Start key in the keyboard and [F15] to the Windows key. Now open the KDE Control Center and go to Shortcut Keys > Global Shortcut. Set [F13] to Pop-up the system menu, and [F15] to Windows operation menu.
Installing True Type fonts
If you like the Windows feel, you will miss the True Type fonts, especially if you are browsing using Netscape. To install True Type fonts, in Linux, you can use a utility called Xfree 4.0. First, create a directory called truetype in /usr/X11R6/lib/X11/fonts/, and copy all your .ttf (True Type fonts) files into this directory. Now, from within this directory, run the command mkttfdir. After this, add the following line to your XF86Config file: FontPath /usr/X11R6/lib/X11/fonts/truetype-where truetype is the directory you created. Restart X and experience a feel similar to that of Windows