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.

Possible Duplicate:
Why won’t my xmodmap command run on startup/login?

I have my .bashrc file with the three following commands:

xmodmap ~/.xmodmap
synclient TapButton2=2
synclient ClickFinger2=3

They are supposed to execute when I log in, right? But the changes do not happen in my system (LInux Mint 12) unless I open a terminal window which will execute those commands again.

I would like to perform those commands when I log in and to remove then from bashrc, so I put them on .profile but they also keep not changing the behavior from my keyboard and touchpad.

What am I doing wrong here?

share|improve this question

marked as duplicate by jasonwryan, Mat, jw013, Renan, Gilles Nov 15 '12 at 23:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
.bashrc is read when you open a terminal. .profile is read when you log in in text mode; depending on your distribution, it may or may not also be read when you log in in graphical mode. See Alternative to .bashrc –  Gilles Nov 15 '12 at 23:34
add comment

1 Answer 1

up vote 3 down vote accepted

xmodmap only does anything once you are already in an X session (because it has to make calls to the X server), and neither ~/.bashrc (nor ~/.profile) guarantee that, nor will they be automatically executed once you enter an X session. You need to put it into your startup configuration.

If you are using startx or xinit to launch X, put this in ~/.xinitrc. If you're using something else, look at your documentation to find out where you should put startup applications.

share|improve this answer
    
Well, I made a small shellscript with those commands and put it to run via Mint's GUI. Thanks for your help. –  Thiago Moraes Nov 15 '12 at 19:37
add comment

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