Linux Graphical Desktop Environment (X Window/GNOME/KDE)

December 15, 2009

X Window / GUI Desktop Environment

For graphics user interface environment in Linux, there are 2 basic components:

  • The X window system which provides the basic frame work
  • Desktop environment such as GNOME, KDE, XFCE and LXDE

Installing GUI Desktop Environment

Installing GUI and desktop environment from text based console

  • Installing GNOME
    • #yum groupinstall ‘X Window System’
    • #yum groupinstall ‘GNOME Desktop Environment’
  • Installing KDE
    • #yum groupinstall ‘X Window System’
    • #yum groupinstall ‘KDE (K Desktop Environment)’
  • Installing XFCE
    • #yum groupinstall ‘X Window System’
    • #yum groupinstall ‘XFCE’
  • Installing LXDE
    • #yum groupinstall ‘X Window System’
    • #yum groupinstall ‘LXDE’

Starting X Windows

  • To start X Windows from a text based console use the command:
    • $ startx

Ending X Windows

  • To ending X Window / GNOME session and returning to command prompt, just logout from the session.
  • If it fails press Ctrl+Alt+Backspace to end your GNOME session.
  • Alternatively, press Ctrl+Alt+F1 to return to where you first ran startx, and then press Ctrl+C to kill the desktop.

GNOME Desktop Environment

For GNOME, it comprise of different components, they are:

  • The X window system which provides the basic frame work
  • Desktop environment GNOME including GNOME panels and GNOME desktop
  • Metacity Window manager which provides the basic of controlling Window
  • Nautilus file manager
  • Fedora desktop theme

Metacity Useful Keyboard Shortcuts

Alt+Esc Cycle between open windows Alt+Tab Cycle between windows on a window bar Ctrl+Alt+Left/Right Arrow Cycle between desktop workspace Ctrl+Alt+d (Windows Win+d) Show desktop
  • For details configuration of Metacity, run the command $gconf-editor as regular user. If this command is not available try #yum install gconf-editor.
  • This allows you to configure the keyboard shortcuts.
  • This is a behind the scene configuration and it is advisable for user to use the graphical tools instead.

Virtual Terminal

  • You can switch between multiple console based virtual terminal using Ctrl+Alt+Function command.
  • Ctrl+Alt+F1 = terminal without prompt, with messages, this is the terminal that start x window
  • Ctrl+Alt+F2 to Ctrl+Alt+F6 give you full terminal window
  • Ctrl+Alt+F7 return to X Window

Switching Desktop Environment

  • To switch between desktop environment just change the desktop environment under ‘Sessions’ during login time.

Switching Desktop Environment for Console Based System (Run Level 3)

  • You do not need the following procedure if you are running at system level 5. This procedure is for user running at level 3 and using startx to launch window.
  • If you start Windows by startx command, you need to issue a command to switch desktop environment. You need to issue command $switchdesk KDE or $switchdesk GNOME. ($yum install switchdesk if you don’t have it.)
  • Alternatively, you can install a similar GUI tool switchdesk-gui. The program included 2 scripts .Xclients and .Xclients-default in the user root directory.  .Xclients-default contains the default desktop environment use by switchdesk. There is an entry WM=”gnome-session” or WM=”startkde” to indicate which desktop environment to use.

Linux System Run Level and Startup

  • When Linux starts up, it enters into what is referred to as a run level or system state.
  • Typically, a system set to start at run level 5 boots to a graphical login prompt. A system set to run level 3 boots to a text prompt.
  • The run level is set by the initdefault line in the /etc/inittab file. (id:5:initdefault)
  • Init Level (/etc/inittab)
    • Level 0 – Halt
    • Level 1 – Single User Mode
    • Level 2 – Multiuser Mode without NFS
    • Level 3 – Full Multi User Mode
    • Level 4 – Unused
    • Level 5 – X11
    • Level 6 – Reboot

X Window Startup

  • X server and login screen is started by prefdm script, if the system run level is 5.
  • The default login screen is GNOME display manager (gdm), which handles login session and start up the desktop environment.
  • Some processes are started from the scripts in the directory /etc/X11/xinit/xinitrc.d
  • All windows problem are log at /var/log/Xorg.0.log

X Window Configuration

  • The display settings run by system-config-display is store in the file /etc/X11/xorg.conf.
  • This configuration contains the video settings and even mouse and keyboard settings for X windows to use.
  • Further information is available at http://www.x.org
Advertisements