Next 17: Editing with Emacs Prev 16.B: Screen Appearance Prev 16: Customizing Contents


Basic

§ 16.C: Auto-Loading Applications


A nice way to customize your Unix account is to have your favorite applications load automatically when you start an X-Session.

Let's look first at how to start an application with custom options. Try the xclock command without any options

After a short delay, a cute little clock should appear. Note the position, size and type of clock. Then enter ^c (hold down the control key and type "c") to stop xclock.

Now let's change the color of the clock. The option to change the foreground color of an X object is

The option to change the background color is

(Remember: you can use the showrgb command to find a list of available colors.) Try bringing up the clock with colors:

Use ^c when you are done to kill the time.

Now let's change the size and position of the clock. To specify the size and position of X objects you use a group of numbers

These specify the width and height of the object and the x and y position in pixels. See the figure for additional clarification.

geometry

See what happens when you try

The universe being relative, it should not surprise you that geometry can accept negative as well as positive numbers. Try some variations until you find a clock you like.

When creating your favorite clock, you might want to try these options:

-geometry width*height+x+y Clock size and location
-fg color Foreground color
-bg color Background color
-digital Digital clock
-analog Analog clock

Once you have created your favorite clock, why not have it load when you start your X session. To do this, modify your .Xsession or .xsession file.

Open the X session file you have in your home directory and look for the lines with exec commands. Then enter your own exec command for your clock:

Notice the ampersand &. It tells your window manager to run the clock in the background and lets your xsession proceed.

The exec command can be used to automatically start any application. While it is great fun to bring up every application you may possibly use in the next year, be frugal; every application requires resources, and the more demands there are on the system, the worse the performance is for all.

If you regularly use different sets of applications, you may want to set up aliases to start up groups of them with a single command. (You haven't forgotten about aliases yet, have you?)

Here the semicolon ; is used to separate commands.

Creating your custom terminal with xterm is great fun. Here are some of its options

-display xhost Server nam
-geometry width*height+x+y Window size and location
-fg color Foreground color
-bg color Background color
-iconic Initial window to be icon
-title title Window title

Now, for our final section, we'll change the way windows respond to your mouse.


Next 17: Editing with Emacs Prev 16.B: Screen Appearance Prev 16: Customizing Contents


Comments and questions to CP-unix@physics.orst.edu.