LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-28-2004, 08:02 PM   #1
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Rep: Reputation: 30
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"
 
Old 11-28-2004, 08:34 PM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Have you tried just doing this?

Code:
cat > ~/.kde/Autostart/mybuttons << EOF
#!/bin/bash
xmodmap -e "pointer = 1 2 3 6 7 4 5"
EOF
chmod 700 ~/.kde/Autostart/mybuttons
I don't know for sure that this would work, but it seems like the most obvious thing to try first.
 
Old 11-28-2004, 08:45 PM   #3
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Original Poster
Rep: Reputation: 30
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 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.
 
Old 11-28-2004, 08:59 PM   #4
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
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.
 
Old 11-28-2004, 09:35 PM   #5
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Original Poster
Rep: Reputation: 30
I don't know how to give it execute permissions.
 
Old 11-28-2004, 10:00 PM   #6
tw001_tw
Member
 
Registered: Mar 2003
Location: St. Louis, MO
Distribution: kubuntu-current
Posts: 551
Blog Entries: 4

Rep: Reputation: 31
"chmod 700 ~/.kde/Autostart/mybuttons"

chmod 700 makes a script exacutable.

-tw
 
Old 11-29-2004, 03:57 AM   #7
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
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
 
Old 11-29-2004, 04:05 PM   #8
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Original Poster
Rep: Reputation: 30
Didn't work for nothing for me, same deal with buttons being reversed, scroll is fwd and back, fwd and back is scroll.
 
Old 11-29-2004, 06:55 PM   #9
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
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".
 
Old 11-30-2004, 04:21 AM   #10
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Original Poster
Rep: Reputation: 30
I'll double check it when I get home tonight, I've been pretty busy lately.
 
Old 11-30-2004, 05:12 PM   #11
Slovak
Member
 
Registered: Oct 2004
Location: North Olmsted, Oh
Distribution: Slackware 10
Posts: 206

Original Poster
Rep: Reputation: 30
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.
 
Old 11-30-2004, 06:21 PM   #12
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script adding autostart gnome script Coolrunr Programming 3 01-01-2009 02:23 PM
How can I create KDE/Gnome menu shorcut via perl script? mf1234 Programming 1 08-16-2005 05:46 PM
How can I create a script to start my network? asdfjkl Linux - Wireless Networking 3 08-12-2004 09:12 AM
How to create start tomcat icon on kde desktop? gepesz Linux - Software 2 06-19-2004 08:44 AM
How to create a tiny script and make it start automatically tchigi Linux - Newbie 2 11-28-2003 03:48 AM


All times are GMT -5. The time now is 09:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration