Unix Technical Forum

mouse hotplug in X

This is a discussion on mouse hotplug in X within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> trying to wonder if it is possible to make X see that i've just plugged in my usb mouse ...


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

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 07:36 AM
Hekaton Keires
 
Posts: n/a
Default mouse hotplug in X

trying to wonder if it is possible to make X see that i've just plugged in
my usb mouse _after_ startx.

###
preface:

i'm using laptop with touchpad configured as CorePointer and external usb
mouse as SendCoreEvents
###

maybe the problem is that i'm using devfsd so /dev/input/mice does not exist
till i do not plug in the mouse - so XFree86.log just reports that it was
unable to see it at the beginning... and once it was started up i should
restart X in order to make it see the usb mouse...

another question is dealing about 3 button emulation: i cannot

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 07:36 AM
Hekaton Keires
 
Posts: n/a
Default Re: mouse hotplug in X

Hekaton Keires wrote:

excuse me did not finished...

>
> another question is dealing about 3 button emulation: i cannot
>


copy from konsole just by clicking right button. i've tried to activate
3button emulation but with no changes. who can tell me the right thing to
do?

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 07:36 AM
Sybren Stuvel
 
Posts: n/a
Default Re: mouse hotplug in X

Hekaton Keires enlightened us with:
> maybe the problem is that i'm using devfsd so /dev/input/mice does
> not exist till i do not plug in the mouse


Try loading the 'hid' module at boot time, instead of when plugging in
the mouse.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 07:36 AM
Hekaton Keires
 
Posts: n/a
Default Re: mouse hotplug in X

Sybren Stuvel wrote:

> Hekaton Keires enlightened us with:
>> maybe the problem is that i'm using devfsd so /dev/input/mice does
>> not exist till i do not plug in the mouse

>
> Try loading the 'hid' module at boot time, instead of when plugging in
> the mouse.
>
> Sybren


you're right! i should modprobe mousedev.o at a boot time... so it will
create /dev/input/mice character device which is a mux for all usb devices
yet plugged or not.

thx a lot

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 07:36 AM
Sybren Stuvel
 
Posts: n/a
Default Re: mouse hotplug in X

Hekaton Keires enlightened us with:
>> Try loading the 'hid' module at boot time, instead of when plugging in
>> the mouse.

>
> you're right! i should modprobe mousedev.o at a boot time...


NO! Read the documentation again. That's for the USB boot protocol.
You want the 'hid' module, as I said.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 07:36 AM
Hekaton Keires
 
Posts: n/a
Default Re: mouse hotplug in X

Sybren Stuvel wrote:

> NO! Read the documentation again. That's for the USB boot protocol.
> You want the 'hid' module, as I said.
>
> Sybren


but if i load hid module it will create only a /dev/input directory... and
startx won't find any char device on wich open comunication on start...
while if i modprobe mousedev it will load input,hid and mousedev himself
and so will create all char devices i need.

what would i do with only hid module? and which char device should i specify
in /etc/X11R6/XF86Config?

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 07:36 AM
Sybren Stuvel
 
Posts: n/a
Default Re: mouse hotplug in X

Hekaton Keires enlightened us with:
> but if i load hid module it will create only a /dev/input
> directory... and startx won't find any char device on wich open
> comunication on start...


Did you compile the kernel yourself? You must have
CONFIG_USB_HIDINPUT=y in your kernel configuration, or it won't
function properly.

> what would i do with only hid module? and which char device should i
> specify in /etc/X11R6/XF86Config?


/dev/input/mice as usual. It's renamed to usbhid on 2.6 kernels, btw.


Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-21-2008, 07:36 AM
Hekaton Keires
 
Posts: n/a
Default Re: mouse hotplug in X

Sybren Stuvel wrote:

> Did you compile the kernel yourself? You must have
> CONFIG_USB_HIDINPUT=y in your kernel configuration, or it won't
> function properly.


of course i did: i've compiled kernel with hid as module... and if i place
mousedev in /etc/modules.autoload.d/kernel-2.4 it will load hid too... just
because of dependencies...

>> what would i do with only hid module? and which char device should i
>> specify in /etc/X11R6/XF86Config?

>
> /dev/input/mice as usual. It's renamed to usbhid on 2.6 kernels, btw.
>
>
> Sybren


maybe we're saying just the same thing with different words .

--
remove mailto__ on replying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-21-2008, 07:36 AM
Viacheslav Kaloshin
 
Posts: n/a
Default Re: mouse hotplug in X

Hekaton Keires wrote:
> trying to wonder if it is possible to make X see that i've just plugged in
> my usb mouse _after_ startx.


Another way:

Section "ServerFlags"
Option "AllowMouseOpenFail"
....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-21-2008, 07:36 AM
Viacheslav Kaloshin
 
Posts: n/a
Default Re: mouse hotplug in X

Hekaton Keires wrote:
> Hekaton Keires wrote:
>
> excuse me did not finished...
>
>
>>another question is dealing about 3 button emulation: i cannot
>>

>
>
> copy from konsole just by clicking right button. i've tried to activate
> 3button emulation but with no changes. who can tell me the right thing to
> do?
>

if your mouse has 2 buttons, set Emulate3Buttons "on" and :
press left button and drag - select
press both button - insert selected text

if your mouse has 3 or more buttons - set Emulate3Buttons "off" and
press left button and drag - select
press middle button - insert.

"right" button used for inserting previosly selected text only in text
mode. in graph mode it used applications by drop-down menus and so on.
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 01:56 AM.


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