You are not logged in.
Hey there everyone, I have a macbook air 4.2 and I recently decided to try out arch linux on it. I've been able to figure most of the configuration out but there's one thing that has been annoying me. By default, my command key is mapped as super and control as control. I found a way to change this by following these instructions but this means I have to run this command (xmodmap ~/.xmodmaprc) every time I log in. To resolve this I have tried putting it inside my /etc/rc.local file and also ~/.xinitrc but it seems as if these scripts don't even run the command because when I log in the keymap is back to default. Any help is appreciated, thanks!
Last edited by donut_monger (2013-05-13 02:41:48)
Offline
/etc/rc.local is a part of initscripts, which are deprecated https://www.archlinux.org/news/final-sy … n-warning/
Post your ~.xinitrc.
How are you starting X? Do you run 'startx'?
Offline
Here is my ~/.xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec gnome-session-cinnamon
xmodmap /home/chris/xmodmaprc
I use Slim login manager so starting X is done through that.
Offline
Put 'xmodmap /home/chris/xmodmaprc' before 'exec gnome-session-cinnamon'. The exec part should always be last, as the second note tells you https://wiki.archlinux.org/index.php/Xinitrc all the following lines will just be ignored.
Last edited by karol (2013-05-11 01:29:49)
Offline
Ok, I've done that now. It still doesn't work though. I've had this problem with a lot of things I have tried to do on startup like set the backlight, and audio levels. Could there be something wrong with my install? Running the exact same command
xmodmap /home/chris/.xmodmaprc
works from the terminal, why does it seem to be ignored in the startup script?
Offline
If you are looking for something that doesn't require xmodmap, I am pretty certain this functionality can be handles by xkb itself.
Peruse the file /usr/share/X11/xkb/base.lst. In it there are a whole shit load of options. Find the one you need, and then you can set it globally on X start with /etc/X11/xorg.conf.d/10-evdev.conf. For example, I hate the caps lock with a passion, and I use the windows key as my window manager's mod key. So I have this:
cat /etc/X11/xorg.conf.d/10-evdev.conf
...
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbOptions" "caps:super"
EndSection
...
This is of course assuming that you configure your devices with evdev.
Last edited by WonderWoofy (2013-05-11 01:46:59)
Offline
Put it in ~/.xsession instead. I'm not sure about slim but kdm/xdm/gdm don't read ~/.xinitrc but they do read ~/.xsession. Least, they do here.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
The wiki says https://wiki.archlinux.org/index.php/SLiM
SLiM reads the local ~/.xinitrc configuration and then launches the desktop according to what is in that file.
Offline
If you are looking for something that doesn't require xmodmap, I am pretty certain this functionality can be handles by xkb itself.
Peruse the file /usr/share/X11/xkb/base.lst. In it there are a whole shit load of options. Find the one you need, and then you can set it globally on X start with /etc/X11/xorg.conf.d/10-evdev.conf. For example, I hate the caps lock with a passion, and I use the windows key as my window manager's mod key. So I have this:
cat /etc/X11/xorg.conf.d/10-evdev.conf
...
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbOptions" "caps:super"
EndSection
...This is of course assuming that you configure your devices with evdev.
I don't seem to have a /usr/share/X11/xkb/base.lst file, could you post yours so I can see the options? I tried the option "control:super" but that didn't work. Thanks!
Offline
I think he meant /usr/share/X11/xkb/rules/base.lst. It's provided by xkeyboard-config package.
Last edited by karol (2013-05-11 04:16:53)
Offline
I think he meant /usr/share/X11/xkb/rules/base.lst. It's provided by xkeyboard-config package.
This ^^^
Offline
Hmm... I've tried a few options now and none of them seem to have any effect on the keys. In my xorg.conf.d I only have evdev and synaptics files so I dont think I'm configuring my keyboard with anything else.
Offline
You know if you are configuring through the xorg.conf.d file you have to restart X. It won't just automtically parse and apply new settings if the file is changed.
If you want to test given settings, there is the xkbcomp commmand. Here have a look at this for more info.
Offline
Thanks WonderWoofy, that guide helped a lot, I finally got it working!
Offline
Fantastico! Please mark the thread as [Solved]. This can be done by editing the first post.
Edit: I guess you were probably doing that while I was typing this...
Last edited by WonderWoofy (2013-05-13 02:45:20)
Offline