Video Problem with GNOME and X Windows in Fedora installed in VirtualBox

January 16, 2010

This article basically address the problem when X Window won’t start after you have installed VirtualBox Guest Addition in Fedora as Guest OS.

If you are using the latest version of VirtualBox and Fedora 12, you should not have any problem with the drivers. The VBox video drivers works well with HAL in Fedora.

However, there is one exception. After installing VirtualBox Guest Addition on Fedora, you can freely adjust the size of the windows in the VirtualBox. If you happen to adjust VirtualBox windows to maximize the full screen on a 22″ or greater LCD, you will have problem starting X Windows on the next reboot. After maximizing the VirtualBox to the maximum, you would not be able to start X Window (specifically gdm) on the next reboot.


I have a 22″ LCD monitor with default resolution of 1680×1050 in Windows Vista. I have manage to adjust the VirtualBox Window (Fedora 12 as Guest) to 1504×932 without problem restarting Fedora. However, if I maximize the VirtualBox Window to occupy the full screen except Vista status bar (resolution of 1680×957), I would have problem starting X Window on the next reboot.


There are 2 ways to resolve this issue.

The first solution is NOT to maximize the VirtualBox window before restarting Fedora. If you need to maximize the VirtualBox window to work on Fedora, you must remember to reduce the window back to its original size. This is the easiest solution except that you have to remember to reduce the window before restarting Fedora or shutting down Fedora.

If  you prefer to work on the maximize  VirtualBox window size all the time, you can do so that by reverting to the old method of configuring the screen resolution using configuration file. The second solution is to manually configure screen resolution. Please be aware that after configuring the screen resolution, you cannot adjust VirtualBox window freely anymore.

We use xorg.conf configuration file to configure screen resolution. This file is no longer located at /etc/X11 because Fedora is using HAL to manage video and screen resolution. In the older Fedora system, xorg.conf is the main configuration file for video size, dept and resolution.

How to Login when X Windows Fails to Start

When X Windows fails to start, use the key Ctrl+Fn+F2 or Ctrl+Fn+F3 to switch to another virtual windows using console login.

Creating X11 Video Configuration File (xorg.conf)

Since the new Fedora system don’t use xorg.conf anymore. You couldn’t find it in /etc/X11 folder. To generate this file automatically use the command #Xorg -configure. This command creates a file “” after probing the video system. You need to read the output as it indicates where this new file is created.

Then you need to rename the file to xorg.conf and move this configuration file to /etc/X11 folder.

Finally, you need to define the screen resolution in the configuration file.

Amending the Configuration File

Open the file xorg.conf with your favorite editor.

On the section “Screen”, look for subsection “Display” with depth of 24.

Insert a new line indicating the Modes “1680×957”, as follows:

Section “Screen”
Identifier   “Default Screen”
Monitor      “Configured Monitor”
Device      “Configured Video Device”
DefaultDepth    24
SubSection      “Display”
Depth           24
Modes           “1680×957”

The resolution of 1680×957 is the maximize window size excluding the Windows task bar. If you have different screen resolution, please check the most appropriate resolution for your  screen.

Please note that using the xorg.conf will prevents you from adjusting the VirtualBox window dynamically.

If you want to revert to dynamic window adjustment, make sure Fedora is shut down with smaller screen resolution. You can remove the file xorg.conf.


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