You are not logged in.
From man xmodmap:
It is usually run from the user's session startup script to configure the keyboard according to personal tastes
Although for me for some reason xmodmap does not remap keys when I run it as a regular user - thus I can't autostart it with X. It does work if i sudo xmodmap though.
So, my question is two-fold, is my outcome as expected and if so how do one use xmodmap with autostart scripts?
If not, where do I begin to look for why I'm getting the results I'm getting and how would I change it?
My user belongs to following groups, don't know if that makes any difference.
lp wheel games network video audio optical storage scanner power users
This is really weird seeing I can't find anything about this anywhere and this system is quite fresh.
1. install arch
2. install xfce
3. install gnome
4. install i3
5. install awesome
currently I'm using awesome and I start x with startx + .xinitrc but find it weird if that would have anything to do about it.
Maybe I'm just overlooking something terribly simple. I hope so.
Update
My bad...
My bad.
User/root had nothing to do with it at all.
Me thinking so was a result of a mix of bad syntax in .Xmodmap combined with the (seemingly) known issue of not always being able to run xmodmap from xinitrc.
Currenly i'm using
{ sleep 5; xmodmap ~/.Xmodmap; } &
in my .xinitrc and it works.
Although... is this (still?) the arch way?
I've read somewhere about mucking around in /etc/X11/xorg.conf.d/10-evdev.conf but IMO and for me it's less preferred since when I backup /home this piece of conf won't tag along.
Anyways, I can live with sleep I guess but... this itch.
What if some day for some reason X takes more than 5 sec to load and what if this day happens in a distant but not too distant future - where I've forgotting about this.
What if I then simply reboot and it either
a) works - I just know I'll get that feeling of why work after reboot?? Sleepless nights.
b) doesn't work - initiate process of why-is-this-not-working-when-it-worked-before? Retrace last actions... This update? Maybe a bugreport. I'll not just waste my hours but hours from across continents, communites and sentient beings from all around the world.
I might be overthinking this but it'd be nice to know.
Last edited by ImbaLocus (2012-05-10 01:13:27)
Offline
xmodmap works perfectly well for me in my .xinitrc.
Your groups are definitely sufficient (I'm not sure it matters).
What's the error message you get when you try and run xmodmap without sudo? For instance, what's the output of
$ xmodmap -pk?
Lenovo Thinkpad T420; Intel sandy bridge i7 2.7GHz; integrated graphics card; 4GB RAM; wifi; Arch; Xmonad WM
Offline
xmodmap works perfectly well for me in my .xinitrc.
Your groups are definitely sufficient (I'm not sure it matters).What's the error message you get when you try and run xmodmap without sudo? For instance, what's the output of
$ xmodmap -pk?
Updated original post - had nothing to do with sudo etc.
What do you use in .xinitrc to remap with xmodmap?
Offline
If you just want to remap capslock into ctrl, as per your thread-title, then just use setxkbmap, which don't need any sleep or nothing...
I use e.g. this line in my .xinitrc to set danish keymap, avoid deadkeys, enable ctrl-alt-backpace termination, and finally to remap caps to ctrl...
setxkbmap -layout dk -variant nodeadkeys -option terminate:ctrl_alt_bksp -option ctrl:nocapsOffline
If you just want to remap capslock into ctrl, as per your thread-title, then just use setxkbmap, which don't need any sleep or nothing...
I use e.g. this line in my .xinitrc to set danish keymap, avoid deadkeys, enable ctrl-alt-backpace termination, and finally to remap caps to ctrl...
setxkbmap -layout dk -variant nodeadkeys -option terminate:ctrl_alt_bksp -option ctrl:nocaps
That line is great!
Allowed me to move se-layout from /etc/.../10-evdev, move option terminate from xorg.conf and finally - as per thread-title - remap caps to ctrl - all in .xinitrc
Thank you.
Offline