<<

XWN740: Session / Window Managers Desktop Environments Lab #4

PURPOSE: To learn about the default session manager, and how to customize an X Windows graphical environment by using different window managers. This lab will also demonstrate how to launch an X windows display using only a and a client application.

INSTRUCTIONS: Perform each of the following steps in sequence. Answer all questions, and submit answers to your instructor (Refer to the section titled SUBMISSION INSTRUCTIONS at the bottom of this lab). Keys are denoted by < and > signs.

PERFORM THE FOLLOWING STEPS

1. In the Seneca computer lab, login graphically in Fedora 8 Test account server. Login as joker using the password seneca99 (Note: This lab will require you to install programs using the yum utility. It is recommended to either run yum update command in advance of performing this lab in T2107 or perform this lab on another computer system with Fedora Core 9 installed)

2. Open a prompt (eg. ).

A session manager (SM) is responsible for saving and restoring the session state; this allows the user to log out and later log in, and to find—more or less—the same programs running. How is this done?

The SESSION_MANAGER environment variable is used to store the communication path used between the session manager and the clients. In this way, the session manager can store the “saved state” of each application (client) window.

3.At the shell prompt, issue the following command:

echo $SESSION_MANAGER

Question #1: Write down the contents of the DISPLAY_MANAGER environment variable. XWN740: Session / Window Managers Desktop Environments Lab #4

This file pathname represents a socket which is a “communication” channel that allows the SESSION MANAGER to communicate with the client applications in order to store the saved state information, or to restore the saved state.

Unfortunately, information regarding the saved state such as the Session ID number is basically used for internal purposes, so it is hard to issue commands to view this information from a file.

On the other hand, there are utilities to allow the user to view certain characteristics of the programs that the Session Manager launches. In gnome, the program gnome­session­properties provides Session Manager properties. It is also available from the SYSTEM menu, under PREFERENCES, and then SESSSION (although the location may be different based on other Distributions).

4. At the shell prompt, issue the following command:

gnome­session­properties

5. In the Session Preferences dialog box, click on the Current Session tab.

Question #2: Write down the programs that are currently running (running programs show a “gear” icon under the “state” heading).

Question #3: What version of the Window Manager(WM) is running?

6. Click on the Session Options tab. Note this is where you can have the Session Manager remember the state of the saved X Window client applications.

Note: It is usually left up to the client application itself if it wants to use this data available from the Session Manager to restore itself in a new X Windows session....

7. Close the Session Preferences dialog box.

A window manager (WM) is responsible for managing window placement and provide window decorations. The window manager communicates with the session manager in order to render application windows that remained opened when the user exited the X Windows session.

There are numerous versions of window managers each having their own advantages and features. We will now explore running your X windows sessions in several different window managers, and record their appearance. XWN740: Session / Window Managers Desktop Environments Lab #4

8. Login to the terminal as superuser, and remain in superuser unless otherwise notified.

9. Make certain that you are connected to the Internet. Load the updated repositories by issuing the following command:

yum update # Note: This may take some time...

10.Install each of the following Window Managers by using the yum command (For example: yum install )

blackbox

11.Install the web­browser called Galeon by issuing the following command:

yum install galeon

12.Move to your first text­based virtual terminal (vt1), and login as joker. Use the X :1 & command to launch an X Windows session in Display #1.

13.Return to virtual terminal #1 and issue the following command:

xterm ­display :1 &

14.Return to your graphical display #1. You should see a plain xterm application running.

15.Issue the following command in the xterm application window:

/usr/bin/

Question #4: What did you notice about the characteristics of the xterm window?

16. Press in the xterm window to terminate the foreground process (i.e. the process this is currently running) XWN740: Session / Window Managers Desktop Environments Lab #4

Question #5: Repeat steps 15 and 16 for each of the 4 Window Managers that you downloaded. If necessary issue the “which” command to determine the pathname of that window manager (eg. Which blackbox). Briefly compare each WM characteristic.

Question #6: Based on your initial observations, is there a window manager that you like better than the default metacity ( window manager) in lab T2107's Gnome session?

Sometimes a full­blown can be overkill, particularly on a machine with limited memory or CPU resources, or when the user will be limited to a small range of tasks.

We will now configure a shell script that will run just a windows manager and a web­browser application in an X windows session using several window managers. The ~/.xinitrc file can be configured by the user to customize their X windows session when using the startx command.

17.Terminate the graphical X windows session for Display :1, and return to the first text based virtual terminal (vt1).

18.Create a file called .xinitrc in your home directory, and add the following lines of text displayed below:

#!/bin/sh # Start an X server with specific characteristics # === CONFIGURATION VARIABLES ===

# Window manager binary name (, mwm, etc). WM=twm

# === SET BG COLOR TO BLACK === /usr/bin/bsetroot ­display :1 ­solid black &

# Start window manager ­ server will be terminated # when the window manager exits

$WM& sleep 2

# === START CLIENT === XWN740: Session / Window Managers Desktop Environments Lab #4

/usr/bin/galeon https://learn.senecac.on.ca/ ­f

# End of Bourne Shell script

Issue the command startx ­­ :1 and note what happens to the appearance, and what happens when you close the web­browser.

19.Try editing the ~/.xinitrc file for some of the following window managers below, and start your X windows sessions in DISPLAY :1 to see what happens...

icewm blackbox

20. You have completed this lab. Close your X window session for DISPLAY :1 and proceed to “SUBMISSION INSTRUCTIONS”...

SUBMISSION INSTRUCTIONS

Send an e­mail message to your X Windows instructor with Subject line: “XWN740 – Lab4”. Your e­mail message must contain the answers to each of the 6 questions.

I prefer you write a couple of paragraphs to answer these questions, but also what you learned (or didn't learn) from this lab. It is also recommended to post feedback from performing this lab on your blog...

You have one week from the date and time of this lab to submit the answers to this lab...

ASSIGNMENT CONSIDERATIONS

Go to the Open Source at Seneca Wiki (URL: http://zenit.senecac.on.ca/wiki/index.php/Main_Page )

A group member has proposed several possible sites to conduct a discussion for this assignment that leaves a better trail for communication purposes. It is up to this class to select one and place XWN740: Session / Window Managers Desktop Environments Lab #4 a link to that discussion group for all members to participate. You will still be using the Arcade wiki, but I would also expect to see XWN740 students participating in the discussion group....