# svgalib, links, and gpm

## Motoi-Sakuraba-Milfeuille

Whenever I use links and the svgalib driver, svgalib always says "failed to initialize mouse". I understand that gpm needs to  be emerged, so I installed it, and added it to the runlevel. It works fine now. However links with svgalib still refuses to initialize the mouse! 

I'm on svgalib 1.9.19. I did re-emerge links and svgalib with gpm in my USE flags after installing gpm.

----------

## codergeek42

Try specifying

```
mdev /dev/input/mice
```

in your /etc/vga/libvga.config file.

----------

## Motoi-Sakuraba-Milfeuille

it works now! Thank you so much!!!

----------

## codergeek42

Excellent.  Glad I could help.  :Cool: 

----------

## paras_rasmatazz

Sorry, but this doesn't work for me when starting links2 (or any other program which uses svgalib for graphics output) as a non-root user. After fiddling around with the mousedevice permissions a bit, I changed

crw-r--r-- 1 root root 13, 63  4. Jun 2006  /dev/input/mice

to

crw-rw-rw 1 root root 13, 63 4. Jun 2006  /dev/input/mice

and suddenly the mouse started working in non-root svgalib apps.

Obviously /dev/input/mice needs write access in order to let non-root users use the mouse in svgalib apps. Seems rather strange to me because i can't see what a program could SEND to a mouse, maybe it needs write access during svgalibs mouse initialization routine only ?

----------

## ztomiccomputers

rw chmod helped me. thanx for the post.

was tryin to get advancemame and advancemenu working in svga mode:

this should work (sorry if I'm off topic):

 build advancemame and advancemenu from source (quick and easy: if you emerge and use SDL, you can run in X. don't do the rest of this)

> emerge svgalib

> cp ADVMAME-SRC_DIR/config/mame/svgalib/svgalib-devfs.sh /etc/udev/scripts/

 edit /etc/vga/libvga.conf (mouse is IMPS2 or PS2, etc.)

> chmod a+rw /dev/input/mice

> modprobe svgalib-helper

> modules-update

> advancemame

> advancemenu

> advcfg -advmenuc  

> advcfg

> advmenu

12 easy steps! (yeah right!) no it's not easy. very poor documentation on the issue. next step is getting Daphne working with advancemenu.

----------

## ztomiccomputers

well heck!

chmod /dev/input/mice works but only until reboot. Udev creates the device anew and thus permissions are reset.

anyone have an idea?

also; will have to insert svgalib-helper into /etc/modules.autoload.d/kernel-2.6 to get it to load on reboot.

----------

