View previous topic :: View next topic |
Author |
Message |
n8wood n00b
Joined: 11 Apr 2002 Posts: 33 Location: providence, ri usa
|
Posted: Fri Jun 21, 2002 2:40 am Post subject: xmodmap and xinitrc problem |
|
|
I am trying to add an xmodmap command during X startup to enable mouse scrolling (Intellimouse Explorer). I created an xmodmap file (/etc/x11/xinit/.Xmodmap) and inserted this argument:
-e "pointer = 1 2 3 6 7 4 5"
This works fine if I run it manually, but it doesn't seem run on startup. I even tried inserting the command directly in the /etc/x11/xinit/xinitrd file to no avail. I also tried creating a $HOME/.xinitrc file with the full xmodmap command. I checked permissions on all files being used. Still no luck
Am I missing something?
=====================================
here is my /etc/x11/xinit/xinitrc file if it helps:
#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=XINITDIR/.Xresources
sysmodmap=XINITDIR/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi
# First try ~/.xinitrc
if [ -f "$HOME/.xinitrc" ]; then
XINITRC="$HOME/.xinitrc"
exec /bin/sh "$HOME/.xinitrc"
# If not present, try the system default
elif [ -n "`/etc/X11/chooser.sh`" ]; then
exec "`/etc/X11/chooser.sh`"
# Failsafe
else
# start some nice programs
twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
fi
/X11R6/bin/xmodmapp -e "pointer = 1 2 3 6 7 4 5" |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Fri Jun 21, 2002 2:49 am Post subject: |
|
|
Try putting 'ZAxisMapping "4 5"' in your mouse section of XF86Config. |
|
Back to top |
|
|
n8wood n00b
Joined: 11 Apr 2002 Posts: 33 Location: providence, ri usa
|
Posted: Fri Jun 21, 2002 11:48 am Post subject: |
|
|
I use:
Option "ZAxisMapping" "6 7"
because I have a seven button optical mouse, and I've read in these forums that "4 5" is for the 5 button optical mouse. I'd like to use all seven buttons. |
|
Back to top |
|
|
S_aIN_t Guru
Joined: 11 May 2002 Posts: 488 Location: Ottawa
|
Posted: Fri Jun 21, 2002 2:23 pm Post subject: |
|
|
hm.. it is working fine for me.
however, my .xinintrc is in my home directory. also, i have a couple of other commands in there before i issue the command to start the window manager (fluxbox). so, it looks something like this:
Code: | xmodmap -e "pointer = 1 2 3 4 5 6" &
aterm -fg black -bg grey &
exec fluxbox |
the other thing is that xmodmap in this case is used to reassign a couple of the mouse buttons to other mouse buttons. it does not actually enable scrolling. to enable scrolling in X Windows you have to add a couple of lines to your XF86Config file:
Code: | Option "Buttons" "5"
Option "ZAxisMapping" "4 5" |
the above is what i have to get my Logitech MouseMan Wheel scrolling in X Windows.
good luck |
|
Back to top |
|
|
underactive n00b
Joined: 18 Apr 2002 Posts: 8
|
Posted: Sun Jun 23, 2002 9:11 pm Post subject: got all 7 buttons working |
|
|
n8wood, i've got the same mouse as you and finally got it working, after giving up on playing with $HOME/.xinitrc.
first off, here's what i have for the mouse part of my /etc/X11/XF86Config file:
Code: |
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mouse0"
Option "ZAxisMapping" "6 7"
Option "Buttons" "7"
|
i run KDM, so i added the xmodmap line in my /etc/X11/Sessions/kde-3.0.1 file:
Code: |
#!/bin/sh
/usr/X11R6/bin/xmodmap -e "pointer = 1 2 3 6 7 4 5"
/usr/kde/3/bin/startkde
|
after restarting X and logging in, mousewheel works as well as the 2 thumb buttons (verified using xev). now i just gotta find out what to do with these 2 buttons. |
|
Back to top |
|
|
n8wood n00b
Joined: 11 Apr 2002 Posts: 33 Location: providence, ri usa
|
Posted: Tue Jun 25, 2002 12:07 am Post subject: |
|
|
Is the ~/.xinitrc file executed when you run kdm? Maybe thats my problem. |
|
Back to top |
|
|
n8wood n00b
Joined: 11 Apr 2002 Posts: 33 Location: providence, ri usa
|
Posted: Tue Jun 25, 2002 12:18 am Post subject: |
|
|
that did it underactive, thank you!
|
|
Back to top |
|
|
n8wood n00b
Joined: 11 Apr 2002 Posts: 33 Location: providence, ri usa
|
Posted: Tue Jun 25, 2002 12:21 am Post subject: |
|
|
Is there a config file that allows you to define mouse button bindings, or a specific command?
I'd like to bind Alt+(left cursor) and Alt+(right cursor) to get forward and backward buttons setup in mozilla. |
|
Back to top |
|
|
|