• No results found

EXempty Exercise 17. Customizing AIXwindows (1)

In document IBM AIX AU13 Student Exercise (Page 137-143)

What This Exercise Is About

This exercise shows the students how they can customize their AIXwindows environment.

What You Should Be Able to Do

At the end of the lab, you should be able to:

• Customize the .xinitrc file • Customize the .Xdefaults file

Introduction

In this exercise, students will learn how to edit files to customize their AIXwindows environment.

Exercise Instructions

Customizing the .xinitrc file

The .xinitrc file is used by the startx shell script to initialize the AIXwindows session.

(Actually, startx executes xinit, which reads the .xinitrc file.) __ 1. Log in to your AIX system.

__ 2. Copy the file /usr/lpp/X11/defaults/xinitrc into your $HOME directory and call the file .xinitrc.

__ 3. Edit the .xinitrc file and make the following changes:

Add a second hand to the xclock Make the root window solid black

Start another aixterm with a title like "Bills Window"

__ 4. Start AIXwindows. Does the AIXwindows environment look different? It should!

Customizing the .Xdefaults file

__ 5. Execute the command aixterm -keywords | pg to view all the resources that can be customized for an aixterm window.

__ 6. Create the .Xdefaults file in your $HOME directory and add the following resource definitions:

Aixterm*foreground: DarkSlateGrey Aixterm*background: wheat

Aixterm*geometry: 80x30 Aixterm*font: rom10.iso1

__ 7. Restart AIXwindows. This will cause your new .Xdefaults file to be read and used for any new aixterm windows you create. Now, open a new aixterm window. Does it have the characteristics specified in the .Xdefaults file?

__ 8. Now, end AIXwindows and then restart AIXwindows. What do the two original windows look like? Why?

__ 9. Edit the .Xdefaults file and update the following lines for new colors:

Aixterm*foreground: grey Aixterm*background: navy

__ 10. Restart the mwm and then create a new aixterm window from the command line.

Does it use your new color specifications? It should!

__ 11. Exit your AIXwindows environment and logout from the system.

END OF EXERCISE

Course materials may not be reproduced in whole or in part

© Copyright IBM Corp. 1995, 2003 Exercise 17. Customizing AIXwindows (1) 17-3

EXempty

Exercise Instructions With Hints

Customizing the .xinitrc file

The .xinitrc file is used by the startx shell script to initialize the AIXwindows session.

(Actually, startx executes xinit, which reads the .xinitrc file.) __ 1. Log in to your AIX system.

• login: teamxx

• passwd: <your password>

__ 2. Copy the file /usr/lpp/X11/defaults/xinitrc into your $HOME directory and call the file .xinitrc.

cd

cp /usr/lpp/X11/defaults/xinitrc .xinitrc __ 3. Edit the .xinitrc file and make the following changes:

Add a second hand to the xclock Make the root window solid black

Start another aixterm with a title like "Bills Window"

vi .xinitrc

• Update the xclock command to include the option -update 1

• Update the xsetroot command to look like this: xsetroot -solid black • Add the following: aixterm -T "Bills Window" &

• Save the file using <Esc> :wq

__ 4. Start AIXwindows. Does the AIXwindows environment look different? It should!

startx

Customizing the .Xdefaults file

__ 5. Execute the command aixterm -keywords | pg to view all the resources that can be customized for an aixterm window.

aixterm -keywords | pg

__ 6. Create the .Xdefaults file in your $HOME directory and add the following resource

• Add the above lines into the file. Be sure there are no trailing blanks after any of the entries. Save the file using <Esc> :wq

__ 7. Restart AIXwindows. This will cause your new .Xdefaults file to be read and used for any new aixterm windows you create. Now, open a new aixterm window. Does it have the characteristics specified in the .Xdefaults file?

• Move the mouse to the root window and press the right mouse button. This will display the root menu.

• Keeping the right mouse button depressed, move the mouse pointer to Restart... and release the mouse button.

• When asked if you want to Restart Mwm, use the left mouse button to click on OK.

• Using the left mouse button, click on one of your aixterm windows so that it becomes the active window.

• On the command line enter: aixterm &. This new window should use the characteristics you entered into the .Xdefaults file.

__ 8. Now, end AIXwindows and then restart AIXwindows. What do the two original windows look like? Why?

<Ctrl> <Alt> <Backspace> to end AIXwindows • $ startx

__ 9. Edit the .Xdefaults file and update the following lines for new colors:

Aixterm*foreground: grey Aixterm*background: navy • vi .Xdefaults

• Edit the file to change the colors for your aixterm windows. Save the changes.

Course materials may not be reproduced in whole or in part

© Copyright IBM Corp. 1995, 2003 Exercise 17. Customizing AIXwindows (1) 17-5

EXempty __ 10. Restart the mwm and then create a new aixterm window from the command line.

Does it use your new color specifications? It should!

• Move the mouse to the root window and press the right mouse button. This will display the root menu.

• Keeping the right mouse button depressed, move the mouse pointer to Restart... and release the mouse button.

• When asked if you want to Restart Mwm, use the left mouse button to click on OK.

• Using the left mouse button, click on one of your aixterm windows so that it becomes the active window.

• On the command line enter: aixterm &

__ 11. Exit your AIXwindows environment and logout from your system.

• Press <CTRL><ALT><BACKSPACE>.

END OF EXERCISE

Course materials may not be reproduced in whole or in part

© Copyright IBM Corp. 1995, 2003 Exercise 18. Customizing AIXwindows (2) 18-1

In document IBM AIX AU13 Student Exercise (Page 137-143)