In this first installment of the Linux Desktop Invasion, I’m going to give you a few quick tips that are sure to make your Linux desktop experience much better. No fanfare, no hullabaloo, just fast and furious tips.
Adding TrueType fonts to Red Hat 7.1
Adding those infamous TrueType fonts to the Red Hat Linux 7.x desktop is a very simple procedure. The first step is to su to root. (In case you don't know what su to root means, run the command su and, when prompted, enter the root password.) Once you have root privileges, make a directory to house the soon-to-be installed TrueType fonts. In my application, I use a separate partition called /data and create a new directory called fonts. Next, download all your favorite TrueType fonts (from Chank Font Store, for example) into the newly created fonts directory.
Once the fonts are downloaded, unzip them (if they are in zipped form, that is) and run the following commands from within the fonts directory:
ttmkfdir -o fonts.scale
chkfontpath --add /data/fonts
The TrueType fonts within /data/fonts should be available. A simple way to test your setup is to first run the chkfontpath command with no options. You’ll see something like this:
As you can see, the last entry is the newly created font path.
The real test will be to open the Gimp and find out whether the fonts are available. If you can use the new fonts within the Gimp, your installation was successful. Various applications, like word processors, have their own devices for adding TrueType fonts, so you'll have to use those particular tools in those cases.
Changing your runlevel
For many newer Linux users, the graphical login screen will be the preference. However, at times, a text-based login may be necessary. How do you make the switch? You could change to a virtual terminal and kill either GDM (GNOME Display Manager) or KDM (KDE Display Manager), or you could edit your /etc/inittab file and make the change permanent (until you re-edit the file, of course).
You’ll edit this section of the file. The last line, id:5:initdefault:, indicates that the system is to boot in the X11 graphical log. To change this to a text-based login, change the id:5:initdefault: line to id:3:initdefault:.The next time you boot your machine, the boot process will stop at a login prompt. You’ll then enter your login name, press [Enter], enter your password, press [Enter] again, type startx, and then press [Enter] one last time.
Changing your window manager
I realize that most of you run either GNOME or KDE, but some of you would rather not hit your CPUs with such memory hogs. For those CPU misers out there, never fear. Even with the most up-to-date desktop environment taking over, you can still define Linux to be exactly what you want it to be. With the help of the .xinitrc file, you can tell the X Window System which desktop environment or window manager to start.
For example, let's say you want to use Blackbox. For this window manager, you would have an entry like this in your .xinitrc file:
For the AfterStep window manager, you would use this entry:
To initialize a GNOME desktop, you would enter this:
Starting KDE requires this in the .xinitrc file:
Other window managers
If you're looking for the executable command to start your favorite window manager, you could roam over to Themes.org and navigate to the page of the window manager you want to work with.
Once you have this file in place, it's just a matter of logging in and running the startx command to start your favorite window manager, desktop environment, or combination thereof.
Getting out of X
Someday, something unthinkable may happen and the X Window System (X) will lock up on you. It's happened to me. Generally, this is the fault of a third-party application and usually an alpha or beta release, at that. Rarely, if ever, is it due to the Linux kernel itself.
You can get out of X and drop back to a console prompt or your graphical login screen simply. By pressing [Ctrl][Alt][Backspace], you’ll drop out of X instantly. Whatever work you had accomplished will more than likely not be saved, though.
Using the pager
The Linux desktop comes with a number of bells and whistles. Some of these are a bit strange at first, but once you have grown accustomed to them, they are hard to live without. One is the pager, a tool that allows you, effectively, to have more than one desktop at once. You’ll notice the pager on your desktop because it will typically be a box with four or so smaller boxes nested within. When you click on any one of the nested boxes, you zap yourself to that particular desktop.
I like to use this utility to dedicate specific desktops to specific jobs. Typically, I set it up like so:
- · Desktop 1: Networking (browsing, e-mail, chats)
- · Desktop 2: Work (VMware, calendar, testing)
- · Desktop 3: Writing (word processor)
- · Desktop 4: Multimedia (xmms, xcdplay, gtv)
By setting up your desktop in this type of arrangement, you can keep open more windows (more applications) without cluttering your screen beyond recognition.
If you don't know about virtual consoles, it's about time you did. Instead of just having more than one desktop, what about having more than one console? Where the pager steps up and helps the graphical user, the virtual console will step up and help the console user.
Let's say you’re using a Linux box as a Web server running Apache. This machine will be without a graphical client to save space and CPU cycles. You have a standard user account logged into that machine and, for some reason, don’t want to log that user out. Then something happens and you need to check a log file as root. You don't want to switch to root with the su command, so what do you do? Press [Ctrl][Alt][F6] and you'll be offered a login prompt. Log in as root and take care of business. Then, log out of root, press [Ctrl][Alt][F7], and you'll be back to your original user’s console. To use the virtual console, you don’t have to shut down any running applications nor do you have to log out of either account. (I mention logging out of root for security purposes.)
The virtual console can be used even if one user is logged into the X Window System. This has come in handy for me when one application has crashed and nothing seems to get control of the desktop. (This happened frequently during the alpha builds of Evolution.) Instead of losing data from every open application (like these written words, for example), I’d hop on over to a virtual console, log in as root, and run killev and oaf-slay to kill off Evolution. When I zapped back to my jwallen screen with [Ctrl][Alt][F7], Evolution was dead, I had control of the screen again, and my words were still alive in Applixware. Handy!