| View previous topic :: View next topic |
| Author |
Message |
epsilon72 Guru


Joined: 20 Sep 2007 Posts: 530
|
Posted: Wed Jan 19, 2011 9:56 pm Post subject: wine, udisk and cd's not playing well together |
|
|
I'm trying to figure out how to get cd's to automount at a consistent location using udisks. Right now, I can only get these two scenarious:
1)I use a valid fstab entry for /dev/sr0 to mount the cd at /mnt/cdrom, like I used in the hal days. udisk refuses to mount anything that has an fstab entry, including this.
2)I comment out the /dev/sr0 entry from fstab. udisk then mounts the disk at /media/<disk label>. I'd have to edit the drive shortcuts for wine every time I change disks for wine to be able to find where the disk is mounted.
So, I'm looking for a way to get udisk to mount cd's at one location regardless of label, or a way to get wine to recognize automatically when a cd is mounted, regardless of location. I don't know for sure, but doesn't ubuntu's wine setup know how to do this? Thoughts? |
|
| Back to top |
|
 |
epsilon72 Guru


Joined: 20 Sep 2007 Posts: 530
|
Posted: Sat Jan 22, 2011 8:44 am Post subject: |
|
|
C'mon guys, there's got to be a solution somewhere
Maybe hardly anybody visits the gaming forum these days? |
|
| Back to top |
|
 |
bobspencer123 Guru


Joined: 19 Dec 2005 Posts: 544
|
Posted: Sat Jan 22, 2011 1:01 pm Post subject: |
|
|
I can only say that I ran into this problem when I switched to -hal system with udisks as my automount. Wine no longer automatically figured out where my automount media was. I would guess that wine itself needs to be updated to work nicely with udisks but this is mere speculation. I was hoping that in a few months wine would catch up and make the switch from hal to udisks.
I know this isn't an answer but just wanted to let you know that you are not alone. _________________ Increasingly becoming a 2 channel audio nut! |
|
| Back to top |
|
 |
swimmer Veteran


Joined: 15 Jul 2002 Posts: 1276 Location: Netherlands
|
Posted: Sat Jan 22, 2011 1:05 pm Post subject: |
|
|
Did you try to run one of the userspace tools like udiskie or udisks-glue to automount your devices? I used both of them and both are mounting everything I'm throwing at my computer
HTH
swimmer |
|
| Back to top |
|
 |
ppurka Advocate

Joined: 26 Dec 2004 Posts: 3049
|
Posted: Sat Jan 22, 2011 1:26 pm Post subject: |
|
|
You could create a rule in udev itself. Create your fstab entry and then make a rule something similar to this in a new file in /etc/udev/rules.d | Code: | | ENV{DEVNAME}=="/dev/sr0" RUN+="/bin/mount /dev/sr0" |
_________________ emerge --quiet redefined | E17 vids: I, II |
|
| Back to top |
|
 |
epsilon72 Guru


Joined: 20 Sep 2007 Posts: 530
|
Posted: Sat Jan 22, 2011 3:47 pm Post subject: |
|
|
Thanks for the tips, guys. I'll try them out when I get home from work today.
As for wine being updated for this behavior, it's been more than a year since I first came across linux setups that mounted cdrom media at dynamic locations, and for whatever reason wine still doesn't have this functionality. It's okay though, as long as static mounts are still possible. |
|
| Back to top |
|
 |
epsilon72 Guru


Joined: 20 Sep 2007 Posts: 530
|
Posted: Sun Jan 23, 2011 4:44 pm Post subject: |
|
|
I'm trying out the things mentioned above and it's turning out to be a little more difficult than I thought...although udiskie *might* work I suppose if it is in my .bashrc or something.
I did have a thought though...the automounting behavior is just fine for everything EXCEPT wine. Would there be any way to get udev to generate a symlink to a newly dynamically mounted cdrom? And remove said symlink upon ejecting the disk? That's all wine would need, really. Something along the lines of, if the cd in question had a label of "INSTALL"
ln -s /media/INSTALL ~/.wine/dosdevices/d:
but have it be able to handle any label name, not just "INSTALL".
I wouldn't know where to start or what syntax to use though...would something like this be possible with udev?
lol, I guess one solution would be to create an endless number of wine dosdevices, one for every windows game cd label that I play with wine  |
|
| Back to top |
|
 |
ciith n00b

Joined: 23 Feb 2003 Posts: 10 Location: ontario
|
Posted: Wed Mar 30, 2011 11:38 pm Post subject: |
|
|
It's quick and dirty, and not really automated (but I just want to get Starcraft installed right now so I'm not delving into it further yet), but here's what I did.
I made a script with the following in it:
| Code: | | mount | grep /dev/sr0 && if [ -d ~/.wine/cdrom ]; then rm ~/.wine/cdrom; fi && ln -s `mount | grep /dev/sr0 | sed 's/\/dev\/sr0 on \(.*\) type.*/\1/'` ~/.wine/cdrom |
Put that somewhere, chmod +x and then run it after you pop in a disk. Point your wine install at ~/.wine/cdrom for the cd drive.
edit: fixed problems with changing symlink |
|
| Back to top |
|
 |
|