Configure X11 on Linux

Author: Roger Morrison
Date Of Creation: 6 September 2021
Update Date: 1 July 2024
Anonim
How to set up X11 forwarding on Linux
Video: How to set up X11 forwarding on Linux

Content

In the Linux world, X11 (XFree86 or Xorg) provides the tools needed to run graphics applications. Without these programs, you could still only work with the command line in Linux. This article explains how to configure X11 on your computer.

To step

  1. You must have X11 installed. This was probably already done by your distribution's installer. If you don't have it installed, you can compile it from source using the information on this website (http://www.linuxfromscratch.org/blfs/view/cvs/x/xorg7.html).
  2. Press the Ctrl-Alt-F1 keys and login as root when the virtual terminal is open.
  3. Run the command "Xorg -configure".
  4. A new file has been created in / etc / X11 / called xorg.conf. This file contains the configuration settings. These have been determined automatically and may be sufficient. To test this, use "startx".
  5. If the XServer has not been started, or if the configuration is not entirely satisfactory, read on.
  6. Open the file "/etc/X11/xorg.conf".
  7. There are many sections, each of which controls a different aspect of the XServer. If XServer is not started, check the group "Device". Here is an example, but this will vary from system to system.
    • Section "Device"
    • Identifier "Device [0]"
    • Driver "nvidia"
    • VendorName "NVidia"
    • BoardName "GeForce 6150 LE"
    • EndSection
  8. To configure the "Device" group, use the following options:
    • Identifier - The ID of the device for the server.
    • Driver - Which driver is used for the device. Some well-known ones are: vesa (simple, no support for 3D), nv (for Nvidia cards, no support for 3D), and NVidia (for Nvidia cards, support for 3D, must be downloaded and installed as normal).
    • VendorName - Not very important, indicates who created the driver.
    • BoardName - Indicates which device is your graphics card.
  9. You can also configure the input devices, such as a mouse and keyboard.
  10. To configure the mouse, move the group "InputDevice" with the entry "Identifier" Mouse [1].
    • Section "InputDevice"
    • Identifier "Mouse [1]"
    • Driver "mouse"
    • Option "Buttons" "5"
    • Option "Device" / dev / input / mice "
    • Option "Name" "ImPS / 2 Generic Wheel Mouse"
    • Option "Protocol" "explorerps / 2"
    • Option "Vendor" "Sysp"
    • Option "ZAxisMapping" "4 5"
    • EndSection
    • With the above input you control the mouse. This section will probably have already been generated correctly automatically.
    • The "Driver" entry indicates which driver to use. Unless you know this must be something else, leave your "mouse" unchanged.
    • Various "Option" entries are indicated for editing the protocols as well as other advanced things related to the mouse. It is best to leave these settings alone.
  11. You can also configure the keyboard.
    • Section "InputDevice"
    • Identifier "Keyboard [0]"
    • Driver "kbd"
    • Option 'Protocol' 'Standard'
    • Option "XkbLayout" "us"
    • Option "XkbModel" "Microsoftpro"
    • Option "XkbRules" "xfree86"
    • EndSection
    • Here you will find many different options, but you will probably only want to change "XkbLayout" and "Driver".
    • "Option" XkbLayout "specifies the keyboard layout. You can provide a code to tell the computer what each test does.
    • It is best to leave the driver alone, as "kbd driver" can drive almost all keyboards, just as the mouse driver works with almost any mouse.
  12. You can also configure the monitor. Be very careful with this, because wrong settings can permanently damage your monitor. The advice is therefore not to change this part.
    • Section "Monitor"
    • Identifier "Monitor [0]"
    • VendorName "VSC"
    • Model Name "VIEWSONIC A70"
    • UseModes "Modes [0]"
    • DisplaySize 310 232
    • HorizSync 30.0 - 70.0
    • VertRefresh 43.0 - 180.0
    • Option "CalcAlgorithm" "XServerPool"
    • Option "DPMS"
    • EndSection
    • Most of all settings, such as MonitorName, are clear. You can also set DisplaySize, HorizSync and VertRefresh, but these are the settings that can damage your system, so leave them alone.
  13. Various modules can be loaded into XServer at startup to enable things like fonts and 3D graphics. These are specified in the entry "Module".
    • Section "Module"
    • Load "dbe"
    • Load "type1"
    • Load "freetype"
    • Load "extmod"
    • Load "glx"
    • EndSection
    • The glx module sets the 3D graphics.
    • The free type module is essential for fonts.
  14. The parameter "font" is very important for a graphics program. You can edit the "font" paths, which tell XServer where to find the fonts.
    • Section "Files"
    • InputDevices "/ dev / gpmdata"
    • InputDevices "/ dev / input / mice"
    • FontPath "/ usr / share / fonts / misc: unscaled"
    • FontPath "/ usr / share / fonts / local"
    • FontPath "/ usr / share / fonts / 75dpi: unscaled"
    • FontPath "/ usr / share / fonts / 100dpi: unscaled"
    • FontPath "/ usr / share / fonts / Type1"
    • FontPath "/ usr / share / fonts / URW"
    • FontPath "/ usr / share / fonts / Speedo"
    • FontPath "/ usr / share / fonts / PEX"
    • FontPath "/ usr / share / fonts / cyrillic"
    • FontPath "/ usr / share / fonts / latin2 / misc: unscaled"
    • FontPath "/ usr / share / fonts / latin2 / 75dpi: unscaled"
    • FontPath "/ usr / share / fonts / latin2 / 100dpi: unscaled"
    • FontPath "/ usr / share / fonts / latin2 / Type1"
    • FontPath "/ usr / share / fonts / latin7 / 75dpi: unscaled"
    • FontPath "/ usr / share / fonts / baekmuk: unscaled"
    • FontPath "/ usr / share / fonts / japanese: unscaled"
    • FontPath "/ usr / share / fonts / quintv"
    • FontPath "/ usr / share / fonts / truetype"
    • FontPath "/ usr / share / fonts / uni: unscaled"
    • FontPath "/ usr / share / fonts / CID"
    • FontPath "/ usr / share / fonts / ucs / misc: unscaled"
    • FontPath "/ usr / share / fonts / ucs / 75dpi: unscaled"
    • FontPath "/ usr / share / fonts / ucs / 100dpi: unscaled"
    • FontPath "/ usr / share / fonts / hellas / misc: unscaled"
    • FontPath "/ usr / share / fonts / hellas / 75dpi: unscaled"
    • FontPath "/ usr / share / fonts / hellas / 100dpi: unscaled"
    • FontPath "/ usr / share / fonts / hellas / Type1"
    • FontPath "/ usr / share / fonts / misc / sgi: unscaled"
    • FontPath "/ usr / share / fonts / xtest"
    • FontPath "/ opt / kde3 / share / fonts"
    • EndSection
    • Note that fonts are usually automatically detected by Xorg-configure - if not, you can add a new entry such as "FontPath path_to_fonts" to load them anyway.
  15. The last section we'll cover here is "ServerLayout". This controls things like multiple desktops, and indicates which devices to use.
    • Section "ServerLayout"
    • Identifier "Layout [all]"
    • Screen "Screen [0]" 0 0
    • InputDevice "Keyboard [0]" "CoreKeyboard"
    • InputDevice "Mouse [1]" "CorePointer"
    • Option "Clone" "off"
    • Option "Xinerama" "off"
    • EndSection
    • Here we find many important options. They are further explained below.
    • InputDevice - Tells XServer to use a created device.
    • Option "Clone" - If multiple monitors or graphics cards are used, this indicates whether or not the same should be displayed on all monitors.
    • Option "Xinerama" - If multiple graphics cards or monitors are used, this indicates whether or not they function as separate desktops.

Tips

  • Your distribution may come with a tool to configure this for you, or at least present it in an easier way.
  • Typically, Xorg configuration can accurately detect devices automatically, so advanced editing is often unnecessary.

Warnings

  • Editing this server can cause problems such as not loading your desktop or damaging your monitor.
  • As with editing a system file, there is a danger that your computer will be permanently damaged.