Unix Technical Forum

xmodmap problems ?

This is a discussion on xmodmap problems ? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi NG In order to be able to use my mouse wheel, I am required to run this command: ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 03:19 PM
Mads Jensen
 
Posts: n/a
Default xmodmap problems ?

Hi NG

In order to be able to use my mouse wheel, I am required to run this
command:

xmodmap -e "pointer = 1 2 3 6 7 4 5"

And have currently put this line in my /etc/rc.d/rc.local file, so that it
would be executed during startup, so I wouldn't need to run it manually
every time I boot (boot it every day), but when the command is executed
during startup, I get this reply:

xmodmap: unable to open display ''

Or "Can't connect to X server".

Does anyone know a way out of this problem ? If so, I am very greatful!

Kind regards,
Mads
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 03:19 PM
Jeffrey Froman
 
Posts: n/a
Default Re: xmodmap problems ?

Mads Jensen wrote:

> And have currently put this line in my /etc/rc.d/rc.local file, so that it
> would be executed during startup, so I wouldn't need to run it manually
> every time I boot (boot it every day), but when the command is executed
> during startup, I get this reply:
>
> xmodmap:**unable*to*open*display*''


The X display does not yet exist when rc.local is executed. Try putting the
xmodmap command in /etc/X11/xinit/xinitrc, or ~/.xinitrc, or ~/.xsession
(depending on how you start X) instead of rc.local. This way, the command
will run when X starts, and the "display" will exist.

Jeffrey
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 03:20 PM
Rich Grise
 
Posts: n/a
Default Re: xmodmap problems ?

On Wednesday 08 September 2004 05:38 am, Mads Jensen did deign to grace us
with the following:

> Hi NG
>
> In order to be able to use my mouse wheel, I am required to run this
> command:
>
> xmodmap -e "pointer = 1 2 3 6 7 4 5"
>
> And have currently put this line in my /etc/rc.d/rc.local file, so that it
> would be executed during startup, so I wouldn't need to run it manually
> every time I boot (boot it every day), but when the command is executed
> during startup, I get this reply:
>
> xmodmap: unable to open display ''
>
> Or "Can't connect to X server".
>
> Does anyone know a way out of this problem ? If so, I am very greatful!
>

What happens if, instead of that line, you put the appropriate lines
in your xorg.conf? The only reason I ask is that I spot the '4' and '5'
in your thingie - (BTW, I haven't looked up xmodmap yet, because I
haven't had to), which immediately pops up "ZAxisMapping" in my mind,
and you did mention 'wheel' - the math really isn't that hard.

Good Luck!
Rich

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 03:21 PM
Kai Brust
 
Posts: n/a
Default Re: xmodmap problems ?

Mads Jensen <madsj@spambot.raptus.dk> schrieb:
> Hi NG
>
> In order to be able to use my mouse wheel, I am required to run this
> command:
>
> xmodmap -e "pointer = 1 2 3 6 7 4 5"
>
> And have currently put this line in my /etc/rc.d/rc.local file, so that it
> would be executed during startup, so I wouldn't need to run it manually
> every time I boot (boot it every day), but when the command is executed
> during startup, I get this reply:
>
> xmodmap: unable to open display ''
>
> Or "Can't connect to X server".


Take a look at some of the "official" ~/.xinitrc's (those created by
xwmconfig). The Right Way[tm] is to use
11/xinit/.Xmodmap for global settings and ~/.Xmodmap for user specific
settings.

Mine looks like this:

kb@clockwork:~$ cat ~/.Xmodmap
pointer = 1 2 3 6 7 4 5

HTH

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 03:21 PM
Kai Brust
 
Posts: n/a
Default Re: xmodmap problems ?

Rich Grise <null@example.net> wrote:
> On Wednesday 08 September 2004 05:38 am, Mads Jensen did deign to grace us
> with the following:

[...]
> > xmodmap -e "pointer = 1 2 3 6 7 4 5"

[...]
> What happens if, instead of that line, you put the appropriate lines
> in your xorg.conf? The only reason I ask is that I spot the '4' and '5'
> in your thingie - (BTW, I haven't looked up xmodmap yet, because I
> haven't had to), which immediately pops up "ZAxisMapping" in my mind,
> and you did mention 'wheel' - the math really isn't that hard.


It's for people with a 7-button-mouse who want to use the wheel *and*
the thumb buttons (which is usefull for browsing forward/backward with
mozilla, gaming, ...)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:41 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com