IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

HOWTOs

Search Howtos :Match :

5.2. Using hotplug with input.agent and input.rc

Using the input.agent will allow you to manage input devices based on their PHYS ID.

The input.rc script will run the input.agent with appropriate arguments for drivers that are built in the kernel or are loaded before hotplug is available.

5.2.1. input.agent

The input agent uses 3 configuration files:

  • /etc/hotplug/kbd.conf

  • /etc/hotplug/mouse.conf

  • /etc/hotplug/event.conf

NoteNote
 

The explanations here are using Backstreet Ruby ( usb devices have PHYS_ID "usb-00:xx.x-..."), if you are running Ruby-2.6 for usb devices you should have PHYS_ID "usb-0000:00:xx.x-...." , but you should be able to use the same configuration files both under Backstreet Ruby and Ruby-2.6 by specifying "usb-0*:xx.x-..." .

To configure the keyboards you have to adjust /etc/hotplug/kbd.conf

If I wanted to use the PS2 keyboard for the primary Display and for the VGA console, I would have:


#
# keyboard configuration
#
# vt_name device_physicaly_location

VT0	isa0060/serio0/input0
VT1	usb-00:10.1-1.1/input0
        

Or, if I want to use the USB keyboard for the primary Display and for the VGA console:


#
# keyboard configuration
#
# vt_name device_physicaly_location

VT0	usb-00:10.1-1.1/input0
VT1	isa0060/serio0/input0
        

you could also use "*.*" instead of the pci function of the USB controller:


#
# keyboard configuration
#
# vt_name device_physicaly_location

VT0	usb-*.*-1.1/input0
VT1	isa0060/serio0/input0
      

For mouse devices you have to edit /etc/hotplug/mouse.conf


#
# mouse device configuration
#
# sym_link device_physicaly_location
mouse0br	usb-00:10.1-1.2/input0
mouse1br	usb-*.*-2.7.*/input0
mouse2br	isa0060/serio1/*
        

and adjust the XFree configuration file.

For the first mouse change


......
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/input/mouse0"
    Option "ZAxisMapping" "4 5"
......
      

to :


......
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/input/mouse0br"
    Option "ZAxisMapping" "4 5"
......
      

For the second mouse change


......
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/input/mouse1"
    Option "ZAxisMapping" "4 5"
......
      

to :


......
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/input/mouse1br"
    Option "ZAxisMapping" "4 5"
......
      

and so on.

For Event devices edit /etc/hotplug/event.conf


#
# input event device config file
#
# symbolic_link device_physicaly_location
event0br	isa0060/serio0/*
event1br	isa0060/serio1/input0
event2br	usb-*.*-3/input0
      

and configure the applications which use them to use the symbolic links instead of the real devices

5.2.2. input.rc

If you are using input drivers built into the kernel please ensure that the input.rc script is started/executed at system start. In case the script is not executed you will find that hotplug could not configure these input devices.

NoteNote
 

This area requires user feedback. Currently I have information only about Mandrake, where hotplug is not run as service.

If your distribution runs hotplug as service this will be done automatically.

If your distribution does not run hotplug as service you will have to modify your init scripts to run input.rc for you before XFree is started.

You may add this at the end of your /etc/rc.d/rc.sysinit
if [[ -f /proc/bus/console -o -n tmp=`uname -r | sed -n 's:ruby::p'` ]]; then
   if [ -x /etc/hotplug/input.rc ]; then	
      /etc/hotplug/input.rc start
      if [ $? = 0 ]; then
      	action "Configuring cold plugged input devices" /bin/true
      else
	action "Configuring cold plugged input devices" /bin/false
      fi
   else if [ -f /etc/hotplug/input.rc ]; then
     	   action "Input: input.rc installed, but not executable. Please check the file permissions." /bin/false
	else 
	   action "Input: Failed to configure cold plugged devices - input.rc missing"  /bin/false
        fi
   fi
fi

Search Howtos :Match :
DbVisualizer 6.5.2
The Universal Database Tool
PhpMyAdmin 3.1.2 rc1
Php front-end to MySQL administration
Xine 1.1.6
Free video player
Glade 3.5.5
User interface builder for GTK+ and Gnome
Evolution 2.25.4
GNOME mailer, calendar, contact manager and communications tool
GEdit 2.25.4
Small but powerful text editor
LimeWire 5.0.4
Gnutella Client
WebGUI 7.6.8
A fully featured content management system.
GTK2 2.14.7
GUI Toolkit
Brasero 0.9.0
Application to burn CD/DVD
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info