Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
joymouse -- use a joystick as a mouse
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
rstanchak
n00b
n00b


Joined: 17 Jul 2002
Posts: 42

PostPosted: Thu Oct 14, 2004 1:33 pm    Post subject: joymouse -- use a joystick as a mouse Reply with quote

Joymouse is a program that lets you use a joystick as a mouse.
I found it useful for my freevo system. Lucky for me there was an ebuild, though somewhat incomplete.
Code:

emerge joymouse


I also added an rc script to start the daemon on boot:
Code:

#!/sbin/runscript

depend() {
        need modules
}

start() {
        ebegin "Starting joymouse"
        start-stop-daemon --start --quiet -m --pidfile /var/run/joymouse.pid \
                 -x /usr/bin/joymouse --background --startas /usr/bin/joymouse
        eend $?
}

stop() {
        ebegin "Stopping joymouse"
        start-stop-daemon --stop --quiet --pidfile /var/run/joymouse.pid
        eend $?
}


save this as /etc/init.d/joymouse

and to start it on boot up type
Code:

rc-update add joymouse default


To start it without rebooting --
Code:

/etc/init.d/joymouse start


To use this as a pointing device in X, add the following to /etc/X11/XF86Config
Code:

       Section "InputDevice"
           Identifier  "Joystick"
           Driver      "mouse"
           Option      "Protocol"       "auto"
           Option      "Device"         "/dev/joymouse"
           Option      "SendCoreEvents" "true"
       EndSection

In the "ServerLayout"-Section you should have 2 InputDevice lines,
i.e.:
Code:

           InputDevice "Mouse" "CorePointer"
           InputDevice "Joystick"
Back to top
View user's profile Send private message
Invincible_777
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2004
Posts: 107
Location: Washington, USA

PostPosted: Thu Jun 01, 2006 8:06 pm    Post subject: Reply with quote

hmm, this is not working for me... but it sounds just perfect....
_________________
Carry out the bigger will for your life....
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 508
Location: North~Sea~Coa~s~~t~~~

PostPosted: Tue Jul 04, 2006 9:18 pm    Post subject: Reply with quote

Hi,

I changed one thing, then it works... :)

See the joymouse manual after emerge (/usr/share/man/man1/joymouse.1.gz):
Code:
Option "Protocol" "ExplorerPS/2"
#Option "ZAxisMapping" "4 5 6 7"

I commented out ZAxisMapping (wheel), because I still have to read the mouse driver manual (/usr/share/man/man4/mouse.4x.gz) for the correct values.

Cheeers.
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 508
Location: North~Sea~Coa~s~~t~~~

PostPosted: Wed Jul 05, 2006 2:48 pm    Post subject: Reply with quote

It's working pretty well...

I disabled Emulate3Buttons, and ZAxisMapping was OK *after* I defined all axis and buttons. The Joystick tool in KControlCenter was a good help with that.
/etc/X11/xorg.conf:
Code:
...
Option "Emulate3Buttons" "false"
Option "ZAxisMapping" "4 5 6 7"
...


/etc/conf.d/joymouse:
Code:
JOYMOUSE_OPTS="-t joystick -Mx -t joystick -My -t joystick -Mzy -t joystick -M- -t joypad -Mzx -t joypad -Mzy -t joypad -M- -B0 -B0 -B2 -B1 -Bm=2.0 -Bm=0.5 -Bm=0.1"
This is for my 7 axis, 7 buttons joystick (1 malfunctioning slider, 1 non-existing thing disabled).

/etc/init.d/joymouse:
Code:
#!/sbin/runscript

# NB: Config is in /etc/conf.d/joymouse

depend() {
   need modules
}

start() {
   ebegin "Starting joymouse"
   start-stop-daemon --start --quiet -m --pidfile /var/run/joymouse.pid \
      --background --startas /usr/bin/joymouse -x /usr/bin/joymouse -- \
      ${JOYMOUSE_OPTS}
   eend $?
}

stop() {
   ebegin "Stopping joymouse"
   start-stop-daemon --stop --quiet --pidfile /var/run/joymouse.pid
   eend $?
}
Options go into /etc/conf.d/joymouse.

Would be nice to include this into Portage... Thanks to rstanchak!
https://bugs.gentoo.org/show_bug.cgi?id=139315



~~~~

Sat Nov 4 09:44:03 2006
Seems that xorg-x11-7.1 doesn't like the joymouse...
:(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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