E-Mail:
Author Avatar

USB Optical Mise in Slack

USB Optical Mice in Slack

I’ll readily admit that some of my hacks in Linux are not the most elegant. I muck around, trying this and that, searching through other posted solutions to a problem, until something strikes me or until I stumble into a programmatic answer. This tweak reflects that approach to hacks in Linux, utilizing a combination of built-in system tools and hand-rolled modifications to solve a problem.

At the end of the Slack install on Friday night, I was left without an X Server. I’d selected the USB mouse option during the install process, but Slack still didn’t recognize my 5-button Microsoft Optical USB Mouse. A few hours later, I had a working mouse using the following process.

This solution involves three distinct pieces: a kernel recompile, a re-running of /usr/X11/bin/xf86config, and a hand tweak of /etc/X11/XF86Config. The second was only necessary because at one point, I got a desktop, but had no mouse *or* keyboard once X Window launched.

First for the kernel recompile.

    (as root) cd /usr/src/linux
    make clean
    make menuconfig

In the USB choices of menuconfig, I selected ohci, uhci and full hid support, loading them directly into the kernel rather than opting for module support.

    make bzImage
    make modules
    make modules_install
    cp /arch/i386/boot/bzImage /

Modify lilo for the new kernel:

    image = /bzImage
       root = /dev/hda5
       label = linux
       read-only

Be sure to run /sbin/lilo to commit your new lilo file.

Now, re-run /usr/X11/bin/xf86config, answering all questions regarding your current hardware setup. Afterwards, you’ll need to modify the /etc/X11/XF86Config file in the “Pointer” section:

    Section “Pointer”
       Protocol    ”IMPS/2″
       Device      ”/dev/input/mice”
       Buttons     5
       ZAxisMapping    4 5
    EndSection

Start X with the startx command.

There you have it. A hack that uses both system tools and hand modifications to make a Microsoft USB Optical Mouse work in Slackware.

What Do You Think?

 


Anti-Spam Image

Want to Start a Blog Here for Free?

Are you an expert in one subject or another? If your goal is to help others and dispense hard-earned information back to the community, stake a claim on your very own Lockergnome blog today! You can write about anything - no matter the topic. Sign-up to start blogging!

57 queries / 0.767 seconds.