Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




Basic Linux Training

Lesson 11: Customizing Linux and XFree86


Table of Contents


fvwm and fvwmrc

Customizations to fvwm are in .fvwmrc in your home directory (the system default is /usr/lib/X11/fvwm/system.fvwmrc). The easiest way to do this is to copy the system default (or one of the examples in the sample_config directory) to your home directory and edit it as .fvwmrc rather than reinventing the wheel from scratch.

Most of this file is documented well enough that you will not need much outside information. HiForeColor sets the text foreground color for the active window's title (the application getting input from the keyboard); HiBackColor sets the active title bar color; StdForeColor and StdBackColor work similarly for the non-active windows.

If you want to continue using the ClickToFocus you're accustomed to with Microsoft the ClickToFocus line uncommented; commenting this line out gives you FocusFollowsMouse which may a little unsettling at first - rather than clicking the mouse button to make the window active, this is automatically done to whatever is under the mouse at the time. Some people like it, some don't - but you should try it for awhile because you might like it better.

By default, you're asked where to place each new window on the screen, or you can uncomment RandomPlacement if you want fvwm to take of this detail for you, and you will also need to comment out NoPPosition for this.

X does not place a border around dialog windows (called transient windows in X), so you will have to uncomment DecorateTransients if you want borders.

You can specify the desktop size in units of screen width and depth or you can use 1 x 1 if you do not want a virtual desktop (virtual screen). The virtual desktop does take some getting used to, and for some it's just not worth the effort. But with Linux, you're not stuck with what someone else has decided, you can change things to suit your idea of what looks best, and how you want things to work.

IconBar specifies the area where you want the icons to appear on your screen (measured in pixels from the upper left corner).

Modules are add-ons to the system, the most popular of which is called GoodStuff. Give it a try - you may get a kick out of it.

Now for the fun part. In the menu sections, you can make as many changes as you like to rearrange things - usually you can figure out the format from the other items within each section, otherwise play around with it - you won't break anything, and you'll probably learn more that way anyhow. To get an idea of some of the things that are possible, check the X Window Managers page online - the screen shots take a long time to load, but you can also download the scripts to see how it was done.

For example, I modified the Quit from the main menu to bypass the verify prompt (which I find most annoying), put it at the top of the list and added the other window managers below with the option to Refresh. This is a very simple change, but saves me a lot of time and aggravation.

Reminder: Always make a backup of any file before you start editing. The simplest way is to add .original to the end of the filename.


xterm and XTerm

Controlling the size of the xterm window is done through the geometry command line parameter in the format
        -geometry WidthxHeight+X+Y &
in terms of characters (almost all other programs treats this in terms of pixels), where X/Y are the coordinates from the top left corner of the screen.

If you want a scroll bar, you can use

        xterm -sb &
or include
        XTerm*scrollBar True
in a resource file called XTerm in your home directory.

The choice of fonts and colors is strictly a matter of personal preference which you can also include in the XTerm file.

One of the major benefits of xterm over the console terminal is that you can copy and paste between instances of xterm windows. Block you copy by holding down the left mouse button and dragging the pointer over the text, then to paste it press the middle mouse button.

There are other versions of shell windows - color xterm, rxvt, shelltool, that you can also try.


Clock

One of the experimental exercises you could do to get a better understanding of X is to play around with the clock. You can have a round bezel with oclock or square with xclock, you can change the following:
        -bg color (background),
        -bd color (border),
        -fg color (foreground),
        -hour color,
        -minute color,
        -jewel color,
        -transparent,
        -chime,
        -analog or -digital.

xdm

If you will be running exclusively in X, you can combine the login-startx routine with xdm to login directly into X. To get xdm up and running. login as root and edit the /etc/inittab file to the correct runlevel for X. You can find this by checking the scripts in /etc/rc.d; for example, Slackware uses a default runlevel of 3, and in /etc/rc.d/rc.4 the script starts xdm - so it's a simple matter of changing the /etc/inittab file to read
        # Default runlevel.
        id:4:initdefault:
rather than
        id:3:initdefault:
which is the installation default. You can verify that the number is correct by the command
        # init 4
which should respond like startx.

One very important caution - if you make a mistake in /etc/inittab Linux may not be bootable. (You did make a bootable floppy though, didn't you?)

Another caution, if your .login or .profile in your home directory is set to automatically call startx, you will first have to disable this by commenting out those line in .login or .profile.

The xdm configuration files are in /usr/lib/X11/xdm in case you want to experiment around with the background color, etc.

By default xdm runs a script called .xsession which you can create in your home directory by copying the .xinitrc file to .xsession and edit as necessary.


.Xdefaults

If you loaded Open Windows applications, you should have an .Xdefaults in your home directory. You can add to this file, or leave everything alone. Using the .Xdefaults is a nice touch, but it's not quite as easy to set up as the textbook makes it out to be.


Rebuilding the X Server

If you decide to add 3-D graphics to your server, you'll need the X link kit which allows you to compile and link a new X server. This will take up about 10-12 MB hard disk space for the source code. Backup your current X server, run xdpyinfo in xterm to check what X extensions your system supports, build all the Makefiles (mkmf) and make the new server; quit X, install the new server and ensure that that /usr/X11R6/bin/X links to the new server, run startx and run xdpyinfo again to verify that the new X extensions are available; Run make clean to remove up all the temporary files and stuff you will not need.


Assignments

Textbook: Running Linux
  • Chapter 10: Customizing Your Environment, p.318-345
Note: There is an error on page 321; Ctrl-Alt-Backspace kills the X server and you will return to text based Linux; Ctrl-Alt-Del shuts down the operating system (depending on how you have the ctrlaltdel entry in /etc/inittab).

Terms and Concepts:
Define and add these to your glossary:

  • xterm
  • geometry
  • pixel
  • showrgb
  • titlebar
  • statusbar
  • taskbar
  • frame
  • foreground
  • background
  • xinit
  • .xinitrc
  • .fvwmrc
  • xclock
  • xload
  • xbiff
  • .Xdefaults

Online:

 

Go to Basic Linux Index


http://home1.gte.net/henryw/basic/basic11.html

Date last revised: 25 May 1998


Copyright © 1997, 1998 Henry White. All Rights Reserved.
Reproduction or redistribution without prior written consent is prohibited.
Address reprint requests and other inquiries to henryw@gte.net.



With any suggestions or questions please feel free to contact us