auto-mount dvd/cd

  Thread Rating:
  • 3 Votes - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Zelos Offline
Junior Member
Posts: 8
Joined: Apr 2012
Reputation: 0
Post: #11
Hello,

I have been using XBMC for a while now and I really like it (thanks guys for developing it!)

However, I encountered a similar problem. I'm running XBMC 11 on Ubuntu 12.04 on a 64bit x86 machine. Everything runs well, except I don't see a menu allowing for DVD Playback. I never tried it before today, where I now mounted a DVD drive via iSCSI. It appears as /dev/sdb and is accessible without problems from the operating system. Also, it can be mounted and I was able to playback a vob file through the file browser.

So how is the XBMC way to allow DVD playback? Should there be a menu? Should it playback automatically when the device becomes available? Do I have to specify the block device somewhere?

Kind Regards,
David

Hardware: ZOTAC ZBOX ID41, 4GB RAM, 1TB local 2,5" HDD, DVD Playback via iSCSI
Software: Archlinux with XBMC from repository
TV Set: LG 50PV350, Onkyo A-5VL + Nubert nuVero10
find quote
akattg Offline
Junior Member
Posts: 4
Joined: Apr 2012
Reputation: 0
Post: #12
I would classify this as a bug, installed it on a ION chipset HTPC and a laptop. In both cases the mount doesn't work. When I reboot (both systems) with the DVD in place sometimes I can play it, sometimes it just shows the system partition.
find quote
thd042 Offline
Junior Member
Posts: 35
Joined: Nov 2010
Reputation: 0
Post: #13
OK, clumsy work-around:
Install "Advanced Launcher" from the xbmc Repository.
Shell into your box and do

mkdir bin
cd bin
echo 'udisks --mount /dev/sr0' > mntcd
echo 'udisks --unmount /dev/sr0' > umntcd
chmod 755 mntcd umntcd

The name of your optical disk device may vary. /dev/scd0 exists as symlink on my system.

Create a new launcher that starts the mntcd-script above, and one that creates the unmnt-script.
Launch one after inserting the disk, the other before ejecting. Ugly, probably unreliable, but what can you do? Not yet fully tested, so you have been warned :-)
find quote
robbanl Offline
Junior Member
Posts: 8
Joined: Mar 2011
Reputation: 0
Post: #14
Ok i think i found a solution by editing the mount policy, i got the cd/dvd to automount. Try to see if it works for you too.

From terminal:

#create new group storage and add your user to it
sudo addgroup storage
sudo useradd -G storage <username here>

#create a file in /etc/polkit-1/localauthority/50-local.d named mount.pkla
sudo touch /etc/polkit-1/localauthority/50-local.d/mount.pkla

#Open the file with editor of choice
sudo nano /etc/polkit-1/localauthority/50-local.d/mount.pkla

#copy and paste the following in the file
[Mount system internal media for group storage]
Identity=unix-group:storage
Action=org.freedesktop.udisks.filesystem-*
ResultAny=yes
ResultInactive=yes
ResultActive=yes


If i understand correctly the policykit should accept the changes as soon as you save the file but i had to do a reboot for it to work.
(This post was last modified: 2012-05-04 15:33 by robbanl.)
find quote
Zelos Offline
Junior Member
Posts: 8
Joined: Apr 2012
Reputation: 0
Post: #15
Using the udisks command instead of the usual mount command I got XBMC to display a popup indicating that a media has been mounted.

However, how to I get XBMC to play back the DVD, short of going to the files menu and clicking on the VOBs?

Hardware: ZOTAC ZBOX ID41, 4GB RAM, 1TB local 2,5" HDD, DVD Playback via iSCSI
Software: Archlinux with XBMC from repository
TV Set: LG 50PV350, Onkyo A-5VL + Nubert nuVero10
find quote
robbanl Offline
Junior Member
Posts: 8
Joined: Mar 2011
Reputation: 0
Post: #16
@Zelos
When you put in a disc a new object in the main menu should appear (between program and system) called "play media/disc" (i have swedish in my menu so don't know the exact phrasing). It doesn't appear when you manually mount the drive.

Have you tried my solution/workaround? For me the disc mounts every time and appears in the menu.
(This post was last modified: 2012-04-30 12:08 by robbanl.)
find quote
Zelos Offline
Junior Member
Posts: 8
Joined: Apr 2012
Reputation: 0
Post: #17
robbanl,

thanks for your help. I have not tried your solution yet, but I will try it this evening.

So far the disk is mounted successfully. And when I mount it via udisks instead of mount, XBMC apparently gets notified and pops up a message indicating that an external hard drive has been mounted. However, the "play media/disc" button never appears.

Hardware: ZOTAC ZBOX ID41, 4GB RAM, 1TB local 2,5" HDD, DVD Playback via iSCSI
Software: Archlinux with XBMC from repository
TV Set: LG 50PV350, Onkyo A-5VL + Nubert nuVero10
(This post was last modified: 2012-04-30 15:25 by Zelos.)
find quote
_BJ1 Offline
Senior Member
Posts: 122
Joined: Apr 2010
Reputation: 0
Location: Germany
Post: #18
(2012-04-29 22:48)robbanl Wrote:  Ok i think i found a solution by editing the mount policy, i got the cd/dvd to automount. Try to see if it works for you too.

No, this doesn't work for me (XBMCbuntu 11.10 aka XBMClive) Sad

Sometimes the entry "Play CD/DVD" in main menu appears for a very short time (1 secs) and then disappears. But no media is mounted.

_BJ1
find quote
robbanl Offline
Junior Member
Posts: 8
Joined: Mar 2011
Reputation: 0
Post: #19
@_BJ1

Strange it works perfectly fine here. Are you part of the group storage? I seem to recall that i also got the menu to pop up and than disappear hmm. I cleaned up my .pkla file a little (see post above), maybe it works better now?
find quote
_BJ1 Offline
Senior Member
Posts: 122
Joined: Apr 2010
Reputation: 0
Location: Germany
Post: #20
(2012-05-04 15:39)robbanl Wrote:  @_BJ1

Strange it works perfectly fine here. Are you part of the group storage? I seem to recall that i also got the menu to pop up and than disappear hmm. I cleaned up my .pkla file a little (see post above), maybe it works better now?

I had to do

Code:
sudo usermod -aG storage <myxbmcuser>
instead of
Code:
sudo useradd -G storage <myxbmcuser>

But no reaction, even with your simplification.

_BJ1
find quote
Post Reply