public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] gpm (X11): touchpad OR usb-mouse?
@ 2006-04-11 19:55 Jarry
  2006-04-11 20:36 ` Hans-Werner Hilse
  2006-04-11 23:17 ` Iain Buchanan
  0 siblings, 2 replies; 8+ messages in thread
From: Jarry @ 2006-04-11 19:55 UTC (permalink / raw
  To: gentoo-user

Hi,

I have following problem: with my notebook I am mostly
using usb-mouse, but sometimes I'm too lazy to pull it out
of bag (or I forget to take it), and in such a case I must
use Synaptics Touchpad.

Both of them work with gpm (in console), problem is that
when mouse is attached, I can move cursor with both a mouse
and touchpad.

Is it possible to configure gpm so, that if usb-mouse is
attached, then only mouse can be used as pointing device?
And if no mouse is found, then (and only then) touchpad
works? Problem is I do not know how to turn touchpad off.
There is a button for it, but apparently it works only with
windows-drivers...

And btw, I would like to have similar "auto-switch"
configuration for X11: Is it possible (without switching
manually config files)?

Jarry
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] gpm (X11): touchpad OR usb-mouse?
  2006-04-11 19:55 [gentoo-user] gpm (X11): touchpad OR usb-mouse? Jarry
@ 2006-04-11 20:36 ` Hans-Werner Hilse
  2006-04-11 20:55   ` Daniel da Veiga
  2006-04-11 22:00   ` Richard Fish
  2006-04-11 23:17 ` Iain Buchanan
  1 sibling, 2 replies; 8+ messages in thread
From: Hans-Werner Hilse @ 2006-04-11 20:36 UTC (permalink / raw
  To: gentoo-user

Hi,

On Tue, 11 Apr 2006 21:55:46 +0200
Jarry <jarry@gmx.net> wrote:

> Is it possible to configure gpm so, that if usb-mouse is
> attached, then only mouse can be used as pointing device?

You may try to use udev for that. It can call scripts when devices are
plugged in and out or just present at boot (using coldplug for older
udev versions). You can let the script switch configuration files and
send gpm a signal that lets it read its configuration again. The key is
that you should not use "/dev/input/mice" as the device but have two
separate gpm configurations with "/dev/input/mouseN" (you can also use
udev to give more persistent names).

Sorry, I can't go much into practical details, I've no use for this,
personally :-)

-hwh
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] gpm (X11): touchpad OR usb-mouse?
  2006-04-11 20:36 ` Hans-Werner Hilse
@ 2006-04-11 20:55   ` Daniel da Veiga
  2006-04-11 20:56     ` Daniel da Veiga
  2006-04-11 22:00   ` Richard Fish
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel da Veiga @ 2006-04-11 20:55 UTC (permalink / raw
  To: gentoo-user

On 4/11/06, Hans-Werner Hilse <hilse@web.de> wrote:
> Hi,
>
> On Tue, 11 Apr 2006 21:55:46 +0200
> Jarry <jarry@gmx.net> wrote:
>
> > Is it possible to configure gpm so, that if usb-mouse is
> > attached, then only mouse can be used as pointing device?
>
> You may try to use udev for that. It can call scripts when devices are
> plugged in and out or just present at boot (using coldplug for older
> udev versions). You can let the script switch configuration files and
> send gpm a signal that lets it read its configuration again. The key is

This looks a bit complicated, since as far as I know GDM uses Xorg's
configuration to discover how to use mouse/keyboard, so, if you're
going to have more than one configuration, wouldn't it be necessary
for you to restart the X server? I too have a laptop, but for mine the
switch button for the synaptic touchpad really works :) turning it off
completely both in win and lin.

A friend told me once that he wrote a udev rule that recreated a
device every time he plugged in and out his USB mouse, this way, when
plugged out, the device pointed to the touchpad, while plugged in, it
references the USB mouse.

> that you should not use "/dev/input/mice" as the device but have two
> separate gpm configurations with "/dev/input/mouseN" (you can also use
> udev to give more persistent names).
>

Can GDM do this? Sorry, couldn't find anything in the docs about it...

--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] gpm (X11): touchpad OR usb-mouse?
  2006-04-11 20:55   ` Daniel da Veiga
@ 2006-04-11 20:56     ` Daniel da Veiga
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel da Veiga @ 2006-04-11 20:56 UTC (permalink / raw
  To: gentoo-user

wowowow, sorry, misunderstood the GDM, GPM difference... Ignore the
last message........

On 4/11/06, Daniel da Veiga <danieldaveiga@gmail.com> wrote:
> On 4/11/06, Hans-Werner Hilse <hilse@web.de> wrote:
> > Hi,
> >
> > On Tue, 11 Apr 2006 21:55:46 +0200
> > Jarry <jarry@gmx.net> wrote:
> >
> > > Is it possible to configure gpm so, that if usb-mouse is
> > > attached, then only mouse can be used as pointing device?
> >
> > You may try to use udev for that. It can call scripts when devices are
> > plugged in and out or just present at boot (using coldplug for older
> > udev versions). You can let the script switch configuration files and
> > send gpm a signal that lets it read its configuration again. The key is
>
> This looks a bit complicated, since as far as I know GDM uses Xorg's
> configuration to discover how to use mouse/keyboard, so, if you're
> going to have more than one configuration, wouldn't it be necessary
> for you to restart the X server? I too have a laptop, but for mine the
> switch button for the synaptic touchpad really works :) turning it off
> completely both in win and lin.
>
> A friend told me once that he wrote a udev rule that recreated a
> device every time he plugged in and out his USB mouse, this way, when
> plugged out, the device pointed to the touchpad, while plugged in, it
> references the USB mouse.
>
> > that you should not use "/dev/input/mice" as the device but have two
> > separate gpm configurations with "/dev/input/mouseN" (you can also use
> > udev to give more persistent names).
> >
>
> Can GDM do this? Sorry, couldn't find anything in the docs about it...
>
> --
> Daniel da Veiga
> Computer Operator - RS - Brazil
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
> PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
> ------END GEEK CODE BLOCK------
>


--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] gpm (X11): touchpad OR usb-mouse?
  2006-04-11 20:36 ` Hans-Werner Hilse
  2006-04-11 20:55   ` Daniel da Veiga
@ 2006-04-11 22:00   ` Richard Fish
  1 sibling, 0 replies; 8+ messages in thread
From: Richard Fish @ 2006-04-11 22:00 UTC (permalink / raw
  To: gentoo-user

On 4/11/06, Hans-Werner Hilse <hilse@web.de> wrote:
> Sorry, I can't go much into practical details, I've no use for this,
> personally :-)

For X11, this can also work, if you use the synaptics driver in X,
since you can have your rule call syn-client to modify the TouchpadOff
setting.

HTH,
-Richard

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] gpm (X11): touchpad OR usb-mouse?
  2006-04-11 19:55 [gentoo-user] gpm (X11): touchpad OR usb-mouse? Jarry
  2006-04-11 20:36 ` Hans-Werner Hilse
@ 2006-04-11 23:17 ` Iain Buchanan
  2006-04-11 23:42   ` Neil Bothwick
  1 sibling, 1 reply; 8+ messages in thread
From: Iain Buchanan @ 2006-04-11 23:17 UTC (permalink / raw
  To: gentoo-user

On Tue, 2006-04-11 at 21:55 +0200, Jarry wrote:
> Hi,
> 
> I have following problem: with my notebook I am mostly
> using usb-mouse, but sometimes I'm too lazy to pull it out
> of bag (or I forget to take it), and in such a case I must
> use Synaptics Touchpad.

> Is it possible to configure gpm so, that if usb-mouse is
> attached, then only mouse can be used as pointing device?
> And if no mouse is found, then (and only then) touchpad
> works?

I have wanted to do this for aaages, but I always thought it was
impossible - until I noticed I have:
/dev/input/mice
/dev/input/mouse0
/dev/input/mouse1
/dev/input/mouse2

If I `cat /dev/input/mice` I get output when I move either my stick
(yeuch), touchpad, or usb mouse.

However, mouse0 only gives output for the stick, mouse1 for the
touchpad, and mouse2 for the usb mouse.

Perhaps this is the answer - you might need to change MOUSEDEV
in /etc/conf.d/gpm depending on what you have plugged in.  For X, you
would have to change Option "Device" from "/dev/input/mice" to a
specific /dev/input/mouseX.

I don't know how to do this automatically, nor how to make X use a
different mouse without restarting...

Hope this helps you on the way though.
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

<<<<< EVACUATION ROUTE <<<<<

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] gpm (X11): touchpad OR usb-mouse?
  2006-04-11 23:17 ` Iain Buchanan
@ 2006-04-11 23:42   ` Neil Bothwick
  2006-04-12  4:40     ` Iain Buchanan
  0 siblings, 1 reply; 8+ messages in thread
From: Neil Bothwick @ 2006-04-11 23:42 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

On Wed, 12 Apr 2006 08:47:42 +0930, Iain Buchanan wrote:

> I don't know how to do this automatically, nor how to make X use a
> different mouse without restarting...

Would a symlink help here? Link the touchpad to, say, dev/input/mymouse
then override this link with one to the USB mouse when it is plugged it.
Then use the symlink is xorg.conf.


-- 
Neil Bothwick

Procrastinate now!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] gpm (X11): touchpad OR usb-mouse?
  2006-04-11 23:42   ` Neil Bothwick
@ 2006-04-12  4:40     ` Iain Buchanan
  0 siblings, 0 replies; 8+ messages in thread
From: Iain Buchanan @ 2006-04-12  4:40 UTC (permalink / raw
  To: gentoo-user

On Wed, 2006-04-12 at 00:42 +0100, Neil Bothwick wrote:
> On Wed, 12 Apr 2006 08:47:42 +0930, Iain Buchanan wrote:
> 
> > I don't know how to do this automatically, nor how to make X use a
> > different mouse without restarting...
> 
> Would a symlink help here? Link the touchpad to, say, dev/input/mymouse
> then override this link with one to the USB mouse when it is plugged it.
> Then use the symlink is xorg.conf.

I guess that depends if X tries to be intelligent (like some apps) and
finds the target of the symlink at startup, instead of just using the
symlink.  Also, I don't know what would happen if you pulled the symlink
while it was being used...  one way to find out :)
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

To generalize is to be an idiot.
		-- William Blake

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-04-12  4:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 19:55 [gentoo-user] gpm (X11): touchpad OR usb-mouse? Jarry
2006-04-11 20:36 ` Hans-Werner Hilse
2006-04-11 20:55   ` Daniel da Veiga
2006-04-11 20:56     ` Daniel da Veiga
2006-04-11 22:00   ` Richard Fish
2006-04-11 23:17 ` Iain Buchanan
2006-04-11 23:42   ` Neil Bothwick
2006-04-12  4:40     ` Iain Buchanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox