Linux+: Linux X Window 05 – Desktop Management

J

Jarret W. Buse

Guest
Linux+: Linux X Window 05 – Desktop Management

X Windows is a windowing system for Linux systems. X Windows can also be referred to as X11 and X. X Windows provides the basic framework for managing the Graphical User Interface (GUI). X Windows manages the moving, drawing and mouse interaction of the windows on the display. X Windows was created by the Massachusetts Institute of Technology (MIT) and managed by the X.Org Foundation.

For most GUI OS systems, X Windows will start automatically. In a rare case that the OS stops at a command-line, you will need to start the GUI by typing the command 'startx'.

NOTE: Some events may occur to cause the GUI system to fail. In some cases, X Windows will not start after the graphics system has been changed. An example of changing the graphics system is when the existing video card is changed with a different one.

Once X Windows is running, there are multiple desktop environments which can be used to provide the GUI interface.

Two main environments concerning the Linux+ Certification are GNOME and KDE.

NOTE: There are three basic things to remember in this article to keep some things straight:

1. X Windows – GUI engine for all graphics
2. X Windows Manager – Layer above X Windows which has its own look and feel. Examples are Enlightenment, dwm, ratpoison, etc.
3. Desktop Environment – Windows manager with the inclusion of a set of applications to work as a cohesive suite. Examples include GNOME, KDE, etc.

When an OS first starts and the user logs into the OS, they are given the choice of which environment they want to load. A list of installed environments are given to allow for the desired choice.

For a Red Hat distro, you can use “Apper” to install two applications. The programs to search for are “switchdesk” and “switchdesk-gui”. These two applications allow for the changing of the desktop environment. Switchdesk-gui is shown in Figure 1.

Figure 5-1.jpg

FIGURE 1

You can use the command-line application 'switchdesk' to change it as well. To use the command-line tool, type 'switchdesk' followed by the environment name you wish to use. If you type an incorrect environment name, the GUI will not start and you will be at a command-line prompt. To fix the problem, re-run 'switchdesk' with a valid environment name at the command-line.

Once the desktop environment has been selected, you need to log out and log back into the OS. It seems simpler to choose the “Session” option at the logon screen and select the desired environment type you want to use.

NOTE: The “Switchdesk” utility may not list all available session types and may not cause the session type to switch properly on all systems. Simply be aware of its existence.

To reset X Windows, press the CTRL+ALT+BACKSPACE keys. If the keys do not work, then you need to open a terminal and enter the command 'setxkbmap -option terminate:ctrl_alt_bksp'. Once the system is rebooted, the setting is lost. To make it permanent, you need to add a file called x11-input.fdi to the folder “/usr/local/etc/hal/fdi/policy” and enter the following code into it:

<?xml version="1.0" encoding="iso-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.x11_options.XkbOptions" type="string">terminate:ctrl_alt_bksp</merge>
</match>
</device>
</deviceinfo>

The OS should be rebooted to load the new file for the keyboard mapping.

For Debian systems, it is possible to use the application called “choosewm” to switch environments. Open your package manager like Synaptic. Search for “choosewm” and select to install it. Once installed, open a terminal and type “choosewm” and press “Enter”. Once started, you should see a list of detected environments.

NOTE: The program seems limited and may not detect all the available environments installed on the system.

Select your preferred environment and then select “Logout” to allow you re-login with the appropriate changes.

Personally, I still believe the best option is to logout and at the login screen choose your desired environment. The choices are usually listed under the option of “Session” or something similar. Any environment types you may wish to use, be sure they are installed on the system.

A quick way to determine the current environment on a system is to open a terminal and run the following command “echo $XDG_CURRENT_DESKTOP”.
The command will cause the environment variable stored in XDG_CURRENT_DESKTOP to be displayed. The output should be self-explanatory. If the output is not obvious or even blank, try the command “echo $GDMSESSION”. If the first command does not display a valid environment, the second should. Some versions of KDE may not give an output for the XDG_CURRENT_DESKTOP variable, but will for the GDMSESION variable. The environment like Cinnamon will give a value for XDG_CURRENT_SESSION, but only display “default” for GDMSESSION.

NOTE: The environment variable XDM_CURRENT_SESSION should show the currently running environment. The GDMSESSION shows the name of the last selected session type which may sometimes only show “default”.

A simpler way is to install “hardinfo” if it is not already installed by the command “sudo apt-get install hardinfo”. Once installed, open a terminal and type “hardinfo”. Once the application opens, select “Operating System” in the left pane. In the right pane under “Current Session” is a line for “Desktop Environment” which shows the currently running environment.

NOTE: Be aware of these tools to determine the running environment.
 

Attachments

  • slide.jpg
    slide.jpg
    53.4 KB · Views: 141,849

Members online


Latest posts

Top