3

I have installed Foobar2000 in Wine and it has no access to the CD.

enter image description here

enter image description here

In Wine configuration I added the cd drive.

enter image description here

enter image description here

But it doesn't work.


Excepting in one situation: if inserting a dvd and then replacing the dvd with the audio cd without unmounting first, the audio cd will be then seen foobar2000, while in Thunar file manager and on the desktop the audio is displayed twice.

enter image description here

enter image description here

enter image description here

This stands as a workaround for now.


I am curious:

  • why cdda://sr0/ is not a good mounting point to be set in Wine configs?

  • while media/cdrom can be set and works for dvds - why doesn't it work for audio cds?

But to those I have an answer here:

Audio CDs are a bit different - there's no actual filesystem there and as such they can't be mounted.


I remember I already did this in the past trying to confirm that Foobar2000 works in Wine: I was able to rip cds then! without the dvd mounting trick.


An answer below says that the workaround (described above and also posted by me as an answer) is a Thunar bug that makes the cd accessible by (giving the impression of) mounting it first.

But if a bug can do it, there should be a 'proper' way to do it. (Not trying to mount the cd if that is impossible, but making it accessible otherwise.)


Even if audio cds cannot be mounted, they are still accessible in Ubuntu players without being mounted: how to achive this in Foobar2000?


EDIT: Considering the bug that made me happy, it has nothing to do with Thunar: it was already posted on launchpad: Disks are not unmounted when physical eject button is used. Also, related here. Found about it in this discussion here.

3 Answers3

3

Why is cdda://sr0/ not a good mounting point to be set in Wine configs?


CDDA is not a filesystem. It's a specific protocol for reading and writing data to/from CD drives. Think of CDDA like an http:// for CD drives. You can't use HTTP for Wine because it's not a local part of a file system. CDDA, likewise, isn't part of your local filesystem. Both are protocols for getting data from remote sources.

WINE is a compatibility layer. It can not and will not be able to directly interface with everything that Linux offers. It can interface with some things, but drives are problematic. You need to add the drive to the Wine config so it knows where to look. This is why Wine can't see /dev/sdc unless you tell it to. And, you cannot mount CD drives, so.... You might be able to request Wine's developers to add Audio CD support. Maybe you'll get it. That will make everyone happy.

See below for more information about this.



while media/cdrom can be set and works for dvds - why doesn't it work for audio cds?


Audio CDs do not have a real filesystem. Audio CDs are only storage containers for WAV-type media files and metadata files. The CD reader can read the audio from the CD and then expose it to the computer in CDDA format.

DVDs, on the other hand, do contain a filesystem called UDF. This requires that they be mounted in something like /media/cdrom.

When you do the CD/DVD swap trick, you force Linux to see it as a data disc containing CDDA files. In reality, these CDDA files are not really files. They are instead tracks containing raw music. The system "contains" them in CDDA files so it can use them for programs like Rhythmbox, VLC, and any other media player / CD ripper. You usually do not see this because there is no reason for you to do so. You cannot rename the files to WAV format and have them play.

The links you gave in your answer explain most of the above. GVFS does all the ugly "filesystem" work. This answer explains everything I didn't here.

GVFS doesn't mount the CD. It only reads the CD. Nobody and nothing can mount CDs. Not even Jon Skeet can mount CDs. Give up and go home. If you successfully mount a CD drive, you will undermine the fabric of space-time and cause T̞̱͙̣͔̥̘o̝̞̣n̷̲͔̖̠̤ỵ͚̺͔̟͖ ̠͎̘̲̩͎ͅt͝h̡̯͙̺̣̣̝e ͞P҉̼̳̥̬o̪̣ṇ͈̯̣̫͎ͅy to eat StackExchange and destroy the knowledge of the world that man has. NEVeR Even T`ry!

Read above paragraph as a large no.



Updated Answer:


If you were able to see it in the past without having to do "DVD tricks", I would recommend reporting a bug against Wine and possibly GVFS.

In answer to your comments:

  1. Read first section: Wine is a compatibility layer. It cannot interface with everything the system has.
  2. If it did it in the past, chances are that support was (accidentally) removed in Wine or GVFS. Report a bug for this.
  3. There is no proper workaround because Wine does not interface with CDDA directly. When GVFS exposes the CDDA protocol to the system, it's up to Wine to decide how to expose it to the the windows programs. It seems as though Wine cannot expose it properly. Report a bug to Wine. You might (no guarantee) be able to mount it directly by using this: mount /dev/sr0 /mnt. Then, point /mnt to Wine. It's doubtful that it will work, but it might.

You cannot directly have Foobar2000 integrate with your CD directly, at least not now.

Also, you should read this and this. They say that the below is a possible workaround:

Basically, create a folder in / called cdrom. Assign permissions:

chmod go+rx /cdrom
chown root:cdrom /cdrom

Add yourself to the group cdrom:

usermod -a -G cdrom cip

Add to /etc/fstab:

/dev/sr0 /cdrom

You may or may not need to add this as a CD mountpoint in WINE. Try both ways.



My less than answer opinion


Do not take this as part of the answer. This is just a long comment that is better placed in my answer.

  • It's not a workaround for a bug in Thunar. It is a bug in Thunar GVFS. See Sergey's answer for why this is. It's caused by Thunar not knowing the difference between the two GVFS drives.

  • Why do you even need Foobar2000? IIUC, it's just a media player. What's wrong with Banshee, Rhythmbox, or VLC?

  • You should read stuff on GVFS and CDDA. It'll help you in truly mastering this topic. This answer is pretty basic.

Formatting inspired by this

Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172
  • 1
    @cipricus Different question. WINE is a compatibility layer. It can not and will not be able to directly interface with everything that Linux offers. It can interface with some things, but drives are problematic. You need to add the drive to the Wine config so it knows where to look. This is why Wine can't see /dev/sdc unless you tell it to. And, you cannot mount CD drives, so.... You might be able to request Wine's developers to add Audio CD support. Maybe you'll get it. That will make *everyone* happy. – Kaz Wolfe Oct 29 '14 at 22:24
  • 1
    @cipricus Does that new section work for you? – Kaz Wolfe Nov 18 '14 at 21:34
  • I need some time to answer. I am barely a medium user, I have no idea what GFVS is. Maybe I should try an older Wine version to test. I am positive that I was not dreaming about Foobar2000 ripping cds under Wine 2 or 3 years ago when I had just installed my first Linux... But I cannot prove it! –  Nov 18 '14 at 21:38
  • Until i can answer etc - considering your question on Rhythmbox and Banshee (and why not Amarok etc). I always found them largely over-evaluated and without hesitation prefer Deadbeef and Clementine. Moreover, I do not understand a music player that does not have the option "open" a file and cannot cope with a pls/m3u playlist file containing my favourite radio stations.They cannot look for a file, that is not fancy enough for them, they just offer to 'add music' and 'import media', and I do not need that. I find them bloated and providing too little. –  Nov 18 '14 at 22:10
  • I have just reinstalled those two to take another look at them on this occasion. -- I am flabbergasted not being able to drag and drop a file or folder onto them! -- It is not the first time that I uselessly install those two. -- Why are you people using them?? -- I must be dead wrong here because a lot of Ubuntu users praise these apps. Or do they love them because they are just 'native' and 'ubuntish' ? or because of the podcast, lastfm and alike? –  Nov 18 '14 at 22:27
  • 1
    @cipricus TBH, I just use VLC – Kaz Wolfe Nov 18 '14 at 22:35
  • that's the idea: if you want minimalism, use just VLC, cannot go wrong. a video player will always play sound. if you have the bad habit of trying variety, you will end up saying that Clementine and Deadbeef are not like the other music players. - and my impression is that there are a lot of players that look alike and act alike. foobar is even more 'unlike' others. How I got reinstalling that in Wine: ripping a cd I found Clementine unable to read the proper track names. Deadbeef did ok until the next cd ripping. That is how it happened. –  Nov 18 '14 at 22:40
  • sudo mount /dev/sr0 /mnt
    mount: block device /dev/sr0 is write-protected, mounting read-only mount: /dev/sr0: can't read superblock
    –  Nov 18 '14 at 22:51
  • To be expected. It needs a filesystem. – Kaz Wolfe Nov 19 '14 at 00:30
  • On the bug issue see my edit. - On last attempts, I have tried older Wine in playonlinux with an older foobar version, same thing. maybe i am dead wrong about having done it before... –  Nov 19 '14 at 10:45
  • 1
    @cipricus Sounds like GVFS/Wine. I'd report a bug against one or both. – Kaz Wolfe Nov 19 '14 at 22:47
1

This might be due to permission issue. please check whether the Foobar2000 is having enough permission to list the cd drive. Try changing to demon process under root user and check

BDRSuite
  • 3,156
  • 1
  • 12
  • 11
  • how to do that? please describe these steps if possible –  Oct 27 '14 at 14:42
  • question updated: sometimes Foobar2000 can see the drive, but under the discribed circumstances –  Oct 27 '14 at 14:44
1

I will re-post as a workaround what I found and posted in the question.

I read on various pages that the audio cd cannot be mounted, also here, that it should not be, or that there is no need to mount it - also here.

Anyway, Foobar2000 for whatever reason cannot see the normal way when an audio-cd is inserted.

There is this weird workaround that by a sort of bug in Thunar can make the audio cd be seen as a dvd and mounted.

  • Insert a dvd movie in the cdrom drive, wait for it to mount or mount it.

  • Open Foobar2000, open cd

  • Without unmounting the dvd, replace it with the audio cd.

  • 'Open' the cd.

enter image description here

Rip will work too.

enter image description here


But while this is done through what appears to be a bug that makes the cd accessible as if it were a dvd, the real answer should be how to access the cdrom in foobar2000 in the way the native applications do (if cds are never mounted, then, without mounting them!)

I hope nobody fixes this bug before I find an alternative solution. :(