Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What is the proper place for setxkbmap command in Xfce? What is the proper place for it in general - other DEs and bare WMs? I have the following command:

setxkbmap -layout "us(colemak), ru(typewriter)" -option "grp:menu_toggle"

Putting it in .xsession didn't work. I want to make this command run, to make it work globally in GUI.

Edit (18.09.12): I went xfce4-settings-manager -> Session and Startup -> Application Autostart, then clicked "Add". There i tried to put two commands to make it work.

  1. The full setxkbmap command that i gave above verbatim under "Command".

  2. Created an executable file with the command in my PATH, put the file name under "Command".

Both variants didn't work. However the full path to the executable file with the command under "Command" text field worked.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You can do this:

cp /etc/xdg/xfce4/xinitrc ~/.config/xfce4/xinitrc

Then edit that file you just copied to and add anything you want. Your script will take precedence over the system one.

Take heed of the comments, however, since session manager will take over and any part of the script that comes after it won't be executed. Put your line somewhere before that.

However, if might also work to open the settings manager and select Keyboard, and Layout tab. Try making changes there. But I'm not sure you can do there what you need.

share|improve this answer
add comment

"Anywhere"

You can put that as an autostart command, in xfce4-settings-manager -> Startup, and add a command (If you launch X with startx command, just put that line in ~/.xinitrc)

Or put the corresponding xkbconfig in Xorg.conf, e.g /etc/X11/xorg.conf.d/XX.conf, with the following

Section "InputClass"
    Identifier "Keyboard Options by default"
    MatchIsKeyboard "on"

    Option "XkbLayout" "us , ru"
    Option "XkbOptions" "grp:menu_toggle"
EndSection
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.