Product SiteDocumentation Site

17.3. Switching to a Graphical Login

Important — Access to Software Repositories Might Be Required

To switch to a graphical environment, you might need to install extra software from a repository. You can access Fedora repositories through the Internet or use a Fedora installation CD or DVD as a repository. Refer to Section 17.3.1, “Enabling Access to Software Repositories from the Command Line”.
If you installed using a text login and wish to switch to a graphical login, follow this procedure.
  1. If you are not already root, switch users to the root account:
    su -
    Provide the administrator password when prompted.
  2. If you have not already done so, install the X Window System and a graphical desktop environment. For example, to install the GNOME desktop environment, use this command:
    yum groupinstall "X Window System" "GNOME Desktop Environment"
    To install the KDE desktop environment, use:
    yum groupinstall "X Window System" KDE
    To install the XFCE desktop environment, use:
    yum groupinstall "X Window System" XFCE
    This step may take some time as your Fedora system downloads and installs additional software. You may be asked to provide the installation media depending on your original installation source.
  3. Run the following command to edit the /etc/inittab file:
    vi /etc/inittab
  4. Press the I key to enter insert mode.
  5. Find the line that includes the text initdefault. Change the numeral 3 to 5.
  6. Type :wq and press the Enter key to save the file and exit the vi text editor.
Reboot the system using the reboot command. Your system will restart and present a graphical login.
If you encounter any problems with the graphical login, refer to Chapter 9, Troubleshooting Installation on an Intel or AMD System or consult one of the help sources listed in Section 1.2, “Getting Additional Help”.

17.3.1. Enabling Access to Software Repositories from the Command Line

The usual way to install new software on a Fedora system is through a software repository. You can access Fedora repositories through the Internet, or use a Fedora installation CD or DVD as a repository. The software that you access through online repositories is more up-to-date than what is available on an installation CD or DVD. Furthermore, configuring a Fedora system to access online repositories is generally easier than configuring the system to use an installation CD or DVD as a repository, as long as you have an existing, wired network connection available.

17.3.1.1. Enabling Access to Software Repositories Through the Internet

By default, every Fedora installation is already configured to access Fedora repositories through the Internet. Therefore, all you must do is ensure that the system can access the Internet. If you have an existing, wired network connection available, this process is straightforward:
  1. If you are not already root, switch users to the root account:
    su -
  2. Ensure that the system is plugged into your network. Note that your network might be as small as two devices — a computer and an external modem/router.
  3. Run system-config-network. The network configuration tool starts and displays the Select Action screen.
  4. Select Edit a device params and press Enter. The network configuration tool displays the Select A Device screen with a list of network interfaces present on your system. The first interface is named eth0 by default.
  5. Select a network interface to configure and press Enter. The network configuration tool takes you to the Network Configuration screen.
  6. You can manually configure a static IP, gateway, and DNS servers on this screen or leave these fields blank to accept the default values. When you have chosen a configuration, select OK, and press Enter. The network configuration tool takes you back to the Select A Device screen.
  7. Select Save and press Enter. The network configuration tool takes you back to the Select Action screen.
  8. Select Save&Quit and press Enter. The network configuration tool saves your settings and exits.
  9. Run ifup interface, where interface is the network interface that you configured with the network configuration tool. For example, run ifup eth0 to start eth0.
Configuration of dial-up or wireless Internet connections is more complicated and beyond the scope of this guide.

17.3.1.2. Using a Fedora Installation CD or DVD as a Software Repository

You can use a Fedora installation CD or DVD as a software repository, either in the form of a physical disc, or in the form of an ISO image file.
  1. If you are using a physical CD or DVD, insert the disc into your computer.
  2. If you are not already root, switch users to the root account:
    su -
  3. Create a mount point for the repository:
    mkdir -p /path/to/repo
    where /path/to/repo is a location for the repository, for example, /mnt/repo
  4. Mount the CD or DVD on the mount point that you just created. If you are using a physical disc, you need to know the device name of your CD or DVD drive. You can find the names of any CD or DVD drives on your system with the command cat /proc/sys/dev/cdrom/info. The first CD or DVD drive on the system is typically named sr0. When you know the device name, mount the CD or DVD:
    mount -r -t iso9660 /dev/device_name /path/to/repo
    For example: mount -r -t iso9660 /dev/sr0 /mnt/repo
    If you are using an ISO image file of a disc, mount the image file like this:
    mount -r -t iso9660 -o loop /path/to/image/file.iso /path/to/repo
    For example: mount -r -o loop /home/root/Downloads/Fedora-15-i386-DVD.iso /mnt/repo
    Note that you can only mount an image file if the storage device that holds the image file is itself mounted. For example, if the image file is stored on a hard drive that it not mounted automatically when the system boots, you must mount the hard drive before you mount an image file stored on that hard drive. Consider a hard drive named /dev/sdb that is not automatically mounted at boot time and which has an image file stored in a directory named Downloads on its first partition:
    mkdir /mnt/temp
    mount /dev/sdb1 /mnt/temp
    mkdir /mnt/repo
    mount -r -t iso9660 -o loop mount -r -o loop /mnt/temp/Downloads/Fedora-15-i386-DVD.iso /mnt/repo
    If you are not sure whether a storage device is mounted, run the mount command to obtain a list of current mounts. If you are not sure of the device name or partition number of a storage device, run fdisk -l and try to identify it in the output.
  5. Edit the /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo files to use the new repository. In each case:
    1. Open the file with the vi text editor. For example:
      vi /etc/yum.repos.d/fedora.repo
    2. Press the I key to enter insert mode.
    3. Type a # character at the start of any line in the file that starts with baseurl or mirrorlist. The # character comments out the line so that the package management software ignores it.
    4. Find the [fedora] section of the fedora.repo file or the [updates] section of the fedora-updates.repo file. Note that this section includes a line that now starts # baseurl that you previously commented out.
    5. Insert a new line after the line that starts # baseurl:
      baseurl=file:///path/to/repo
      For example, baseurl=file:///mnt/repo
    6. Press the Esc key to exit insert mode.
    7. Type :wq and press the Enter key to save the file and exit the vi text editor.
    8. After installing or upgrading software from the CD or DVD, edit the /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo files again to undo the changes that you made.