You are not logged in.

#1 2011-03-06 21:20:59

dustin
Member
Registered: 2009-10-25
Posts: 8

wine without hal compiled in - dvd media detection

Hi,

my wine cannot detect a newly inserted medium into the DVD drive. I symlinked /dvd/sr0 to ~/.wine/dosdevices/d:: . While on ubuntu 10.04 the symlink to /media/DVD-VIDEO-LABEL named d: gets automatically created when wine starts, nothing happens on the latest wine in arch.

The difference in debug messages:

Ubuntu 10.04 - working:

WINEDEBUG=+mountmgr wine explorer.exe
.....
trace:mountmgr:add_mount_point created L"\\DosDevices\\D:" id (null) for L"\\Device\\CdRom0"
trace:mountmgr:add_dos_device added device d: udi "/org/freedesktop/Hal/devices/volume_label_FLIPPED" for "/dev/sr0" on "/media/FLIPPED" type 4

Clearly hal is being utilised.

On arch the DVD is automounted too:

/dev/sr0 on /media/LEGEND_OF_THE_GUARDIANS type udf (ro,nosuid,nodev,uhelper=hal,uid=1000)

Still using the same wine command yields

trace:mountmgr:initialize_hal Skipping, HAL support not compiled in

and no add_mount_point is being called, no symlink d: to /media/LEGEND_OF_THE_GUARDIANS is created. Of course I can create the symlink manually, which wine happily accepts and everything works fine afterwards.

Please is there a way to make the hal-free wine in arch detect the removable media? Thanks a lot for any help.

Offline

#2 2011-03-07 22:20:29

nicodoggie
Member
Registered: 2010-12-31
Posts: 15

Re: wine without hal compiled in - dvd media detection

I wrote up a udev rule that would auto-mount the DVD then create a link in .wine/dosdevices

http://pastebin.com/jpDP32Ei

labeler.sh:

#!/bin/bash

echo $(/sbin/blkid -o value -s LABEL "$1") | sed 's/\s/_/g'

Change ENV{user} to your username.

The detection of the disk improved a bit, I think, and a script could be added to make the drive lettering dynamic. The loop that waits for blkid to return a label for the disk is kinda iffy, IMO, but I had to do it otherwise udev tries to mount the DVD before the tray even closes--somebody might have a better solution for that. It works though.

Now that I think about it, maybe a script that polls the /media directory and creates symbolic links in ~/.wine/dosdevices might be better with Gnome (can't eject via nautilus when you use the udev rule)...

Anyway, hope this helps somehow

Offline

#3 2011-03-09 20:13:30

dustin
Member
Registered: 2009-10-25
Posts: 8

Re: wine without hal compiled in - dvd media detection

Hi nicodoggie,

Thanks a lot for your response. I though of using incron monitoring the /media folder. Your approach is very interesting, thanks a lot for your udev script.

I just wish we did not have to hack such workarounds :-)

Offline

Board footer

Powered by FluxBB