PDF download Download Article PDF download Download Article

Although it was once common to make changes to your X11 configuration, Xorg now automatically configures all hardware and settings. Auto-configuration works so well that you usually won't even find the xorg.conf file on your Linux system! However, if you need to make advanced configuration changes for certain hardware or change a path, you can still do so. This wikiHow teaches you how to create and edit xorg.conf, the X11 configuration file, for most Linux distributions.

Configuring X11 on Any Linux Distribution

  • If /etc/X11/xorg.conf doesn't exist, stop your window manager, go to /etc/x11, and run sudo Xorg -configure to create it.
  • Open /etc/X11/xorg.conf in any text editor to edit your configuration file.
  • After making changes to and saving your xorg.conf file, restart your window manager.
  1. To see if you already have the Xorg.conf file, run cat /etc/X11/xorg.conf . If the file exists, skip to Step 8. If there is no such file, you can create it from the console by continuing with this method.
    • Most people will never need to edit xorg.conf. You'll only need to create or edit this file if you have a specific reason, such as an advanced configuration or a need to add specific text required to make certain hardware work.
  2. This will bring up a new login prompt. [1]
    Advertisement
  3. If you're hesitant to log in as root, even from the console, you can log in as a regular user and preface the remaining commands in this method with sudo .
  4. Some examples:
    • If you're using LightDM, you'll run service lightdm stop .
    • If you're using Gnome, you'll run service gdm stop .
  5. This is where you'll be creating the configuration file.
  6. This creates a skeleton file called xorg.conf in /etc/X11. Information from your hardware, such as your video card and mouse, will automatically be added to the file.
  7. For example, to restart LightDM, you'll run service lightdm start .
  8. For example, if you're using vim to edit, type vim /etc/X11/xorg.conf .
    • Preface the command with sudo if you don't have permission to edit the file.
  9. Auto-configuration has already populated this file with necessary information about your hardware. If you need to make changes, you'll need to do to so in the correct section: [2]
    • Files: File path names, including font paths. Fonts should've been auto-detected by Xorg -configure, but if you need to add more, you can add a new entry such as fontpath (location) .
    • Device: Video adapter and driver info.
    • Monitor: This is where you can edit monitor specifics, such as the refresh rate, DPI, and gamma. Only adjust these values if you know they should be adjusted, as incorrect values can break things.
    • Server Flags: General server flags, including how the server should react to signals.
    • Vendor: Vendor-specific info.
    • Module: Modules can be loaded into the XServer at startup to facilitate things like fonts and 3D graphics.
    • Extensions: Extension enabling.
    • Input Class: Input devices, such as mice, touchpads, and keyboards. Option XkbLayout controls the layout of your keyboard.
    • Server Layout: Controls things such as multiple desktops.
  10. After saving the file, use your window manager's stop and start commands to restart Xorg. Some examples:
    • If you're using LightDM, you'll run service lightdm stop to stop, and then service lightdm start to restart.
    • If you're using Gnome, you'll run service gdm stop to stop the server, and then service gdm start to restart.
  11. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I configure X11 in Linux if I get a message that says "X Server for X64 has stopped working" and the process can't continue?
    Community Answer
    Then X11 is still there, which means that you can use it. X64 is more than X11, so it will work without X64.
Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      Article Summary X

      1. Check for xorg.conf in /etc/x11.
      2. If it's not there, use Xorg –configure to create it.
      3. Open /etc/x11/xorg.conf in a text editor.
      4. Make your changes.
      5. Save the file and restart the X server.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 693,209 times.

      Is this article up to date?

      Advertisement