Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-13-2006, 11:02 AM
|
#1
|
Member
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149
Rep:
|
Select mouse at boot time
I'm running Slack 10.2 on a laptop and I would like to configure the mouse at boot time. If I have my usb mouse connected run gpm with the '-t imps2' option otherwise run it with the '-t ps2' option. Is there any way to check if the usb mouse is connected?
TIA for any help!
|
|
|
03-13-2006, 11:35 AM
|
#2
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
Don't know,maybe the option auto will work for both.
|
|
|
03-13-2006, 12:22 PM
|
#3
|
Member
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149
Original Poster
Rep:
|
nope it did not work
|
|
|
03-13-2006, 12:29 PM
|
#4
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
Yep, this should be very possible (I might have to try it on my laptop, it looks good!).
Reading the gpm man page here: http://www.die.net/doc/linux/man/man8/gpm.8.html
Indicates a -M option that will read multiple devices. Presumably, if your usb isn't plugged in, it'll just ignore it) but if it is, it'll work fine - you will need to test this.
The script you need to edit to make this work is: /etc/rc.d/rc.gpm
You may wish to back it up first, and don't forget you can always stop/start/restart it without rebooting by using the following options:
Code:
/etc/rc.d/rc.gpm stop
/etc/rc.d/rc.gpm start
/etc/rc.d/rc.gpm restart
Let us know how you get on!
- Piete.
|
|
|
03-13-2006, 01:38 PM
|
#5
|
Member
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149
Original Poster
Rep:
|
now based on this how do I redirect /dev/mouse to the appropriate device /dev/psaux or /dev/input/mice? my xorg.conf is pointing to /dev/mouse and if the link is not pointing to a working device it complains and dies.
|
|
|
03-13-2006, 04:07 PM
|
#6
|
Member
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346
Rep: 
|
rm /dev/mouse
ln -s /dev/whateveryouneed /dev/mouse
ln -s = to create symbolic links
|
|
|
03-15-2006, 05:56 PM
|
#8
|
Member
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149
Original Poster
Rep:
|
Quote:
Originally Posted by piete
|
Not working, but thanks for the suggestion... X will pick whichever device is marked as Mouse0 (even if it is not present). If I make /dev/psaux my Mouse0 then it never even tries to get to /dev/input/mice. Here is the mouse definitions from my /etc/X11/xorg.conf
Code:
Section "InputDevice
Identifier "Mouse1"
Option "ZAxisMapping" "4 5"
Driver "mouse"
Option "Protocol" "imps/2"
Option "Device" "/dev/input/mice"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
EndSection
All I want is that X picks a mouse when I boot and not crash when I boot the machine. For example...
Use my USB mouse if it is plugged (usually @ home or the office)
Use the glide mouse on the laptop when an USB mouse is not connected (in planes, etc)
|
|
|
03-16-2006, 02:52 AM
|
#9
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
Ok, I think you're Xorg.conf is probably incorrect if it's not working.
First of all, we're not writing Xorg.conf to "choose" a mouse, merely telling it to use more than one mouse. If I don't have my usb plugged in when I startx, it just gets ignored. If my usb *is* plugged in, then not only can I use my usb mouse, but also my trackpoint.
The steps to get this working are as follows:
1. Find your USB mouse device (/dev/input/mice ?) - cat /dev/input/mice and wiggle the device about to check it's correct.
2. Do the same with your touchpad (/dev/psaux ?)
3. Add both devices as separate inputdevices in your xorg.conf file (as above)
4. Edit your ServerLayout section to look similar to:
Code:
Section "ServerLayout"
Identifier "MyLayout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer" # <-- This is the touchpad that should always be used
InputDevice "Mouse1" "SendCoreEvents" # <-- This will get used if it's around, but, doesn't matter if it's not!
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
If this still doesn't work you will have to post your entire Xorg.conf file to see what's missed.
|
|
|
03-16-2006, 07:35 AM
|
#10
|
Member
Registered: Jan 2006
Location: Hellas, Europe
Distribution: Slackware 12
Posts: 238
Rep:
|
I changed my xorg.conf on InputDevice Section and ServerLayout and now KDE doesn't start. It gets stack on "Starting X11 session...". The problem is that I have runlevel 4 so KDE starts automatically and now I have no idea how I could get to shell to change from there my xorg.conf. Any suggestions?
|
|
|
03-16-2006, 08:06 AM
|
#11
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
If you boot into runlevel 3 while testing this stuff it's easy to fix if it doesn't work =)
However, since you're booting into 4, ctrl + alt + F6 will get you a standard login prompt. Login as root and type: init 3
This'll put you in runlevel 3 where you can use joe/jed/vi/vim/pico/nano (delete as appropriate) to edit xorg.conf.
When you've tweaked it a bit, run startx from some other TTY (as user, not root) and note the output of startx, it'll tell you what the problem is exactly (ok, it might be obfuscated a bit). The error messages will help us track down the issue.
- Piete.
|
|
|
03-16-2006, 09:08 AM
|
#12
|
Member
Registered: Jan 2006
Location: Hellas, Europe
Distribution: Slackware 12
Posts: 238
Rep:
|
Well, I was looking at the output of error messages and there were some incorrect typings among the lines in xorg.conf like "End Section" instead of "EndSection". I edited to the original form and X started. Then I tried again to configure it, so my touchpad will be working and I had to change at the ServerLayout "Screen0" to "Screen1" and "Keyboard0" to "Keyboard1". Now everything works fine! 
|
|
|
03-16-2006, 09:42 AM
|
#13
|
Member
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465
Rep:
|
w00h00! *does the fixx0red groove*
Ooh yeah, ooh yeah ... *dances*
I'm glad it works for you, hope you learnt a lot
- Piete.
|
|
|
03-16-2006, 02:58 PM
|
#14
|
Member
Registered: Nov 2004
Location: Virginia, US
Distribution: Slackware 14.1 multilib
Posts: 149
Original Poster
Rep:
|
Quote:
Originally Posted by piete
Ok, I think you're Xorg.conf is probably incorrect if it's not working.
First of all, we're not writing Xorg.conf to "choose" a mouse, merely telling it to use more than one mouse. If I don't have my usb plugged in when I startx, it just gets ignored. If my usb *is* plugged in, then not only can I use my usb mouse, but also my trackpoint.
The steps to get this working are as follows:
1. Find your USB mouse device (/dev/input/mice ?) - cat /dev/input/mice and wiggle the device about to check it's correct.
2. Do the same with your touchpad (/dev/psaux ?)
3. Add both devices as separate inputdevices in your xorg.conf file (as above)
4. Edit your ServerLayout section to look similar to:
Code:
Section "ServerLayout"
Identifier "MyLayout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer" # <-- This is the touchpad that should always be used
InputDevice "Mouse1" "SendCoreEvents" # <-- This will get used if it's around, but, doesn't matter if it's not!
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
If this still doesn't work you will have to post your entire Xorg.conf file to see what's missed.
|
Dude a million thanks for your help and pacience! It works like a charm. 
|
|
|
All times are GMT -5. The time now is 07:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|