Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xmodmap and xinitrc problem
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
n8wood
n00b
n00b


Joined: 11 Apr 2002
Posts: 33
Location: providence, ri usa

PostPosted: Fri Jun 21, 2002 2:40 am    Post subject: xmodmap and xinitrc problem Reply with quote

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
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Fri Jun 21, 2002 2:49 am    Post subject: Reply with quote

Try putting 'ZAxisMapping "4 5"' in your mouse section of XF86Config.
Back to top
View user's profile Send private message
n8wood
n00b
n00b


Joined: 11 Apr 2002
Posts: 33
Location: providence, ri usa

PostPosted: Fri Jun 21, 2002 11:48 am    Post subject: Reply with quote

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
View user's profile Send private message
S_aIN_t
Guru
Guru


Joined: 11 May 2002
Posts: 488
Location: Ottawa

PostPosted: Fri Jun 21, 2002 2:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
underactive
n00b
n00b


Joined: 18 Apr 2002
Posts: 8

PostPosted: Sun Jun 23, 2002 9:11 pm    Post subject: got all 7 buttons working Reply with quote

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
View user's profile Send private message
n8wood
n00b
n00b


Joined: 11 Apr 2002
Posts: 33
Location: providence, ri usa

PostPosted: Tue Jun 25, 2002 12:07 am    Post subject: Reply with quote

Is the ~/.xinitrc file executed when you run kdm? Maybe thats my problem.
Back to top
View user's profile Send private message
n8wood
n00b
n00b


Joined: 11 Apr 2002
Posts: 33
Location: providence, ri usa

PostPosted: Tue Jun 25, 2002 12:18 am    Post subject: Reply with quote

that did it underactive, thank you!

:D
Back to top
View user's profile Send private message
n8wood
n00b
n00b


Joined: 11 Apr 2002
Posts: 33
Location: providence, ri usa

PostPosted: Tue Jun 25, 2002 12:21 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum