How to include setxkbmap in Xorg.conf directly ?

Alan Coopersmith alan.coopersmith at oracle.com
Sun Jun 12 10:01:46 PDT 2011


On 06/11/11 06:13 PM, Aaron Lewis wrote:
> Hi
> 	I put "setxkbmap -option ctrl:nocaps,terminate:ctrl_alt_bksp" in ~/.xinitrc and do startx each time i start my machine  , 
> 	However , when USB keyboard plugged in , keyboard options won't be set on it , i had to run that command again.
> 
> 	Any solutions ? Many thanks for any of your responses.
> 	

GNOME has keyboard prefences you can set in your GNOME-session that suffice
for many users (won't be in effect when not running gnome, or before login
to your gnome-session) - see the "Options" button in the "Layout" menu.

For non-gnome users (*), I include the following file in the Xorg 1.10 packages
I build as /etc/X11/xorg.conf.avail/90-zap.conf - it should work with Xorg 1.8
& later:

# This configuration snippet enables the Ctrl-Alt-Backspace server kill key
#
# To use it, link or copy into /etc/X11/xorg.conf.d/
#
# Note that only the last XkbOptions setting seen for a device will be used,
# so to use multiple options, copy this file and add options into the Option
# string, such as "terminate:ctrl_alt_bksp,ctrl:swapcaps"

Section "InputClass"
    Identifier "keyboard zap by default"
    MatchIsKeyboard "on"

    Option "XKbOptions" "terminate:ctrl_alt_bksp"
EndSection


(*) Okay, mainly for me when I'm doing debugging using throw-away test accounts
or xinit without gnome, and including it in the packages is easier than
remembering to copy it every time I install a test system.   But I know a few
other people use it too, so it's not purely my laziness.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System




More information about the xorg mailing list