Linux, Wine & MediaMonkey
Can MediaMonkey 3 run on Linux via Wine?
This is a place where working notes about the attempt can be collected.
Inspired by botijo's original work via the forums.
Note: Monkey Audio (APE) lossless audio files play successfully.
Update 3rd January 2016 by squishysdomain
I just installed version 4.1.10 of MediaMonkey using PlayOnLinux 4.2.9 for Wine. I have 2 days experience of Linux so I have to say it is quite easy, though it took a few hours of experimentation to understand how PlayOnLinux worked. Finally I got all the right options installed based on the information below. Wine and PlayOnLinux came with my disti (Zoran 10) so don't ask me how to install them.
To install, this is what I did:
- Download MediaMonkey onto your target machine
- Open PlayOnLinux and select install a program, choose install a non listed program
- When you get to the manual installation screen tick the box install some libraries
- Choose all of the libraries mentioned below in this post
- Also choose wmp10 to get the codecs
- Once all of the libraries are installed, point PlayOnLinux to the MediaMonkey executable and install it
- Do not enable skin override (this did not work for me) and untick the box to launch MediaMonkey now
- You may need to configure wine to create a virtual drive containing your music, for me this was automatic
- you are done - run MediaMonkey from within PlayOnLinux
Before looking at the brief script below please read these notes about a couple of the lines:
- Within the MediaMonkey installer I accepted all defaults except on the last page I did not have the installer start MediaMonkey
- Download the MAD Plug-in for Winamp
- Within the MAD plugin installer instead of installing to the Winamp folder I installed to C:\Program Files\MediaMonkey
sudo apt-get install wine mkdir -p ~/.wine/WineTricks cd ~/.wine/WineTricks wget http://www.kegel.com/wine/winetricks mkdir -p ~/.wine/drive_c/windows/Fonts sh winetricks corefonts vcrun6 gecko vb6run wsh56 sudo apt-get install winbind wine /path/to/mediaMonkeyInstaller.exe wine /path/to/madPluginInstaller.exe
IE6 can be installed via winetricks as well and this does benefit MediaMonkey functionality such as the track listing window section. It is up to the individual to verify legality of such an installation.
The detailed instructions below seem to cause problems for me with both MP3 and FLAC playback (while Ogg still worked). This setup has been tested to be partially functional on:
- Kubuntu Maverick 10.10
- Wine 1.2.1
- MediaMonkey 18.104.22.1684
I plan to update this as I test and fix more aspects than simple playback.
UPDATE: 26 Feb 2009
Has also been tested on the following setup (notes from Inspired are based on this environment):
- Wine 1.1.15
- Ubuntu 8.10
- Mediamonkey 22.214.171.1241
Adding Wine to Ubuntu
Please follow instructions at http://www.winehq.org/site/download-deb . Version tested here is 0.9.60.
Note there is a known issue with the security config on Ubuntu 8.04, Hardy Heron, and Fedora 9) may generate errors or warnings such as:
preloader: Warning: failed to reserve range 00000000-60000000 err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space,
winevdm: unable to exec 'Z:\tmp\CONFIG.EXE': DOS memory range unavailable
Workaround is as follows: To fix the problem until the next time you reboot. (It also reduces security slightly.) $ sudo sysctl -w vm.mmap_min_addr=0
To avoid having to give that same command every time you reboot, also edit the file /etc/sysctl.conf, e.g. with the command $ sudo gedit /etc/sysctl.conf
and change the line that reads:
vm.mmap_min_addr = 65536
vm.mmap_min_addr = 0
Adding MediaMonkey + Wine
After installing Wine, MediaMonkey can be installed without any problems. If you run MM now, you will have lots of trouble.
MediaMonkey needs some libraries to run. Please use winetricks to install following items:
- gecko as an Internet Explorer alternative - see #Misc notes and links for more details
- vb6run provides the OLE libraries
- vcrun6 provides the MFC42 libraries
- wsh56 provides support for VBScript, needed for scripts. vcrun6 and vbrun6 have to be installed before wsh56 or installation will fail.
wget http://www.kegel.com/wine/winetricks mkdir ~/.wine/drive_c/windows/fonts sh winetricks corefonts vcrun6 gecko vb6run wsh56
A Linux package is also needed. It is called winbind. The synaptic package manager should have this package. It provides ntlm_auth that is needed for OLE, I believe.
sudo apt-get install winbind
In order to reproduce MP3, the MAD plugin is needed.
To install open the link above click download on the EXE and choose to open in WINE.
You should delete the file i_wmp3.dll in the Plugins directory. The reason is that i_wmp3.dll requires Windows Media Player, plus the MP3 codecs for WMP. It is simpler to install the MAD plugin.
In order to avoid "Player initialization errors", the files d_*.dll from the Plugins directory need to be deleted. No iPod integration for you! Other devices will also not be able to synchronize.
UPDATE: 26 Feb 2009 (by INSPIRED)
This is not necessary for d_USBMass1.dll and d_WMDM.dll
d_USBMass1.dll works fine in the environment I am testing on (see notes in Test Environment above). I can't say if WMDM devices work (if it is even possible to connect a device to Linux in that Windows Media mode) but leaving the DLL there is not an issue. I don't have an ipod so I deleted those DLLs, but you can try leaving them there and see what happens. Please update this wiki if it works or not.
For MSD portable media device sychronization
Add the following steps to the Wine Configuration instructions that follow (to enable synchronizing with an MSD attached media player.
- Mount your device in MSD mode (mass storage device).
- In the Drive tab, select Autodetect as instructed below, or manually assign a drive letter to your mounted device folder.
- Once in Mediamonkey, in Options > Portable/Audio devices > go to the Device Configuration tab and set up the d_USBMass1.dll portable player option to point to the drive letter you allocated to your mounted device. Ignore the "Drive label" and "USD Device ID" fields. Autodetect will not detect your device, which is not necessary anyway.
Wine needs a little bit of configuration before running. Go to Applications/Wine/Configuration and follow these steps:
- In the drive pane, select Autodetect. This should create a Wine Z: drive for the file system(/) and a CDROM drive.
- In the audio pane, select whatever creates some sound to you. The current configured audio driver should be autodetected. Select Test to confirm.
- If you have not already configured audio to work correctly on your system through Wine, you may need to do so. If audio does not work in MM then it is mostly likely an issue with your sound configuration. There is plenty of info online on tweaking this in Wine on Ubuntu, etc. I have pulseaudio, oss, jakc, and alsa installed. I use ALSA in the Wine Audio Configuration and it works fine for Mediamonkey.
Botijo verified this to work with the settings set in this wiki.
Following items work:
- Tag support
- Database operations
- File operations
- Music output (my ears are itching for more music!)
- Plugins (Milkdrop shows! See screenshot section. Speed is good with MilkDrop)
- System tray icon
- Now playing window shows correctly
- Playlist management, including saving
- Auto DJ queues songs
- External browser is opened correctly for "Get Info/Buy"
- Autoplaylists (only basic tested)
- Send to Virtual CD
- Gold registration
- Find from the same artist
- Playback of Monkey Audio (APE) lossless audio files works fine
Following items work with some problems:
- Skins (Graphical glitches while changing skins, press Enter after doing so)
- UPDATE (26 Feb 2009 by INSPIRED): No such problems to report in my test environment. Have tried the three default skins and all work fine. Not sure about third party skins.
- Scripts (some do, but auto scripts are not loaded after restart?)
- Installation packages .mmip (Show errors, but install correctly, check notes)
- Reports (Statistics fail due to some obscure SDBUI error, maybe opens a webpage; file based reports work)
- CD Rom burning: You need to swap already burnt CD/DVD with blank in order to let MM realize there is a CD/DVD Burner.
- UPDATE (26 Feb 2009 by INSPIRED): Miniplayer has problems with the gui locking up when the player is moved. To unlock it, move any other window over MM. Then restore MM to full mode.
- UPDATE (26 Feb 2009 by INSPIRED): Microplayer causes player to vanish entirely. Not recommended.
Following items do not work:
- Device synchronization, as I have deleted all synchronization plugins
- UPDATE (26 Feb 2009 by INSPIRED): Synchronization is working fine for MSD connected devices. See notes above, including environment notes.
- Opening webpages inside MM (gecko interface does not show anything, does MM rely so much on IE?). This includes Auto tag from Web, and maybe Statistics report.
- Because of previous point, any URL related operation fails (e.g. opening an external URL, opening Podcast directory node). MM opens a dialog and shows a WININET error.
- Autoplaylists do not show on click, but they show if you browse node by node with the keyboard
- Party mode is unusable and locks
- Send to Email shows Thunderbird, songs are not attached
- UPDATE (26 Feb 2009 by INSPIRED): The "Accessibility" option (for filtering out files which are not available) in the filters and autoplaylists does not work on my test environment.
Following items have not been tested:
- To be determined
Apart from all this, please be aware that some skins modifications (mainly resizing of windows) are painful slow.
Useful tip with Compiz
Graphical performance and reliability may be greatly improved by disabling Compiz. There is an easy way to turn it off and on using Compiz-switch. Follow the installation instructions on the Compiz-switch web page also to add the icon to a panel and you can turn compiz on and off in a flash.
See Linux Plugin Status for details on plugin test status on Linux.
All the installation steps via Console (Application/Accesories/Terminal) commands. Originally written (2008-05-03) using Ubuntu 8.04 test enviroonment & MM 3 Beta (MediaMonkey_126.96.36.1994_Debug.exe) Updated 2008-06-26) using Ubuntu 8.04 fully patched environment and MM 3 (MediaMonkey_188.8.131.523.exe) Commands can be copied and pasted to a Console. Do NOT try to run this as an omnibus script. Problems can occur at each step which need to be addressed before continuing.
# 1)Install Wine # Add key for new repository wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add - # Add new repository sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list # Update APT package info sudo apt-get update # Install wine package sudo apt-get install wine # 2)Configure Wine # Use Applications/Wine/Configure Wine # Do Not proceed if this does not work # 3)Install winetricks # Get winetricks script wget http://www.kegel.com/wine/winetricks # Install additional packages for winetricks sudo apt-get install cabextract # Install winetricks for MediaMonkey. Do Not change parameter order. # Accept all defaults for individual installers sh winetricks gecko vb6run vcrun6 wsh56 # 4)Install additional packages for MediaMonkey # Install winbind. Start winbindd daemon. sudo apt-get install winbind # 5)Install MediaMonkey # Get MM3 installer beta debug version wget http://mediamonkey.cachefly.net/MediaMonkey_184.108.40.2063.exe # Run installer. Do Not Launch MediaMonkey yet. wine ~/MediaMonkey_220.127.116.113.exe (Don't create Quicklaunch icons, but do create Desktop icons and do enable full skinning) (Associate all filetypes offered with MediaMonkey, don't start on finish) # 6)Create directories to manage MediaMonkey plugins fixes. This step required after first MM install. # Change to Plugins directory cd ~/.wine/drive_c/Program\ Files/MediaMonkey/Plugins/ # Create directory to hold Problems plugins mkdir Problems # Create directory to hold Fixes for plugin problems mkdir Fixes # 7)Get alternate plugins for Fixes # MAD input plugin. Version at time of testing. FF3B5 is acting up on the right-click menu for the main page. wget http://www.mars.org/home/rob/proj/mpeg/mad-plugin/MAD%20plug-in%200.14.2b.exe wine MAD\ plug-in\ 0.14.2b.exe cd ~/.wine/drive_c/Program\ Files/MediaMonkey/Plugins/Fixes/ cp ~/.wine/drive_c/Program\ Files/Winamp/Plugins/in_mad.dll . # 8)Cleanup MediaMonkey plugins. This step is required after any MM re-install. # Change to Plugins directory cd ~/.wine/drive_c/Program\ Files/MediaMonkey/Plugins/ # Move known problem dlls out of main Plugins directory mv -f d_*.dll Problems/ mv -f in_wmp3.dll Problems/ UPDATE (26 Feb 2009 by INSPIRED): Leave d_USBMass1.dll in the plugins folder (and make additional copies if you have more than one device or an microSD card in the device) if you want to sync to a media player mounted through an MSD connection (a Sansa e200 series, for example). # Copy Fixes to main Plugins directory cp Fixes/* . # 9)Run MediaMonkey for first time # Use Applications/Wine/Programs/MediaMonkey/MediaMonkey Note that MediaMonkey may take a considerable amount of time to start up (before the splash screen appears).
Debug version of MM works and can report errors to developers (I hope they see my email).
The gecko engine does not provide all the functions that MM needs. Check the TO DO list of SHDOCVW.DLL. This DLL provides the control box, so if that fails, MM cannot show an IE window. As a promising alternative, IE can be installed under wine. It does not install under the default wine locations, so it is a work in progress. The big problem installing IE under wine is that you should legally own a copy of Windows.
A way to know what MM is doing is catching all the KERNEL32 debug outputs. Of course you need the debug version of MM to do this. The usual Windows tool DebugView does not work. A crude way to do the same thing under WINE is (beware of big files!):
WINEDEBUG=relay wine ./MediaMonkey.exe &> /tmp/MM.log grep Debug /tmp/MM.log > MM.log
If you resort to debugging why some feature does not work, please have a look at WINE documentation. It helps a lot.There are lots of graphical glitches that hinder your progress. Also, whenever a serious error is found (most of the time due to missing DLLs), MM will hang. The only way to continue is to kill the process. This is done with
Installation packages install correctly, but Xubuntu file manager (dunno if it happens with vanilla Ubuntu one) does not register the filetype with MM. Even in the case that the filetype .mmip is being registered correctly, WINE might not be able to translate UNIX paths (e.g. /usr/bin/) into Windows own format (unrelated example: C:\Program Files). At least that is something I read, although I do not remember where. What it means is that the argument passed to MM will be rubish, so MM will ignore it. As a workaround, you can copy your .mmip into MM install directory and run MediaMonkey.exe <myscript.mmip> from MM installation directory. This way no paths are being walked (pun intended).
Media Serial keys
If you want to use the same database as a previous windows one, make sure the drive is mounted on linux, and open up winecfg.
- Make sure you set this drive as a wine Drive, with the same drive letter preferably
- Find the serial number of the drive under WXP, or open up the MM database (Docs + Settings\Username\Local Settings\Application Data\MediaMonkey\MM.db) in an sqllite browser, and find the serial number in the 'medias' table (check the songs table to find the media id you want)
- Back in winecfg on the drives tab, click advanced, and enter in the serial number for the wine Drive, you will need to convert the decimal MM uses to a hexadecimal number, converters can be found on the web.
Additional note: If your drive is an external mapped drive then the serial number can be found by doing "dir z:" at the windows command prompt where z: is the drive letter. It will be in the format aaaa-bbbb. This can be pasted into the Wine serial number and then removing the '-'.=
Ubuntu 12 Tips
When switching from Ubuntu 10 to 12, you might notice some features (such as scripting) stop working. I solved the issue by 1) removing all winetricks packages, 2) updating to wine1.5, 3) getting the latest winetricks, and installing the following winetricks packages in addition to what is specified in the installation steps: msscript, msvcirt, vcrun2010, vcrun6sp6. After I did all of this, MM started to run very fast (almost as fast as native applications), and scripting features started working again.