You are not logged in.

#1 2014-06-07 18:36:21

ahuja
Member
From: méxico
Registered: 2013-05-06
Posts: 7

[Solved]How to apply Xorg changes

I had been trying to change my keyboard layout from 'us' to 'us-acentos'. The nearest configuration I found was the 'us-intl' option in Xkblayout.

I use this command to change de keyboard layout:

 $ sudo setxkbmap -layout us -variant intl -option us-intl 

I got it from this wiki https://wiki.archlinux.org/index.php/Ke … on_in_Xorg

But I have to put that command every time I start my computer so I add the options to my /etc/X11/xorg.conf.d/10-keyboard.conf

Section "InputClass"
        Identifier "keyboard-layout"
        Driver "evdev"
        MatchIsKeyboard "yes"
        Option "XkbLayout" "us, gb, ru, ca, fr"
        Option "XkbVariant" "intl"
        Option "XkbOptions" "us-intl"
EndSection

but the changes I have made doesn't seems to be working.
Made a reboot, the changes are there but aren't working.

So I checked this section of the wiki that says to run a Xorg :0 -configure to create a new Xorg configuration file, this is the xorg.conf.new:

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/TTF/"
	FontPath     "/usr/share/fonts/OTF/"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/100dpi/"
	FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
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, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "NoAccel"            	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "Backlight"          	# <str>
        #Option     "DRI"                	# <str>
        #Option     "ColorKey"           	# <i>
        #Option     "VideoKey"           	# <i>
        #Option     "Tiling"             	# [<bool>]
        #Option     "LinearFramebuffer"  	# [<bool>]
        #Option     "VSync"              	# [<bool>]
        #Option     "PageFlip"           	# [<bool>]
        #Option     "SwapbuffersWait"    	# [<bool>]
        #Option     "TripleBuffer"       	# [<bool>]
        #Option     "XvPreferOverlay"    	# [<bool>]
        #Option     "HotPlug"            	# [<bool>]
        #Option     "ReprobeOutputs"     	# [<bool>]
        #Option     "XvMC"               	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "VirtualHeads"       	# <i>
        #Option     "TearFree"           	# [<bool>]
        #Option     "PerCrtcPixmaps"     	# [<bool>]
        #Option     "FallbackDebug"      	# [<bool>]
        #Option     "DebugFlushBatches"  	# [<bool>]
        #Option     "DebugFlushCaches"   	# [<bool>]
        #Option     "DebugWait"          	# [<bool>]
        #Option     "BufferCache"        	# [<bool>]
	Identifier  "Card0"
	Driver      "intel"
	BusID       "PCI:0:2: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

but doesn't have my keyboard 'intl'  options. Maybe if I change the 'Keyboard0' for 'Keyboard-layout' in "ServerLayout" section will do the trick, but if that doesn't work probably I don't be able to type anything anymore.

I also tried getting the

 $ sudo setxkbmap -layout us -variant intl -option us-intl 

command inside my ~/.xinitrc but it's not working.

Can anyone help me to apply the changes I've made in Xorg?
I just want the keyboard configuration stays permanent.
Thanks in advance.

Last edited by ahuja (2014-06-09 01:06:42)


You need to work harder so you can enjoy laziness.

Offline

#2 2014-06-07 20:28:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]How to apply Xorg changes

What's the output of 'setxkbmap -v 10' after you apply the configuration manually? What's the output on reboot?
You don't need to use 'sudo' in your ~/.xinitrc. Post your ~/.xinitrc.

Offline

#3 2014-06-07 20:31:26

dudefellaguy
Member
Registered: 2012-02-08
Posts: 21

Re: [Solved]How to apply Xorg changes

I'm pretty sure that if you omit the 'sudo' (which you don't need) from the command in the xinitrc file, everything should work fine. The reason it won't work is because sudo needs to be run from an interactive terminal in order to read the password from the user.

Offline

#4 2014-06-07 21:06:54

ahuja
Member
From: méxico
Registered: 2013-05-06
Posts: 7

Re: [Solved]How to apply Xorg changes

This is my ~/.xinitrc

#!/bin/bash

export DE=openbox

# Dbus fix
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
    eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi

/usr/bin/xdg-user-dirs-update

# start openbox
/usr/bin/openbox-session > ~/.openbox_startup.log 2>&1

#keyboard
setxkbmap -layout us -variant intl -option us-intl

This is the 'setxkbmap -v 10' output:

 $ sudo setxkbmap -v 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc104
layout:     us, gb, ru, ca, fr
variant:    intl
options:    us-intl
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+gb:2+ru:3+ca:4+inet(evdev)
geometry:   pc(pc104)

It's printing the changes I've made, there is the 'intl' variant and the 'us-intl' option but when I type keeps acting like just 'us'.

And the output after reboot, I don't get any output, it's just starting normally but with the 'us' keyboard, it's not taking the 'us-intl' option.

Last edited by ahuja (2014-06-07 21:13:42)


You need to work harder so you can enjoy laziness.

Offline

#5 2014-06-07 22:22:36

ahuja
Member
From: méxico
Registered: 2013-05-06
Posts: 7

Re: [Solved]How to apply Xorg changes

Ok I found the way to get the 'us-intl' option running on every session. Instead of getting the comand

 setxkbmap -layout us -variant intl -option us-intl

in my ~/.xinitrc I put it in the openbox autostart file. But I still want to know how to make the changes in Xorg to take effect.


You need to work harder so you can enjoy laziness.

Offline

#6 2014-06-08 10:27:04

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved]How to apply Xorg changes

ahuja wrote:

I got it from this wiki https://wiki.archlinux.org/index.php/Ke … on_in_Xorg

But I have to put that command every time I start my computer so I add the options to my /etc/X11/xorg.conf.d/10-keyboard.conf

Section "InputClass"
        Identifier "keyboard-layout"
        Driver "evdev"
        MatchIsKeyboard "yes"
        Option "XkbLayout" "us, gb, ru, ca, fr"
        Option "XkbVariant" "intl"
        Option "XkbOptions" "us-intl"
EndSection

but the changes I have made doesn't seems to be working.
Made a reboot, the changes are there but aren't working.

The wiki link you gave says: 'You must specify as many variants as the number of specified layouts.'
So you need to add commas for the other layouts in your "XkbVariant" line.

And there is no "us-intl" options in the output of 'localectl list-x11-keymap-options' which gives the lists of available options.
But:

$ localectl list-x11-keymap-variants|grep intl
alt-intl
altgr-intl
dvorak-alt-intl
dvorak-intl
intl
mac_intl
us-intl
workman-intl

"us-intl" is listed in the variants not the options.
So you could try

Section "InputClass"
        Identifier "keyboard-layout"
        Driver "evdev"
        MatchIsKeyboard "yes"
        Option "XkbLayout" "us, gb, ru, ca, fr"
        Option "XkbVariant" "us-intl,,,,"
EndSection

I have not tested it, this is just to make suggestions from what I understand from the doc...

Offline

#7 2014-06-08 12:16:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]How to apply Xorg changes

Move the 'setxkbmap' line in your ~/.xinitrc up, so that you start openbox on the last line.

Offline

#8 2014-06-09 00:36:14

ahuja
Member
From: méxico
Registered: 2013-05-06
Posts: 7

Re: [Solved]How to apply Xorg changes

berbae , yes, you're right about the 'us-intl' is listed as X11 keyboard variant, but when you run the command in terminal you must use it as an option:

 $sudo setxkbmap -layout us -variant intl -option us-intl 

Anyway I try your suggestion with the Xorg file:

 $sudo nano /etc/X11/xorg.conf.d/01-keyboard-layout.conf
Section "InputClass"
        Identifier "keyboard-layout"
        Driver "evdev"
        MatchIsKeyboard "yes"
        Option "XkbLayout" "us"
        Option "XkbVariant" "us-intl"
EndSection

Made a reboot and there's no change in keyboard, is still working like 'us' configuration. Maybe I need to do something to the changes in xorg to take effect.

Karol you were totally right, the command in my ~/.xinitrc wasn't working because was at the bottom, just have to put it above the start open box session line.

Last edited by ahuja (2014-06-09 00:36:46)


You need to work harder so you can enjoy laziness.

Offline

#9 2014-06-09 00:48:25

ahuja
Member
From: méxico
Registered: 2013-05-06
Posts: 7

Re: [Solved]How to apply Xorg changes

berbae wrote:

The wiki link you gave says: 'You must specify as many variants as the number of specified layouts.'
So you need to add commas for the other layouts in your "XkbVariant" line.

Thanks berbae, I just did:

$sudo nano /etc/X11/xorg.conf.d/01-keyboard-layout.conf
Section "InputClass"
        Identifier "keyboard-layout"
        Driver "evdev"
        MatchIsKeyboard "yes"
        Option "XkbLayout" "us"
        Option "XkbVariant" "intl"
        Option "XkbOptions" "us-intl"
EndSection

Now it's working without any special line in ~/.xinitrc or openbox autostart.

Now I can start making my own customs xorgs :-D

Thanks!

Last edited by ahuja (2014-06-09 00:50:05)


You need to work harder so you can enjoy laziness.

Offline

#10 2014-06-09 01:05:21

root
Member
From: 127.0.0.1
Registered: 2012-04-13
Posts: 297

Re: [Solved]How to apply Xorg changes

Not sure but it seems that you just removed some language options in the Xkblayout section for it to work, didn't you?

Anyway, if you do not want to investigate further and consider you are fine with what you have now working, remember to mark your thread as solved (in case you do not know how, edit the initial message and add [Solved] to the title).


\(o_X)/
                        'Cause I wanna be an Archy - An Archy in the UK // Sex Pistols

Offline

Board footer

Powered by FluxBB