How do I create a script to start up in .kde/Autostart?
I want to put this in there instead of .xinitrc
xmodmap -e "pointer = 1 2 3 6 7 4 5" |
Have you tried just doing this?
Code:
cat > ~/.kde/Autostart/mybuttons << EOF |
What I did was just create a file in .kde/Autostart with this in it...
#!/bin/bash xmodmap -e "pointer = 1 2 3 6 7 4 5" saved it and it auto saved as a shell script, I removed the one from .xinitrc and rebooted thinking all would be well, boy was i wrong. The mouse worked all right, but my scroll up and down now acted as foreward and back, and my foreward and back buttons acted as scroll :confused: on my 7 button mouse. So I deleted my new script file and put it back in .xinitrc located in /etc/X11/xinit and it works right again. |
I might be steering you wrong (I didn't even know about the Autostart folder until you mentioned it), but did you make sure the script had execute permissions?
I can't do any testing for another couple of hours, so post a reply and I'll check back in after I get something working at home. |
I don't know how to give it execute permissions.
|
"chmod 700 ~/.kde/Autostart/mybuttons"
chmod 700 makes a script exacutable. -tw |
Just in case you're waiting for my results, setting the script executable worked perfectly for me. Just type the command tw posted, and everything should be fine. An alternative command (that does almost the exact same thing) is:
Code:
chmod u+x ~/.kde/Autostart/mybuttons |
Didn't work for nothing for me, same deal with buttons being reversed, scroll is fwd and back, fwd and back is scroll.
|
When you're in X with the dodgy button setup, if you open a terminal and run that xmodmap command, does it fix the problem? (It should take effect instantly).
If it does, double and triple check the permissions on your script (ls -l ~/.kde/Autostart - you should see something like: "-rwx------ (usernames, sizes, etc) mybuttons". If that's ok, add an extra command to your script to make sure it's running when you log in... something like "touch ~/yes_i_am_running". |
I'll double check it when I get home tonight, I've been pretty busy lately.
|
I got it, I have no idea what went wrong the first time I tried it, but it works this time. Thanks for the help. I think what I did wrong the first time was doing this as root, instead of user...
cat > ~/.kde/Autostart/mybuttons << EOF #!/bin/bash xmodmap -e "pointer = 1 2 3 6 7 4 5" EOF chmod 700 ~/.kde/Autostart/mybuttons This time I did it as user and all is well, thanks again. |
Heh... if you did it as root, then the ~ part would expand to root's home directory instead of your own, so the file would be created in the wrong place :)
|
All times are GMT -5. The time now is 02:13 AM. |