From bdb2ce8f23a25ff1a978ad3f20a318dac2441002 Mon Sep 17 00:00:00 2001 From: mayfrost Date: Sat, 29 Dec 2018 19:50:21 -0300 Subject: [PATCH] Update X.md --- X.md | 84 ++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/X.md b/X.md index d71d088..9edc2e0 100644 --- a/X.md +++ b/X.md @@ -1,9 +1,10 @@ # X -Set xorg and a desktop environment fast. +Set __X__ and a desktop environment fast. 1. [INSTALLING X](#installing-x) 2. [CONFIGURING X](#configuring-x) -2.1. [SCREEN TEARING](#screen-tearing) +2.1. [SCREEN RESOLUTION](#screen-resolution) +2.2. [SCREEN TEARING](#screen-tearing) 3. [NO DE](#no-de) 3.1. [XINITRC CONFIGURATION FILE](#xinitrc-configuration-file) 3.2. [LAUNCH X](#launch-x) @@ -20,43 +21,67 @@ Set xorg and a desktop environment fast. ## INSTALLING X Generally it can be installed from the live _CD or DVD_ or afterwards with the package manager. For example on __CRUX__: -* Installing a minimal set of xorg and xorg dependent tools one by one (you must know which DRIVER you use) -`prtget depinst xorg-server xorg-xf86-video- xorg-font-util xkeyboard-config xorg-xinit` +* Installing a minimal set of xorg and xorg dependent tools one by one (you must know which _"DRIVER"_ you use) +`prtget depinst xorg-server xorg-xf86-video- xorg-font-util xkeyboard-config xorg-xinit` * Alternatively just install the metapackage _"xorg"_ ## CONFIGURING X -__X__ can be configured for several things. You can generate a configuration which will appear on your home directory and change it later. +__X__ can be configured for several things. +__OPTION 1__ +You can generate a general configuration file containing all sorts of options and that will appear on your home directory and later move it to _"/etc/X11/xorg.conf"_. You need to stop the __X__ server and have root privileges for creating it. * Create a new configuration file "xorg.conf.new" -`Xorg -configure` -* change it to "/etc/X11/xorg.conf" -`mv /path/to/xorg.conf.new /etc/X11/xorg.conf` +`Xorg -configure` +* change it to _"/etc/X11/xorg.conf"_ +`mv /path/to/xorg.conf.new /etc/X11/xorg.conf` * on other X versions the commands are -`XFree86 -configure` -`XFree86 -xf86config /etc/X11/XF86Config.new` +`XFree86 -configure` +`XFree86 -xf86config /etc/X11/XF86Config.new` + +__OPTION 2__ +Or you can create specific configuration files under the _"/etc/X11/xorg.conf.d/"_ directory for particular cases. + +### SCREEN RESOLUTION +* Generate a modeline +`cvt ` +* Use that ouput to add changes on the configuration file _"/etc/X11/xorg.conf"_ +``` +Section "Device" + Identifier "" + Driver "" +EndSection + +Section "Monitor" + Identifier "" + Modeline " + Option "PreferredMode" "" + Option "Enable" "True" +EndSection + +Section "Screen" + Identifier "" + Monitor "" + Device "" + SubSection "Display" + Modes "" + EndSubSection +EndSection +``` +In _"Modes"_ the resolution you want can contain a framerate appended but needs to be exact. ### SCREEN TEARING To solve screen tearing you can use any of these config files in its appropriate directory. -* In the case you have Intel add these to _"/etc/X11/xorg.conf.d/20-intel.conf"_: +* If you have Intel add these changes to _"/etc/X11/xorg.conf"_ or in the separate file _"/etc/X11/xorg.conf.d/20-intel.conf"_: ``` Section "Device" - Identifier "Intel Graphics" - Driver "intel" - Option "TearFree" "true" + Identifier "Intel Graphics" + Driver "intel" + Option "TearFree" "true" EndSection ``` -* In the case you have AMD add these to _"/etc/X11/xorg.conf.d/20-amdgpu.conf_": -``` -Section "Device" - Identifier "AMD Graphics" - Driver "amdgpu" - Option "TearFree" "true" -EndSection -``` - -* Another way to add changes is in the _"/etc/X11/xorg.conf"_ file: +* If you still have issues with Intel add a line with the option _UXA_: ``` Section "Device" Identifier "Intel Graphics" @@ -66,6 +91,15 @@ Section "Device" EndSection ``` +* If you have AMD add these changes to _"/etc/X11/xorg.conf"_ or in the separate file _"/etc/X11/xorg.conf.d/20-amdgpu.conf_": +``` +Section "Device" + Identifier "AMD Graphics" + Driver "amdgpu" + Option "TearFree" "true" +EndSection +``` + ## NO DE To use a window manager without any desktop environment, or even a login manager, you can just install the applications mentioned here and edit the _".xinitrc"_ file with the appropriate changes and start _"X"_ from the command line. The required applications are: * Ratpoison (or your preferred window manager in the _".xinitrc"_ file) @@ -278,7 +312,7 @@ Productive, automated, scriptable, and minimal, Ratpoison is a strict tiling win `Ctrl-t + Q` ### RATPOISONRC CONFIGURATION FILE -The next custom _".ratpoisonrc"_ file goes under your home directory and can be customized to your needs: +The next custom _".ratpoisonrc"_ file goes under your home directory and can be customized to your needs. It adds several goodies through scripts like an expose-like effect showing all windows on the screen arranged in a mozaic which you can choose by pressing the number from its tag: ``` # text editor bind e exec gjots2