1. xorg概述 2. 只安裝必要 2.1 基礎包:xorg-server,xorg-xinit 2.2 顯卡驅動:xf86-video-intel 2.3 輸入設備:xf86-input-libinput 2.4 小結 3. group 4. gentoo相關鏈接 5. Graphical user interface 圖形用戶界面概述
1. xorg概述
https://www.x.org/wiki/
https://zh.wikipedia.org/wiki/X.Org_Server
https://en.wikipedia.org/wiki/X.Org_Server
X.Org Server(全稱X.Org Foundation Open Source Public Implementation of X11)是X Window System的官方參考實現,它是開放源代碼的自由軟件。這一項目由X.Org基金會運作,存放於freedesktop.org的主機上。初始版本和最終版本:
xorg是一個古老的存在, 大部分現代DE都對其相關軟件兼容, 有些還依賴xorg的部分功能.
要使用很多現代DE, 也需要安裝一些必要的xorg包.
x初始化: xorg-xinit
$ lspci | grep 'VGA\|3D'
$ lspci | grep -E 'VGA|3D'
$ lspci | grep -e VGA -e 3D
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 0c)
$ pacman -Ss xf86-video
找到適合自己顯卡的驅動.
X服務器默認使用libinput驅動(xf86-input-libinput), 但也可以使用xf86-input-evdev和相關驅動程序。
udev ,evdev 可以用作絕大部分設備的即插即用驅動。Udev 由 systemd 通過 xorg-server提供,所以不需要顯式安裝。
udev作為systemd依賴提供,會自動檢測硬件,使用 evdev 或 libinput 處理設備的輸入。
默認配置文件/usr/share/X11/xorg.conf.d/目錄中的10-quirks.conf, 40-libinput.conf
$ cd /var/log/
$ grep -e "Using input driver " Xorg.0.log
[ 13.672] (II) Using input driver 'libinput' for 'Power Button'
[ 13.721] (II) Using input driver 'libinput' for 'Video Bus'
[ 13.748] (II) Using input driver 'libinput' for 'Sleep Button'
[ 13.771] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
[ 13.803] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'
[ 13.852] (II) Using input driver 'libinput' for 'HP WMI hotkeys'
https://wiki.archlinux.org/index.php/Touchpad_Synaptics
警告: xf86-input-synaptics不再主動更新。如果可能,請使用libinput。
$ sudo pacman -S xf86-video-intel, xorg-xinit xorg-server
$ startx 啟動測試
注: 驅動請參照上文找到適合自己顯卡的程序.
xorg相關的包組有4個, 分別為: xorg (49); xorg-drivers (16); xorg-apps (36); xorg-fonts (2).
表1, 本機安裝的15個包, [Q?]列Qe表示主動安裝的只有3個, 其他都是作為依賴被安裝的.
表2: group: xorg-drivers剩余包
表3: group: xorg剩余包
https://wiki.gentoo.org/wiki/Xorg/Guide
https://wiki.gentoo.org/wiki/Xorg/Guide/zh-cn
使用 startx, 試試startx來運行 X server。 startx即執行一個'X會話'腳本;這個腳本x11-apps/xinit生成. 也就是說,它啟動了X服務器並在它上面的一些圖形應用程序。它使用下面的方式來判斷該運行哪些應用程序:
如果一個叫做.xinitrc的文件存在於主目錄(home)中,它會執行里面列出的命令。
否則,它會從/etc/env.d/90xsession讀取 XSESSION 這個變量的值,並且將執行一個與之相對應的會話。XSESSION的值可以在/etc/X11/Sessions/文件中進行配置。例如,設置系統默認會話,以root身份運行: root #echo XSESSION="Xfce4" > /etc/env.d/90xsession
這將創建文件:90xsession,然后設置默認X會話Xfce。 記得在90xsession修過后,執行命令env-update。user $startx
https://wiki.gentoo.org/wiki/Wayland
Wayland旨在替代X顯示服務器。
應用領域: GTK 3.x和Qt支持Wayland。不幸的是,大多數應用程序仍然需要X服務器。有幾種方案可以使它們工作:
通過重寫具有X.org依賴關系的組件來移植應用程序,以便它們也可以用於Wayland。cf. Wayland-港口。其他示例是mpv,它是基於MPlayer / mplayer2的視頻播放器,或者是極簡的網絡客戶端xombrero,midori和Epiphany也完全支持Wayland。預計將GNOME和KDE移植到它。
Xclient可以在Wayland上運行。之后,所需的應用程序可以照常在Xclient上運行。請參閱在wayland上運行的X服務器。
Xwayland是在X服務器上運行Wayland的第三個選項。
https://wiki.archlinux.org/index.php/Category:Graphical_user_interfaces
X.Org Server(全稱X.Org Foundation Open Source Public Implementation of X11)是X Window System的官方參考實現,它是開放源代碼的自由軟件。這一項目由X.Org基金會運作,存放於freedesktop.org的主機上。初始版本和最終版本:
版本 日期 X11 Release 1 2005-12-21 X11R7.0 (1.0.1) 1.12 2012-03-04 X11R7.7 (1.12.2) 1.20 2018-05-10
2. 只需安裝必要包
https://wiki.archlinux.org/index.php/Xorgxorg是一個古老的存在, 大部分現代DE都對其相關軟件兼容, 有些還依賴xorg的部分功能.
要使用很多現代DE, 也需要安裝一些必要的xorg包.
2.1 基礎包:xorg-server,xorg-xinit
x服務器: xorg-serverx初始化: xorg-xinit
2.2 顯卡驅動:xf86-video-intel
https://wiki.archlinux.org/index.php/Xorg#Driver_installation$ lspci | grep 'VGA\|3D'
$ lspci | grep -E 'VGA|3D'
$ lspci | grep -e VGA -e 3D
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 0c)
$ pacman -Ss xf86-video
找到適合自己顯卡的驅動.
2.3 輸入設備:xf86-input-libinput
https://wiki.archlinux.org/index.php/Xorg#Input_devicesX服務器默認使用libinput驅動(xf86-input-libinput), 但也可以使用xf86-input-evdev和相關驅動程序。
udev ,evdev 可以用作絕大部分設備的即插即用驅動。Udev 由 systemd 通過 xorg-server提供,所以不需要顯式安裝。
udev作為systemd依賴提供,會自動檢測硬件,使用 evdev 或 libinput 處理設備的輸入。
默認配置文件/usr/share/X11/xorg.conf.d/目錄中的10-quirks.conf, 40-libinput.conf
- 10-quirks.conf, Collection of (quirks怪癖, blacklist黑名單, whitelists白名單) for specific devices.
- 40-libinput.conf, pointer 指針; keyboard 鍵盤; touchpad 觸摸板; touchscreen 觸摸屏; tablet 平板電腦.
$ cd /var/log/
$ grep -e "Using input driver " Xorg.0.log
[ 13.672] (II) Using input driver 'libinput' for 'Power Button'
[ 13.721] (II) Using input driver 'libinput' for 'Video Bus'
[ 13.748] (II) Using input driver 'libinput' for 'Sleep Button'
[ 13.771] (II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
[ 13.803] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'
[ 13.852] (II) Using input driver 'libinput' for 'HP WMI hotkeys'
https://wiki.archlinux.org/index.php/Touchpad_Synaptics
警告: xf86-input-synaptics不再主動更新。如果可能,請使用libinput。
2.4 小結
不建議安裝xorg包,絕大部分用不到的;只需要單獨安裝xf86-video-intel, xorg-xinit, xorg-server即可。xf86-input-libinput算是server的依賴包.$ sudo pacman -S xf86-video-intel, xorg-xinit xorg-server
$ startx 啟動測試
注: 驅動請參照上文找到適合自己顯卡的程序.
3. group
https://www.archlinux.org/groups/xorg相關的包組有4個, 分別為: xorg (49); xorg-drivers (16); xorg-apps (36); xorg-fonts (2).
- 總數: 103個, (但36個apps和2個fonts軟件在xorg包組里都有)
- 重復: 39個, (包含xorg-apps全部36個包, xorg-fonts全部2個包, 1個drivers:xf86-video-vesa)
- 剩余: 64個, (xorg49 + driver16 - xf86-video-vesa)
表1, 本機安裝的15個包, [Q?]列Qe表示主動安裝的只有3個, 其他都是作為依賴被安裝的.
group | Name | Description | 描述 / $ pactree -r | group2 | Q? |
xorg-drivers | xf86-video-intel | X.org Intel i810/i830/i915/945G/G965+ video drivers | X.org Intel i810/i830/i915/945G/G965+ 視頻驅動程序 | Qe | |
xf86-input-libinput | Generic input driver for the X.Org server based on libinput | 基於libinput的X.Org服務器的通用輸入驅動程序 | d | ||
xorg-xinit | X.Org initialisation program | └─xfce4-session | Qe | ||
xorg | xorg-server | Xorg X server | Xorg X服務器 libxfont2, libfontenc | Qe | |
xorg-server-common | Xorg server common files | Xorg服務器通用文件 | d | ||
xorg-fonts-encodings | X.org font encoding files | X.org字體編碼文件 | fonts | d | |
xorg-setxkbmap | Set the keyboard using the X Keyboard Extension | 使用X Keyboard Extension設置鍵盤 | xorg-apps | d | |
xorg-xkbcomp | X Keyboard description compiler | X鍵盤描述編譯器 | d | ||
xorg-xrandr | RandR擴展的原始命令行界面 | └─intel-gpu-tools | d | ||
xorg-iceauth | ICE授權文件實用程序 | └─xfce4-session | d | ||
xorg-xmodmap | 修改按鍵映射和按鈕映射的實用程序 | └─xorg-xinit └─xfce4-session |
d | ||
xorg-xauth | X.Org授權設置程序 | └─xorg-xinit └─xfce4-session |
d | ||
xorg-xrdb | X服務器資源數據庫實用程序 | ├─xfce4-session └─xorg-xinit └─xfce4-session |
d | ||
xorg-xset | User preference utility for X | X的用戶首選項實用程序 | d | ||
xorg-xprop | Property displayer for X | X的屬性顯示器 | d |
group: xorg-drivers | Description | 描述 |
xf86-input-evdev | X.org evdev input driver | X.org evdev輸入驅動程序 |
xf86-input-synaptics | Synaptics driver for notebook touchpads | (不再更新,請用libinput)筆記本觸摸板的Synaptics驅動 |
xf86-input-vmmouse | X.org VMWare Mouse input driver | X.org VMWare鼠標輸入驅動程序 |
xf86-input-void | X.org void input driver | X.org無效輸入驅動程序 |
xf86-video-amdgpu | X.org amdgpu video driver | X.org amdgpu視頻驅動程序 |
xf86-video-ati | X.org ati video driver | X.org ati視頻驅動程序 |
xf86-video-dummy | X.org dummy video driver | X.org虛擬視頻驅動程序 |
xf86-video-fbdev | X.org framebuffer video driver | X.org幀緩沖視頻驅動程序 |
xf86-video-nouveau | Open Source 3D acceleration driver for nVidia cards | 適用於nVidia卡的開源3D加速驅動程序 |
xf86-video-openchrome | X.Org Openchrome drivers | X.Org Openchrome驅動程序 |
xf86-video-qxl | Xorg X11 qxl video driver | Xorg X11 qxl視頻驅動程序 |
xf86-video-vmware | X.org vmware video driver | X.org vmware視頻驅動程序 |
xf86-video-voodoo | X.org 3dfx Voodoo1/Voodoo2 2D video driver | X.org 3dfx Voodoo1/Voodoo2 2D視頻驅動程序 |
group1: xorg | Description | 描述 | group2 |
xorg-font-util | X.Org font utilities | X.Org字體實用程序 | -fonts |
xf86-video-vesa | X.org vesa video driver | X.org vesa視頻驅動程序 | -drivers |
xorg-bdftopcf | Convert X font from Bitmap Distribution Format to Portable Compiled Format | 將X字體從位圖分發格式轉換為可移植編譯格式 | xorg-apps |
xorg-luit | Filter that can be run between an arbitrary application and a UTF-8 terminal emulator | 可以在任意應用程序和UTF-8終端仿真器之間運行的篩選器 | |
xorg-mkfontscale | Create an index of scalable font files for X | 為X創建可縮放字體文件的索引 | |
xorg-sessreg | Register X sessions in system utmp/utmpx databases | 在系統utmp / utmpx數據庫中注冊X會話 | |
xorg-smproxy | Allows X applications that do not support X11R6 session management to participate in an X11R6 session | 允許不支持X11R6會話管理的X應用程序參與X11R6會話 | |
xorg-x11perf | Simple X server performance benchmarker | 簡單的X服務器性能基准測試程序 | |
xorg-xbacklight | RandR-based backlight control application | 基於RandR的背光控制應用 | |
xorg-xcmsdb | Device Color Characterization utility for X Color Management System | X顏色管理系統的設備顏色表征實用程序 | |
xorg-xcursorgen | Create an X cursor file from PNG images | 從PNG圖像創建X光標文件 | |
xorg-xdpyinfo | Display information utility for X | X的顯示信息實用程序 | |
xorg-xdriinfo | Query configuration information of DRI drivers | 查詢DRI驅動程序的配置信息 | |
xorg-xev | Print contents of X events | 打印X事件的內容 | |
xorg-xgamma | Alter a monitor's gamma correction | 更改顯示器的伽瑪校正 | |
xorg-xhost | Server access control program for X | X的服務器訪問控制程序 | |
xorg-xinput | Small commandline tool to configure devices | 小型命令行工具, 用於配置設備 | |
xorg-xkbevd | XKB event daemon | XKB事件守護程序 | |
xorg-xkbutils | XKB utility demos | XKB實用程序演示 | |
xorg-xkill | Kill a client by its X resource | 通過其X資源殺死客戶端 | |
xorg-xlsatoms | List interned atoms defined on server | 列出在服務器上定義的原子 | |
xorg-xlsclients | List client applications running on a display | 列出在顯示器上運行的客戶端應用程序 | |
xorg-xpr | Print an X window dump from xwd | 從xwd打印X窗口轉儲 | |
xorg-xrefresh | Refresh all or part of an X screen | 刷新全部或部分X屏幕 | |
xorg-xsetroot | Classic X utility to set your root window background to a given pattern or color | Classic X實用程序, 用於將根窗口背景設置為給定的圖案或顏色 | |
xorg-xvinfo | Prints out the capabilities of any video adaptors associated with the display that are accessible through the X-Video extension | 打印出可通過X-Video擴展名訪問的與顯示器相關的任何視頻適配器的功能 | |
xorg-xwd | X Window System image dumping utility | X Window系統映像轉儲實用程序 | |
xorg-xwininfo | Command-line utility to print information about windows on an X server | 命令行實用程序, 用於在X服務器上打印有關Windows的信息 | |
xorg-xwud | X Window System image undumping utility | X Window系統映像轉儲實用程序 | |
xorg-docs | X.org documentations | X.org文檔 | |
xorg-fonts-100dpi | X.org 100dpi fonts | X.org 100dpi字體 | |
xorg-fonts-75dpi | X.org 75dpi fonts | X.org 75dpi字體 | |
xorg-server-devel | Development files for the X.Org X server | X.Org X服務器的開發文件 | |
xorg-server-xephyr | A nested X server that runs as an X application | 作為X應用程序運行的嵌套X服務器 | |
xorg-server-xnest | A nested X server that runs as an X application | 作為X應用程序運行的嵌套X服務器 | |
xorg-server-xvfb | Virtual framebuffer X server | 虛擬幀緩沖X服務器 | |
xorg-server-xwayland | run X clients under wayland | 在Wayland下運行X客戶 |
4. gentoo相關鏈接
https://wiki.gentoo.org/wiki/Xorghttps://wiki.gentoo.org/wiki/Xorg/Guide
https://wiki.gentoo.org/wiki/Xorg/Guide/zh-cn
使用 startx, 試試startx來運行 X server。 startx即執行一個'X會話'腳本;這個腳本x11-apps/xinit生成. 也就是說,它啟動了X服務器並在它上面的一些圖形應用程序。它使用下面的方式來判斷該運行哪些應用程序:
如果一個叫做.xinitrc的文件存在於主目錄(home)中,它會執行里面列出的命令。
否則,它會從/etc/env.d/90xsession讀取 XSESSION 這個變量的值,並且將執行一個與之相對應的會話。XSESSION的值可以在/etc/X11/Sessions/文件中進行配置。例如,設置系統默認會話,以root身份運行: root #echo XSESSION="Xfce4" > /etc/env.d/90xsession
這將創建文件:90xsession,然后設置默認X會話Xfce。 記得在90xsession修過后,執行命令env-update。user $startx
https://wiki.gentoo.org/wiki/Wayland
Wayland旨在替代X顯示服務器。
應用領域: GTK 3.x和Qt支持Wayland。不幸的是,大多數應用程序仍然需要X服務器。有幾種方案可以使它們工作:
通過重寫具有X.org依賴關系的組件來移植應用程序,以便它們也可以用於Wayland。cf. Wayland-港口。其他示例是mpv,它是基於MPlayer / mplayer2的視頻播放器,或者是極簡的網絡客戶端xombrero,midori和Epiphany也完全支持Wayland。預計將GNOME和KDE移植到它。
Xclient可以在Wayland上運行。之后,所需的應用程序可以照常在Xclient上運行。請參閱在wayland上運行的X服務器。
Xwayland是在X服務器上運行Wayland的第三個選項。
5. Graphical user interface 圖形用戶界面概述
https://wiki.archlinux.org/index.php/General_recommendations#Graphical_user_interfacehttps://wiki.archlinux.org/index.php/Category:Graphical_user_interfaces
- Display server 顯示服務器:
- Xorg 是X窗口系統(通常為X11或X)的公共開源實現。運行帶有圖形用戶界面(GUI)的應用程序時需要使用它,並且大多數用戶都希望安裝它。
- Wayland 是一種更新的替代顯示服務器協議,並且提供了Weston參考實現。
- Display drivers 顯示驅動器: 默認的vesa顯示驅動程序適用於大多數視頻卡,但是通過為AMD,Intel或NVIDIA產品安裝適當的驅動程序,可以顯着提高性能並利用其他功能。
- Desktop environments 桌面環境: 盡管Xorg提供了用於構建圖形環境的基本框架,但是為了獲得完整的用戶體驗,可能還需要其他組件。GNOME,KDE,LXDE和Xfce等桌面環境將各種X客戶端捆綁在一起,例如窗口管理器,面板,文件管理器,終端仿真器,文本編輯器,圖標和其他實用程序。經驗較少的用戶可能希望為更熟悉的環境安裝桌面環境。請參閱類別:桌面環境以獲取更多資源。
- Window managers 窗口管理器: 完整的桌面環境可提供完整且一致的圖形用戶界面,但往往會消耗大量系統資源。尋求最大化性能或以其他方式簡化其環境的用戶可以選擇單獨安裝一個窗口管理器,並手動選擇所需的其他功能。大多數桌面環境也允許使用替代的窗口管理器。動態,堆疊和平鋪窗口管理器在處理窗口位置方面有所不同。
- Display manager 顯示管理器: 大多數桌面環境都包括一個顯示管理器,用於自動啟動圖形環境和管理用戶登錄。沒有桌面環境的用戶可以單獨安裝一個。另外,您也可以運行startx啟動桌面,以代替顯示管理器。https://wiki.archlinux.org/index.php/Display_manager
-
DM: LightDM lxdm gdm sddm
-
DE: 跨桌面.. lxde GNOME plasma,lxqt
- User directories 用戶目錄: 諸如Downloads或Music之類的知名用戶目錄是由xdg-user-dirs-update.service用戶服務創建的,該服務由xdg-user-dirs提供,並在安裝時默認啟用。如果您的桌面環境或窗口管理器未引入該軟件包,則可以按照XDG用戶目錄#創建默認目錄來安裝它並手動運行xdg-user-dirs-update。