LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   /dev/mouse renamed! (https://www.linuxquestions.org/questions/slackware-14/dev-mouse-renamed-559780/)

Lord Zoltar 06-06-2007 11:01 PM

/dev/mouse renamed!
 
So a couple weeks ago, I was screwing around with trying to get autofs and udev working properly. Then I got busy and distracted. Today I decided to get back to it, and noticed that my system can't start into X. It looks like every script and program on my system that needs a mouse is looking for /dev/mouse, but device somehow got renamed to /dev/mouse0, causing all sorts of problems. I could probably fix this if I had remembered what I did, but it's been too long and I've been busy. I don't even know how this happened, but I suspect udev. :(

Oh, and I'm NOT tracking down every script and changing "/dev/mouse" to "/dev/mouse0"! ;)

bathory 06-07-2007 03:52 AM

If you don't have /dev/mouse anymore you can create it by symlinking it to /dev/mouse0:
Code:

ln -s /dev/mouse0 /dev/mouse

Yalla-One 06-07-2007 07:47 AM

Do you remember a bit more precisely what in udev you were playing with? Did you perhaps add some new local rules to a custom xx-local.rules file or perhaps change the udev.rules file in /etc/udev/rules.d ?

If so - try to restore it, and remember to always make your local udev changes to a separate file.

Having said that, instead of having to manually link /dev/mouse -> /dev/mouse0 on every login, you can add a udev-rule to do that for you

If you don't already have a 10-local.rules file, create one, and make it create the symlink for you by adding something like this:

Code:

KERNEL=="mice", SYMLINK+="mouse", MODE="0644"
Note that this remains a slightly-less-ugly fix for a problem that shouldn't be there in the first place. The long-term solution would be to try to go back, figuring out what you "fixed" in the first place - perhaps backing up the udev files alltogether and doing a

Code:

upgradepkg --reinstall udev*.tgz
would work?

-Y1

Lord Zoltar 06-07-2007 11:30 PM

yeah I <i>could</i> make a symlink to /dev/mouse0 through /dev/mouse (and I probably will, out of laziness, if nothing better comes up), but it doesn't address the root problem: /dev/mouse got renamed (somehow) to /dev/mouse0, which is what I'd like to understand and solve.

Yalla-One: I was mostly playing with optical drive stuff, trying to get CDs and DVDs (and eventually USB storage devices) to (un)mount automatically, I don't recall doing anything to the mouse rules, but I don't think there were any in the first place.

It's just getting very tiresome to keep going to the console to "mount"/"umount" all the time.

Eternal_Newbie 06-08-2007 04:51 AM

/dev/mouse is actually usually a symlink to /dev/mouse0 or /dev/input/mice

Lord Zoltar 06-13-2007 10:42 PM

So I finally had time tonight to tackle it again, and y'know what surprised me the most? I created a symlink "/dev/mouse" to "/dev/mouse0" and when I rebooted, it was gone!!! I tried it a couple times, just to be sure. The symlink never stays.
Weird, eh? So what's removing this symlink?

Here's some more diagnostic info:

right after the system tries to start gpm, there is a message:
"O0o.oops():[server_tools.c(76)]: could not open /dev/mouse"

When I make the symlink to /dev/mouse0, I CAN start X as root by running startx, but for some reason, I have no network connectivity.

Lord Zoltar 06-13-2007 10:43 PM

I think the whole O0o.oops is just gpm failing...
Still, what happened (and keeps happening) to my mouse, and the symlink for my mouse?

rworkman 06-14-2007 12:08 AM

If you manually create a symlink when you're using udev, of course it will be gone after a reboot. udev populates the /dev tree by first creating a tmpfs and copying nodes from /lib/udev/devices (which are needed to get a system booted past the early stages) and then mounting that filesystem over the top of /dev.

To the OP:
Does /dev/input/mice exist? If so, change your xorg.conf to use it and all should be well. If it does not exist, then I think you should reinstall udev to get the default rules back.


All times are GMT -5. The time now is 11:43 PM.