106 Oberflächen und Desktops
Jump to navigation
Jump to search
106.1 X11 installieren und konfigurieren
Kandidaten sollten in der Lage sein, X und einen X-Fontserver zu installieren und zu konfigurieren.
Wichtigste Wissensgebiete
- Sicherstellen, dass die Videokarte und der Monitor von einem X-Server unterstützt werden
- Einen X-Fontserver installieren und konfigurieren
- Die X-Window-Konfigurationsdatei prinzipiell verstehen und kennen
/etc/X11/xorg.conf xhost DISPLAY xwininfo xdpyinfo X
Allgemeines
- USER -> X-Server ------Netzwerk------> X-Client Highperformance-Server (Am besten eine Buffalo Terrastation oder ein Open-e Hausfrauen NAS :P )
- X ist eine Client-Server Software. Die Kommunikation geht immer über die Netzwerkschicht.
- Der Name X11 besteht seit 1987. Die Weiterentwicklung wird mit R gekennzeichnet. X11R7.5
- http://www.x.org/wiki/Documentation
- http://de.wikipedia.org/wiki/X_Window_System
root# apropos Xorg dexconf (1) - generate Xorg X server configuration file from debconf data i128 (4) - Number 9 I128 Xorg video driver Xorg (1) - X11R7 X server xorg.conf (5) - (unbekanntes Thema) XOrgFoundation (7) - X.Org Foundation information xvidtune (1) - video mode tuner for Xorg
X Server
- Kommuniziert über den Kernel und seine Module mit der Hardware
- Nimmt Tastatureingaben entgegen
- Kommuniziert mit der Grafikkarte
- Hat KEINEN Einfluss auf das Aussehen von X-Programmen - zu diesem Zweck kommuniziert er mit einem X-Client
X Client
- Ein Programm, das mit dem X-Server kommuniziert.
- D.h. also eine ganz normale Anwendung die Iceweasel, xterm, etc.
Windowmanager
- Schnittstelle zu allen anderen X-Clients
- Selbst ein X-Client
- Beispiele: KWin, Metacity, Windowmaker, Sawfish
- http://xwinman.org/
- http://wiki.debian.org/WindowManager
root# update-alternatives --config x-window-manager Es gibt 2 Auswahlmöglichkeiten für die Alternative x-window-manager (welche /usr/bin/x-window-manager bereitstellen). Auswahl Pfad Priorität Status ------------------------------------------------------------ * 0 /usr/bin/metacity 60 Auto-Modus 1 /usr/bin/metacity 60 manueller Modus 2 /usr/bin/twm 40 manueller Modus Drücken Sie die Eingabetaste, um die aktuelle Wahl[*] beizubehalten, oder geben Sie die Auswahlnummer ein:
Displaymanager
- Für die Benutzerauthentifikation zuständig.
- Zeigt einen graphischen Anmeldebildschirm an.
Desktop Environment
- GNOME - Windowmanager: MetaCity, früher Sawfish - Displaymanager: gdm
- KDE - Windowmanager: KWin - Displaymanager: kdm
Der Startvorgang von X
startx
- Frontend für das eigentliche Startscript xinit.
- startx sucht zusätzliche Config Dateien und bindet diese ein:
xinit
- Aus xinitrc gestartete Programme immer mit & in den Hintergrund schicken!
- Der Windowsmanager soll hingegen immer im Vordergrund laufen.
xinitrc
- xinitrc - /etc/X11/xinit/xinitrc - Startscript für xinit
#!/bin/sh # /etc/X11/xinit/xinitrc # # global xinitrc file, used by all X sessions started by xinit (startx) # invoke global X session script . /etc/X11/Xsession
xserverrc
- xserverrc - /etc/X11/xinit/xinitrc - Startscript für den X-Server
#!/bin/sh exec /usr/bin/X -nolisten tcp "$@"
X Benutzerconfigs
- ~/.xinitrc - Benutzerstartscript für xinit
- ~/.xserverrc - Benutzerstartscript für den X-Server
- ~/.Xressources bzw ~/.Xdefauls - benutzerspeziefische Einstellungen
X-Terminals
- Emulietre Konsolen, z.B. xterm, aterm, eterm, rxvt
- Es wird folgender Config-Pfad angegeben: /usr/lib/X11/app-defaults/XTerm
- Unter Debian ist der Config-Pfad unter /etc/X11/app-defaults/XTerm zu finden
- http://linux.die.net/man/1/xterm
X-Libraries
- 102.3 Shared Libraries verwalten
- Gnome verwendet GTK (GIMP Tool Kit) Bibliotheken
- KDE verwendet QT Libraries
root# ldd /usr/bin/xterm linux-vdso.so.1 => (0x00007fff2d3ff000) libXft.so.2 => /usr/lib/libXft.so.2 (0x00007f3b0c6d6000) libXaw.so.7 => /usr/lib/libXaw.so.7 (0x00007f3b0c467000) libutempter.so.0 => /usr/lib/libutempter.so.0 (0x00007f3b0c264000) libncurses.so.5 => /lib/libncurses.so.5 (0x00007f3b0c01e000) libc.so.6 => /lib/libc.so.6 (0x00007f3b0bcbc000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f3b0ba86000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f3b0b74b000) libXt.so.6 => /usr/lib/libXt.so.6 (0x00007f3b0b4e7000) libXmu.so.6 => /usr/lib/libXmu.so.6 (0x00007f3b0b2cc000) libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f3b0b0b1000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f3b0ae29000) libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f3b0ac1e000) libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f3b0aa0c000) libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007f3b0a7fb000) libdl.so.2 => /lib/libdl.so.2 (0x00007f3b0a5f6000) /lib64/ld-linux-x86-64.so.2 (0x00007f3b0c902000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f3b0a3df000) libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f3b0a1b7000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f3b09f9a000) libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f3b09d92000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f3b09b8e000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f3b09989000) libuuid.so.1 => /lib/libuuid.so.1 (0x00007f3b09785000)
Konfigurationsdateien
- xorg.conf, manchmal auch XF86Config
root:~$ locate xorg.conf /etc/X11/xorg.conf /etc/X11/xorg.conf.fglrx-0 /etc/X11/xorg.conf.original-0 /usr/share/X11/xorg.conf.d /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/20-wacom.conf /usr/share/X11/xorg.conf.d/50-synaptics.conf /usr/share/doc/xserver-xorg/examples/xorg.conf /usr/share/doc/xserver-xorg-video-nouveau/examples/xorg.conf /usr/share/man/man5/xorg.conf.5.gz
FILES The Xorg server config files can be found in a range of locations. These are documented fully in the xorg.conf(5) manual page. The most commonly used locations are shown here. /etc/X11/xorg.conf Server configuration file. /etc/X11/xorg.conf-4 Server configuration file. /etc/xorg.conf Server configuration file. /usr/etc/xorg.conf Server configuration file. /usr/lib/X11/xorg.conf Server configuration file. /etc/X11/xorg.conf.d Server configuration directory. /etc/X11/xorg.conf.d-4 Server configuration directory. /etc/xorg.conf.d Server configuration directory. /usr/etc/xorg.conf.d Server configuration directory. /usr/lib/X11/xorg.conf.d Server configuration directory. /var/log/Xorg.n.log Server log file for display n. /usr/bin/∗ Client binaries. /usr/include/∗ Header files. /usr/lib/∗ Libraries. /usr/lib/X11/fonts/∗ Fonts. /usr/share/X11/XErrorDB Client error message database. /usr/lib/X11/app-defaults/∗ Client resource specifications. /usr/share/man/man?/∗ Manual pages. /etc/Xn.hosts Initial access control list for display n.
sed 's/# //g' /usr/share/doc/xserver-xorg/examples/xorg.conf | tail -n +12
Section "Files"
- Dateipfade, z.B. Einträge des Typs FontPath oder ModulePath.
- Grundsätzlich sind alle Einträge in der Section "Files" optional.
Section "Files" FontPath "/usr/share/fonts/X11/100dpi" FontPath "/usr/share/fonts/X11/75dpi" FontPath "/usr/share/fonts/X11/cyrillic" FontPath "/usr/share/fonts/X11/misc" FontPath "/usr/share/fonts/Type1" ModulePath "/usr/lib/xorg/modules" EndSection
- Fonts können auch zentral auf einem X-Fortserver verwaltet werden:
Section "Files" FontPath "Unix/:7100" EndSection
- Es gibt auch noch den Typ RbgPath:
RgbPath "/usr/X11R6/lib/X11/rgb.txt"
root:~$ locate rgb.txt /etc/X11/rgb.txt /usr/share/X11/rgb.txt /usr/share/emacs/23.2/etc/rgb.txt
root:~$ less /etc/X11/rgb.txt ... 255 250 250 snow 248 248 255 ghost white 248 248 255 GhostWhite 245 245 245 white smoke ...
Section "Server-Flags"
- Globale Einstellungen für den X-Server, wie z.B. PowerManagement und Hotkeys.
- Die Section ist ebenfalls optional.
Section "ServerFlags" Option "DontZap" "False" Option "DefaultServerLayout" "Layout" Option "AllowMouseOpenFail" "False" Option "AllowEmptyInput" "True" Option "AutoAddDevices" "True" EndSection Section "Module" Load "glx" EndSection Section "Extensions" Option "Composite" "Enable" EndSection
Section "Input Device"
- Angaben zu Maus und Tastatur.
- Mehrfaches Vorkommen zwecks Übersichtlichkeit.
Section "InputDevice" Identifier "Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us" EndSection Section "InputDevice" Identifier "Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" EndSection
Section "Device"
- Angaben zu Grafikkarte(n).
Section "Device" Identifier "Video Card" Driver "vesa" Option "AccelMethod" "EXA" Option "Monitor-LVDS" "Monitor1" Option "Monitor-VGA" "Monitor2" EndSection Section "Device" Identifier "Internal Graphics Card We Disable" Option "Ignore" "true" BusID "PCI:1:0:0" EndSection
Section "Monitor" und "Modes"
- Angaben zu Monitoren.
Section "Monitor" Identifier "Monitor1" DisplaySize 304 228 EndSection Section "Monitor" Identifier "Monitor2" HorizSync 24-82 VertRefresh 55-77 Option "RightOf" "Monitor1" EndSection
Section "Screen"
- Führt Grafikkarten und Monitore zusammen.
- Section Monitor und Screen nicht miteinander verwechseln!
- Gibt den Geräten einen eindeutigen Bezeichner (Identifier).
Section "Screen" Identifier "Screen" Device "Video Card" Monitor "Monitor" DefaultDepth 24 SubSection "Display" Depth 24 # Virtual 3072 1200 EndSubSection EndSection
X-Fontserver
- xfs - zentrale Verwaltung von Fonts.
- Einzige Config: /etc/X11/fs/config
- man 1 xfs
root:~# cat /etc/X11/fs/config # font server configuration file # $Xorg: config.cpp,v 1.3 2000/08/17 19:54:19 cpqbld Exp $ # allow a maximum of 10 clients to connect to this font server client-limit = 10 # when a font server reaches its limit, start up a new one clone-self = on # log messages to /var/log/xfs.log # (Debian xfs uses syslog by default to run as nobody) # error-file = /var/log/xfs.log # log errors using syslog use-syslog = on # turn off TCP port listening (Unix domain connections are still permitted) no-listen = tcp # paths to search for fonts catalogue = /usr/share/fonts/X11/misc/,/usr/share/fonts/X11/cyrillic/,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/75dpi/ # in decipoints default-point-size = 120 # x1,y1,x2,y2,... default-resolutions = 100,100,75,75
fslsfonts
- Test des Fontservers / Anzeigen der verfügbaren Fonts:
fslsfonts -server Unix/:7100 | less
X-Display exportieren
xhost
- Wir erinnern uns, der X-Server ist der PC an dem der Benutzer sitzt.
- Er muss dem Client (also dem PC der die Anwendung ausführt) Zugriff gewähren:
root:~$ xhost + access control disabled, clients can connect from any host
root:~$ xhost - access control enabled, only authorized clients can connect
root:~$ xhost +tanja-pc tanja-pc being added to access control list root:~$ xhost -tanja-pc tanja-pc being removed from access control list
export DISPLAY
- Am Client (also dem Rechner, der die Anwendung ausführt) muss das DISPLAY exportiert werden:
root:~$ export DISPLAY=tanja-pc:0.0
- Danach kann am Server die Anwendung gestartet werden
root:~$ xterm &
xwininfo
- Zeigt Informationen über ein Fenster an, das man per Klick auswählen kann.
root:~$xwininfo xwininfo: Please select the window about which you would like information by clicking the mouse in that window. xwininfo: Window id: 0x1e0011f "Bearbeiten von „106 Oberflächen und Desktops“ (Abschnitt) – Tobi's Computerkrams Wiki - Iceweasel" Absolute upper-left X: 0 Absolute upper-left Y: 49 Relative upper-left X: 0 Relative upper-left Y: 49 Width: 1920 Height: 1029 Depth: 24 Visual: 0x23 Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x20 (installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +0+49 -1280+49 -1280-2 +0-2 -geometry 1920x1029+0-2
xdpyinfo
- Zeigt umfangreiche Informationen zum X-Server an.
- Parameter zur Kommunikation mit dem X-Client (es kann auch eingestellt werden, welche Screens vom X-Server unterstützt werden).
root:~$ xdpyinfo | less name of display: :0.0 version number: 11.0 vendor string: The X.Org Foundation vendor release number: 10707000 X.Org version: 1.7.7 maximum request size: 16777212 bytes motion buffer size: 256 bitmap unit, bit order, padding: 32, LSBFirst, 32 image byte order: LSBFirst number of supported pixmap formats: 7 supported pixmap formats: depth 1, bits_per_pixel 1, scanline_pad 32 ...
106.2 Einen Display-Manager einrichten
Kandidaten sollten in der Lage sein, einen Display-Manager zu installieren und anzupassen. Dieses Prüfungsziel umfasst die Display-Manager XDM (X Display Manager), GDM (Gnome Display Manager) und KDM (KDE Display Manager).
Wichtigste Wissensgebiete
- Den Display-Manager ein- und ausschalten
- Die Begrüßung des Display-Managers ändern
- Die Standard-Farbtiefe des Display-Managers ändern
- Display-Manager für den Gebrauch durch X-Terminals konfigurieren
/etc/inittab Konfigurationsdateien von xdm Konfigurationsdateien von kdm Konfigurationsdateien von gdm
Allgemeines
- Es gibt xdm (Standard), kdm und gdm.
/etc/inittab
- Defaultrunlevel 5 für grafischen Login
init 5
- Debian Defaultrunlevel 2 für grafischen Login
# The default runlevel. id:2:initdefault: # /etc/init.d executes the S and K scripts upon change # of runlevel. # # Runlevel 0 is halt. # Runlevel 1 is single-user. # Runlevels 2-5 are multi-user. # Runlevel 6 is reboot.
Begrüßungstext
root:/etc/gdm3# cat greeter.gconf-defaults # Use a specific background #/desktop/gnome/background/picture_filename /usr/share/images/desktop-base/login-background.svg #/desktop/gnome/background/picture_options zoom # Theming options #/desktop/gnome/interface/gtk_theme Clearlooks # Greeter options /apps/gdm/simple-greeter/logo_icon_name debian-swirl # Play system beeps - especially the one when the greeter is ready /desktop/gnome/sound/event_sounds true # Some other possible options #/apps/gdm/simple-greeter/banner_message_enable true #/apps/gdm/simple-greeter/banner_message_text Welcome #/apps/gdm/simple-greeter/disable_restart_buttons false #/apps/gdm/simple-greeter/disable_user_list false # The lower panel doesn't work with the compositor /apps/metacity/general/compositing_manager false # Prevent the power management icon from showing up /apps/gnome-power-manager/ui/icon_policy never
- xdm
- kdm
Konfigurationsdateien der Displaymanager
- Changing the default window manager in Linux - alledings gibt es die ~./xinitrc unter Debian nicht per default.
- Unter Debian wird der Defaultwert wie folgt gesteuert:
root:~$ cat /etc/X11/default-display-manager /usr/sbin/gdm3
- xdm
- /etc/X11/xdm-config
- /etc/X11/Xresources
- /etc/X11/xdm/Xsetup
- kdm
- /etx/X11/kdm/kdmrc
- gdm
- man 8 gdm3
- /etc/X11/init/Default
- /etc/opt/gnome/gdm/gdm.conf
- Die Verzeichnisse können in der Wirklichkeit des öfteren abweichen.
- xdm und kdm sind ähnlich
- gdm ist anders, es wird mit dem Kommando gdmconfig konfiguriert.
106.3 Hilfen für Behinderte
Wissen um die Existenz von Hilfen für Behinderte.
Wichtigste Wissensgebiete
- Tastatureinstellungen für Behinderte (AccessX)
- Visuelle Einstellungen und Themen
- Assistive Techniken (ATs)
"Klebrige" und Wiederholungstasten Langsame/Bounce/Umschalt-Tasten Maustasten Desktop-Themen mit hohem Kontrast oder großer Schrift Screen Reader Braille-Anzeige Bildschirmvergrößerung Tastatur auf dem Bildschirm Gesten (beim Anmelden, etwa bei gdm) Orca GOK emacspeak