Linux How to associate "Play disc" with the Blu-ray discs?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
uNiversal Offline
Out of Memory
Posts: 3,194
Joined: Oct 2012
Reputation: 75
Location: Binary pulsar
Post: #51
Well your deals with bluray and mine offtopic tries to deal with all optical media. Yours doesnt work for me, and I presume mine doesnt work for you (mine is not working completely and I already stated it needs work to fix kinks), lets leave it at that then.

uNi
find quote
teeedubb Offline
Member+
Posts: 745
Joined: Mar 2010
Reputation: 12
Location: Down Under
Post: #52
Uni, I can see that your udev rule is a more rounded approach, but please turn down the arrogance, were all trying working towards the same goal and it doesnt help.

Making some changes to simplify your rule and using spontex suggestion regarding the link gives me reliable dvd +bd mounting, but breaks cd playback. Should work on all systems with one bluray drive.

Quote:ACTION!="add|change|remove", GOTO="cdrom_end"
# Define Device and attributes.
SUBSYSTEM=="block", KERNEL=="sr*", SYMLINK+="cdrom"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="sr0"

# Mount on device attached from cold boot?
ACTION=="add",KERNEL=="sr*", RUN+="/bin/mkdir -p /media/%E{ID_FS_LABEL}"
ACTION=="add",KERNEL=="sr*", RUN+="/bin/mount /dev/sr0 /media/%E{ID_FS_LABEL}"

ACTION=="change",KERNEL=="sr*", RUN+="/bin/mkdir -p /media/%E{ID_FS_LABEL}"
ACTION=="change",KERNEL=="sr*", RUN+="/bin/mount /dev/sr0 /media%E{ID_FS_LABEL}"

ACTION=="change",KERNEL=="sr*", RUN+="/bin/umount /media/%E{ID_FS_LABEL}"
ACTION=="change",KERNEL=="sr*", RUN+="/bin/rmdir /media/%E{ID_FS_LABEL}"

ACTION=="remove",KERNEL=="sr*", RUN+="/bin/umount /media/%E{ID_FS_LABEL}"
ACTION=="remove",KERNEL=="sr*", RUN+="/bin/rmdir /media/%E{ID_FS_LABEL}"
LABEL="cdrom_end"

EDIT I dont think my bluray drive likes cd's (the brand or in general I dont know) - its finicky mounting music + data cds, but mounts a data dvd fine with the above rule

XBMC Steam Launcher - Only available for XBMC.
(This post was last modified: 2013-02-27 12:24 by teeedubb.)
find quote
uNiversal Offline
Out of Memory
Posts: 3,194
Joined: Oct 2012
Reputation: 75
Location: Binary pulsar
Post: #53
Music Cd's dont mount since there is no filesystem to mount. Data cd's a whole different matter, either way.

Not being a native English speaker/writer/reader leaves me a bit confused by your last post, No arrogance intended nor even know where you get that from, if anything Im trying to be as detailed as possible to avoid exactly what you the randomness you mention and see if both of us can learn something here.

Anyway the above rule needs a lot of working out kinks and iron it out, the complete lack of experience with udev rules to workaround a OLD and Ignored internal XBMC bug is leaving me stumped to say the least.

One kink is removing of mount path once eject has been issued, another kink is that the XBMC messages mounting external harddrive when cd-dvd is mounted. Yet another kink is actualy getting the mount path to be Label or fallback to device another kink is getting it to work every single time. For e.g if you eject with XBMC mouting back works if you eject with physical button its fails to mount back on media inserted again. Like I said many kinks and no experience.

uNi
(This post was last modified: 2013-02-27 16:47 by uNiversal.)
find quote
teeedubb Offline
Member+
Posts: 745
Joined: Mar 2010
Reputation: 12
Location: Down Under
Post: #54
Im going to post updates in this thread from now on as this is getting off topic

XBMC Steam Launcher - Only available for XBMC.
find quote
uNiversal Offline
Out of Memory
Posts: 3,194
Joined: Oct 2012
Reputation: 75
Location: Binary pulsar
Post: #55
It is also offtopic there, please open a udev rule discussing thread, so its not offtopic anywhere. cheers.

uNi
find quote
cw-kid Offline
Fan
Posts: 562
Joined: Jun 2012
Reputation: 0
Post: #56
Hi

Is there a dummy setup guide for this?

I just got my slot loading Sony Blu-ray drive from Hong Kong this morning and installed it. Only to find out both Blu-ray discs and DVD discs do not auto-play. They are not even mounted unless I reboot with the disc in the drive. I am using Ubuntu 12.10 minimal / XBMC V12.1 / Aeon MQ4 Skin.

What's the best way to easily set this up so I have a Play Disc option? Can anyone point me in the right direction to a current and up to date method?

Many Thanks
find quote
teeedubb Offline
Member+
Posts: 745
Joined: Mar 2010
Reputation: 12
Location: Down Under
Post: #57
The method in the first post will work, but I've noticed some randomness with mounting so find which rule contents works best for you in this thread and use that.

XBMC Steam Launcher - Only available for XBMC.
find quote
Post Reply