Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to apply a custom xmodmap for all users at the start. Where do I need to put it? I have thought at /etc/rc.local? Does this make sense?

share|improve this question
up vote 1 down vote accepted

/etc/rc.local won't work for this situation, because xmodmap requires an X server to talk to.

I know that /etc/X11/Xmodmap is part of the xorg-x11-xinit package on RHEL and Fedora, so make your changes there. They will be used when any new X session starts.

share|improve this answer

I don't have experience with xmodmap, but you can always make a .xmodmaprc file and put it in /etc/skel. The file will be copied to all new users' home, thus applying the settings.

share|improve this answer
This won't affect any existing users or users with already-created home directories (for example, from a network file system). – jsbillings Mar 11 '11 at 14:21
@jsbillings Yeah, sure, you are absolutely right. – phunehehe Mar 11 '11 at 14:55

Your Answer


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.