Arch x keyboard layout (and midori)

28/07/2009

Midori on Openbox with Arch

I’m posting this from the Midori version 0.1.8 Web browser, installed on Arch from the repositories (sudo pacman -S midori). It seems to be snappier than Firefox and certainly appears to use less RAM, although RAM usage isn’t much of an issue on the E2 with 1Gb less the graphics share.

Below is the xorg.conf (most settings auto-detected as I have dbus and hal running, see xinitrc further below). I’m using just openbox as a window manager, and I start it up using startx.

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc"
	FontPath     "/usr/share/fonts/100dpi:unscaled"
	FontPath     "/usr/share/fonts/75dpi:unscaled"
	FontPath     "/usr/share/fonts/TTF"
	FontPath     "/usr/share/fonts/Type1"
EndSection

Section "Module"
	Load  "extmod"
	Load  "glx"
	Load  "dri"
	Load  "dbe"
	Load  "dri2"
	Load  "record"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
        Option      "CoreKeyboard"
        Option      "XkbLayout" "gb"
        Option      "XkbRules"  "xorg"
        Option      "XkbModel"  "pc105"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
        # Available Driver options are
        # Values: i integer, : float, : "True"/"False",
        # : "String", : " Hz/kHz/MHz"
        # [arg]: arg optional
        #Option     "PrintVGARegs"       	# []
        #Option     "PrintTVRegs"        	# []
        #Option     "I2CScan"            	# []
        #Option     "VBEModes"           	# []
        #Option     "NoAccel"            	# []
        #Option     "AccelMethod"        	# 
        #Option     "ExaNoComposite"     	# []
        #Option     "ExaScratchSize"     	# 
        Option     "SWCursor"           	# []
        #Option     "ShadowFB"           	# []
        #Option     "Rotate"             	# []
        #Option     "VideoRAM"           	#
        #Option     "ActiveDevice"       	# []
        #Option     "BusWidth"           	# []
        #Option     "Center"             	# []
        #Option     "PanelSize"          	# []
        #Option     "ForcePanel"         	# []
        #Option     "TVDotCrawl"         	# []
        #Option     "TVDeflicker"        	# i
        #Option     "TVType"             	# []
        #Option     "TVOutput"           	# []
        #Option     "DisableVQ"          	# []
        #Option     "DisableIRQ"         	# []
        #Option     "EnableAGPDMA"       	# []
        #Option     "NoAGPFor2D"         	# []
        #Option     "NoXVDMA"            	# []
        #Option     "VbeSaveRestore"     	# []
        #Option     "DisableXvBWCheck"   	# []
        #Option     "MaxDRIMem"          	# i
        #Option     "AGPMem"             	# i
	Identifier  "Card0"
	Driver      "openchrome"
	VendorName  "VIA Technologies, Inc."
	BoardName   "CX700/VX700 [S3 UniChrome Pro]"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Then comes my .xinitrc dotfile

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec dbus-launch --exit-with-session openbox-session

I’m using feh to set the wallpaper, and an ‘autostart.sh’ script in the .config/openbox directory to load feh first on bootup.

I use a British layout keyboard. Identifying the GB locale during installation meant that the keyboard layout was correctly set for command line use. I had to create an extra XML file to ensure that the UK layout was used under Xorg. There is an Arch forum post that explains the detail – just substitute gb for es in the file. The XML file has to be saved (as root) at /etc/hal/fdi/policy/10-keymap.fdi (I just used sudo leafpad /etc/hal/fdi/policy/10-keymap.fdi and copied the code in. I know Real Men would use Vi at the terminal).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: