Inhaltsverzeichnis

Xorg Tips

X-server Configuration, default way

According to slackware-13.0/CHANGES_AND_HINTS.TXT as of Slack 13.0 an xorg.conf is not necessary any more. But mouse and keyboard might still need customization:

Keyboard

Slack 13.37

To set e.g. a German keyboard layout copy /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf to /etc/X11/xorg.conf.d/90-keyboard-layout.conf and edit the line

Option "XkbLayout" "us"

to

Option "XkbLayout" "de"
This can be done with the script my_slack_settings.

Slack 13.0 - 13.1

To set e.g. a German keyboard layout copy /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy/ and edit the line

<merge key="input.xkb.layout" type="string">us</merge>

to

<merge key="input.xkb.layout" type="string">de</merge>

From slackware-13.0/CHANGES_AND_HINTS.TXT.

Touchpad

Slack 13.37

Scrolling works out of the box. Just use 2 fingers instead of one finger on left side.

Touchpad and USB-Mouse with wheel at the same Time

Only necessary for Slack 13.1 and below

To enable vertical scrolling when dragging along the right edge uncomment the line, copy /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi to /etc/hal/fdi/policy/ and uncomment the line:

<merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>

FIXME How to enable „taps“ for emulating the left mouse key?

X-server Configuration, old way

You might still need an /etc/X11/xorg.conf even with Slack 13.0 and above e.g. if you want to use a binary only graphics card driver. You can create a basic xorg.conf with xorgsetup (Or X -configure if you don't have Slackware) See slackware-13.1/CHANGES_AND_HINTS.TXT

xorg.conf & xorg.conf.vesa are initially the same (Slack10.2 - Slack12.2). Copy xorg.conf to xorg.conf.org to indicate that the pristine file is still present (usfull for automated later upgrades with Upgrading Configuration Files with a three-way File Merge)

Note: With Slack 12.2, a built in graphic card from Intel and a 1280×1024 LCD monitor, the command xorgsetup (see slackware-12.2/Slackware-HOWTO did a great job. Everything (keyboard, mouse, card) worked out of the box. (Just adding DPMS was necessary (see below).) So try this first!

Overall File Structure

xorg.conf
|
|-- Module
|
|-- Files
|
|-- Server Flags
|
|   /-- InputDevice kbd (Keyboard)
|   |
|   |-- InputDevice mouse
|   |
|   |   /-- Monitor
|   |   |
|   |   |-- Device (graphics card)
|   |   |
|   |-- Screen
|   |
`-- ServerLayout

Keyboard

#Option "XkbModel"      "pc105"       # activates the '<|>' Key
                                      # not necessary anymore since slack12.2
Option "XkbLayout"	"de"          # activates the Umlauts
Option "XkbVariant"	"nodeadkeys"

Note: In case of doubt you can try and find out the necessary configuration settings for xorg.conf with KdeControlCenter→ Regional&Acessibility→ KeybordLayout. These settings overwrite the settings of xorg.conf

Mouse

Symlink /dev/mouse

(→ /dev/psaux for PS2-mice und notebooks - not valid any more for Slack12.0 and above, here the default always seems to be /dev/input/mice regardless if it is an PS2 or USB mouse)

/dev/input/mice for USB-mice. Source: delete /dev/mouse start X, then a dialog appears, where USB-mice can be selected and the proper symlink will be created — fritz / Slack10.2 / 2006-07-31

Check symlink with cat /dev/mouse — 2006-08-02

Activate Mouse Wheel

Option "ZAxisMapping" "4 5"

Dieser Eintrag kam von kxconfig (ilse / slack 9.0) und mappt die Z-Achse (=Mausrad) auf die virtuellen Tasten 4 & 5;
ohne diesen funzt das Mausrad nicht. Siehe auch /usr/X11/lib/X11/doc/README.mouse

Not necessary as of Slack 12.0 any more:

Option "Protocol" "IMPS/2"

See „The darn scroll wheel in 10.2“ auf http://groups.google.de/group/alt.os.linux.slackware — fritz / Slack10.2 / 2006-08-02

Generic PS2 Mouse

Option  "Protocol"      "Auto" # Not PS/2, otherwise middle Button/Wheel doesn't work!
Option  "Device"        "/dev/mouse"
Option  "ZAxisMapping"  "4 5"

Touchpad and USB-Mouse with wheel at the same Time

Since Slack 12

Verify symlink: /dev/mouse → /dev/input/mice

# file: /etc/X11/xorg.conf
...
Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"     "Auto"
    Option      "Device"       "/dev/mouse"
    Option      "ZAxisMapping" "4 5"
EndSection
Below Slack12
# file: /etc/X11/xorg.conf
...
Section "InputDevice"
    Identifier  "myTouchpad"
    Driver      "mouse"
    Option      "Protocol"     "PS/2"
    Option      "Device"       "/dev/psaux"
EndSection
 
Section "InputDevice"
    Identifier	"myUSBMouse"
    Driver	"mouse"
    Option      "Protocol"     "IMPS/2"
    Option      "Device"       "/dev/input/mice"
    Option      "ZAxisMapping" "4 5"
EndSection
...
Section "ServerLayout"
    ...
    InputDevice "myTouchpad"   "CorePointer"
    InputDevice "myUSBMouse"   "SendCoreEvents"
    InputDevice "Keyboard1"    "CoreKeyboard"
EndSection

Source: „Usb Scroll Mouse and PS/2 Touchpad…At the same time“ auf http://groups.google.de/group/alt.os.linux.slackware

Monitor

Since Slack 12.0 I just keep the defaults from the original xorg.conf

Device (graphics card)

Selectin the right driver my have an impact on the look of the fonts in KDE (Slack10.2 / fritz) and xine, which my lose too much frame with the vesa driver only.

lspci -v helps to identify the card type. Then get the appropriate driver name with xorgconfig and edit xorg.conf manually.

Note: Sometimes xorgconfig does not help. Eg on a Compaq 6710b Notebook you have an intel card. But the type or driver is not listed in xorgconfig. In this case search the internet with eg „compaq 6710b 1280×800 notebook xorg.conf“ and you may find help which states that the driver is 'intel'. Also peeking at the autogenerated xorg.conf of a live-CD like Slax may help to get the right settings.

Examples:

Section "Device"
    Identifier  "myaticard"
    Driver      "ati"
EndSection
Section "Device"
    Identifier  "myintelcard"
    Driver      "intel"
EndSection

Screen

DPMS

Add

Option "DPMS"

to the screen section. This enables display power management. (Source: Battery-Powered Howto) This enty is also possible in section monitor as a „per monitor“ option.

If you want to modify the default values for standby, suspend and off-time, you have to set StandbyTime, SuspemdTime and OffTime in section ServerFlags, see man xorg.conf for the default values and more info.

Widescreen Notebooks

You have to know the native resolution of the notebook eighter from the data sheet, or a live CD like Slack. Then add the resolution as the first mode. The example shows the settings for a Compaq 6710b:

Section "Screen"
    ...
    Subsection "Display"
        Depth 24
        Modes "1280x800" "1024x768" ...
    EndSubsection
    ...
EndSection

Open / Todo

Nvidia driver setup

Nvidia cards work better with their propiretary driver. See Nvidia driver setup to check if this is necessary and how it is done.

Schriften / Fonts

Howto

Schriften werden einfach vom Netz runtergeladen entpackt und in eines der Verzeichnisse gelegt, die in /etc/fonts/fonts.conf aufgeführt sind. Es empfiehlt sich für jede neue Schrift / Schriftpaket ein eigenes Unterverzeichnis anzulegen.

Siehe auch http://eyegene.ophthy.med.umich.edu/unicode/#fontinst (gefunden bei Inkscape in einem durch Zufallsscript ausgewähltem Beispielbild für Unicode). Hilfreich auch http://ldp.bootet.net/HOWTO/Font-HOWTO/ und evt man fonts-conf

/etc/fonts/fonts.conf gehört wie /etc/X11/xorg.conf auch zum X11-Paket. Jedoch bisher keine Ahnung wie die Font-Einträge in xorg.conf mit denen von fonts.conf in Verbindung stehen. — becki 2006-08-22 22:30

Schriftpakete

Speziell Aterm / Xterm

Schriftart (und damit auch Größe) kann man angeben als Schalter mit -fn oder in ~/.Xdefaults zB in der Zeile Aterm*font: Als Wert kann dabei jeweils ein Angabe in der Form wie zB 9×18 oder -misc-fixed-medium-r-normal-*-15-*-*-*-*-*-iso8859-15 stehen

Quelle Kurzform: man aterm und locate 7×14 ergibt die Fonts in /usr/X11/lib/X11/fonts/misc/ als einzige Möglichkeit.
Quelle Langform: Vorlage aus Konfigbeispielen von Fluxbox und durch Rumprobieren mit xfontsel

FIXME Mal bei Fluxbox nachgucken, wie die Artwitz-Fonts in aterm konfiguriert werden

Drucken

Bei Kword und Abiword (Stand Slack 10.1; Rechner berta; Drucker Canon S500; 2006-10-08) muß beim Druckbefehl auf jeden Fall „Schriften einbinden“ bzw. „Schriften einbetten“ angehakt werden, sonst entstehen bei Abiword Lücken nach Umlauten und bei Kword werden keinerlei Serifen verwendet. Das aktikvieren bewirkt, daß die Fonts mit zum Drucker geschickt & nicht die Druckereigenen Schriften verwendet werden. Quelle: Hilfe von Abiword

Antialiasing

Kantenglättung muß bei Kde unter Kontrollzentrum > Erscheinungsbild > Schriften aktiviert werden, sonst sieht alles beschissen aus. Bei fluxbox scheint das defaultmäßig aktiviert zu sein

Displaymanager

startx

startx is not a displaymanager, but it can also start an X-Session, when no displaymanager is running, typically in runlevel 3.

Kdm

Background Infos

Ermittelt auf Slack 10.2 — 2006-02-15 11:32
Infoquelle: KDE-Hilfezentrum → Kontrollzentrum-Module → Anmeldungsmanager
config-dir: cfgdir=/etc/kde/kdm
Konfig-Datei: $cfgdir/kdmrc

Remote Login

— Slack11.0 2006-11-04 09:13

AppServer Side

Enable Xsmcp in /opt/kde/share/config/kdm/kdmrc

[Xdmcp]
Enable=true

FIXME How to restrict acces to only certain terminal hosts?

Terminal Side

Substiute /etc/rc.d/rc.4 with:

while true; do
    echo "Starting up X11 session manager..."
    /usr/X11/bin/X -query hostnameOfAppServer
done

GUI Configuration

As of KDE4 the KDM configuration dialog is hard to find. Start it with kdesu kcmshell4 kdm from a terminal! Found this with Alt + F2 → rype kdm → Select appropriate proposal (logged into KDE4 as normal user)

WM-independent Autostart

#!/bin/bash
numlockx on
xscreensaver -no-splash &
mrxvt -ip 0,1,2 &
gkrellm --withdrawn &
firefox &
thunderbird &
jedit &
kmix &
#...
. .xprofile # <== insert this line
# Start the window manager:
exec /usr/bin/startfluxbox
exec /usr/bin/startfluxbox

This will always start your autostart apps either after calling startx (in runlevel 3) or after login in KDM, GDM or XDM (in runlevel 4) , regardless which WM you selected.

Note that you you have to unselect KDE Control Center → KDE Components → Session Manager → On Login → Restore previous session if you use KDE, otherwise more and more autostart apps would be startd on every login!

GDM, XDM

Stand: Slack 10.0
Einzige Info zu gdm gibts nur mit der Gnome-Hilfe /usr/bin/gnome-help → yelp
Info zu xdm: man xdm
gdmconfig ist eine Gui zum Konfigurieren von /etc/X11/gdm/gdm.conf

xdm startet /etc/X11/xdm/Xsession ohne Argumente (verifizieren!), dieses versucht daraufhin ~/.xsession auszuführen, & wenns das nicht gibt /etc/X11/xinit/xinitrc (so wie bei startx)

gdm sucht u.a in /etc/X11/sessions/ & /etc/X11/dm/Sessions/ (letzteres veraltet, kann in gdm.conf mit SessionDesktopDir geändert werden) nach <windowmanger>.desktop Dateien (z.B fluxbox.desktop).
Diese sind im Anmeldebildschirm auswählbar. Sie enthalten alle einen Pfad zum zu starteten script, dies ist bei allen „/etc/X11/xdm/Xsession <windowmanager>“

gdm führt jedoch nicht /etc/X11/xdm/Xsession sondern immer /etc/X11/gdm/Xsession aus & übergibt and dieses „/etc/X11/xdm/Xsession <windowmanager>“ (bzw „/etc/X11/xdm/Xsession default“ wenn „voreingestellte Systemsitzung“ ausgewählt wurde)
xdm/Xsession & gdm/Xsession sind fast gleich, nur das PV bei gdm/Xsession das zusätzlich im 1.Argument enthaltene /etc/X11/xdm/Xsession wieder rausfiltert & nur <windowmanger> drinläßt
Findet Xsession den jeweils ausgewählten <windowmanger>, so wird er mit z.B „exec fluxbox“ gestartet.

Dies alles ausprobiert über die erstellte Datei /etc/xprofile & logger. Diese wird von xdm/Xsession & gdm/Xsession gesourced & kann imho zum WM- und user-unabhängen autostart von Programmen verwendet werden.

Multimedia Keys

Map Keycodes to Keynames

Get the numerical keycodes of your multimedia key with command xev. The decimal number behind the word 'keycode' in stdout is the keycode.

Map the keycodes with the appropiate xorg-events in the file ~/.Xmodmap per user or better in /etc/X11/xinit/.Xmodmap for all users. For a valid list of keynames look at /usr/X11R6/lib/X11/XKeysymDB

These files are passed to the xmodmap command in the scripts /etc/X11/xinit/xinitrc and ~/.xinitrc, i.e. when X is starting via startx. /etc/X11/xinit/.Xmodmap is also applied when X isn't started with startx but with e.g. the fluxbox-entry in kdm or gdm (tested on fritz/Slack10.2).

My .Xmodmap file: (Another example can be found at http://www.xs4all.nl/~hanb/configs/dot-Xmodmap )
FIXME Put in my real Xmodmap!

! These are the for the multimedia keys on my keyboard.
keycode          161 = XF86Calculator
keycode          223 = XF86Sleep
keycode          174 = XF86AudioLowerVolume
keycode          176 = XF86AudioRaiseVolume
keycode          160 = XF86AudioMute
keycode          162 = XF86AudioPlay
keycode          164 = XF86AudioStop
keycode          144 = XF86AudioPrev
keycode          153 = XF86AudioNext
keycode          237 = XF86AudioMedia

See also: Configure Your Keyboard Into Submission

Fluxbox Key Bindings

Key Bindings are done in ~/.fluxbox/keys

My default keys file: (Another example can be found at http://www.xs4all.nl/~hanb/configs/keys )
FIXME Compare this keyfile with keyfile from ilse!
FIXME Merge Fluxbox infos from install_config_tips!

# Legend:
# Alt      : Mod1
# OS-Key   : Mod4
# Pic-up   : Prior
# Pic-down : Next
 
# Workspace Handling:
Mod4 Tab          :NextWorkspace
Mod4 Shift Tab    :PrevWorkspace
Control F1        :Workspace 1
Control F2        :Workspace 2
Control F3        :Workspace 3
#Control F4        :Workspace 4
 
# Window Handling:
Mod1 Tab          :NextWindow 1
Mod1 Shift Tab    :PrevWindow 1
Mod4 Left         :Move -10   0
Mod4 Right        :Move  10   0
Mod4 Up           :Move   0 -10
Mod4 Down         :Move   0  10
Mod4 N            :Minimize
Mod4 M            :MaximizeWindow
Mod4 V            :MaximizeVertical
Mod4 D            :ToggleDecor
Mod1 F4           :Close
 
# Tab Handling:
Mod4 Next         :NextTab
Mod4 Prior        :PrevTab
#Mod4 Tab          :NextTab
#Mod4 Shift Tab    :PrevTab
Mod4 T            :DetachClient
 
# Fluxbox control:
Mod1 F2           :ExecCommand fbrun
Mod4 L            :ExecCommand xscreensaver-command -lock
Mod4 R            :RootMenu
Mod4 W            :WorkSpaceMenu
#Mod4 Q            :Quit
 
# Multimeda Keys:
#None XF86AudioLowerVolume :ExecCommand amixer set Master 1-
None XF86AudioLowerVolume :ExecCommand amixer set PCM 1-
None XF86AudioRaiseVolume :ExecCommand amixer set PCM 1+
None XF86AudioMute        :ExecCommand amixer set Master toggle

Key bindings defined in ~/.fluxbox/keys are not available for other apps, eg firefox any more. The fluxbox docs about keybinding are here

Old

dumpkeys
xev - print contents of X events (keycodes, Tastatur-Scancodes from fluxbox-manual)
xprop - property displayer for Xorg (from fluxbox-manual)
  E.g.: xprop | grep -i WM_CLASS
xfd - display all the characters in an X font (aus czyborra.com)
xfontsel - Schriftarten-Konfigurator (aus "The Linux Cookbook)
xlsfonts [*times*] - list X-fonts available on your system, list all fonts with times
xvidtune - Monitorfrequenzen angucken & verändern. Aus XFree86 Video Timings HOWTO