I have had several people ask me about making foobar work under linux. There are several threads mentioning it is possible however it is hard to find much detail about it. I have foobar running rather stable on my linux box and have created this thread in an attempt to provide a central place for questions and answers for running foobar under linux. Peter has indicated he will not develop a linux version of foobar so I thought it would be proper to keep these sorts of questions out of the main threads. I intend to update this post and polish these instructions as discussion reveals more information. I have pieced this together from various other sources and applied them to my own configuration. If you have a better approach to running foobar under linux please share with the rest of us.

* Wujek_Bogdan has provided instructions in Polish, you can find them here.

Installation

I. Wine- You will need a working linux box with wine. Under Ubuntu you can use the command:

QUOTE

sudo apt-get install wine

- If you intend to use multilingual support, I suggest winelocale.- This tutorial assumes you have a wine drive z: mapped to your filesystem root "/" directory. This is the default setup with most wine installs.- Be sure to configure wine as a Windows XP or newer machine, foobar does not support older OSs such as Win95 or Win2k. Also be sure to install windows fonts so everything looks pretty. To do this with winetricks:

The beta version of foobar2000 uses Directsound by default, which can cause some problems when playing music. In order to get the program to play music properly, you must set the Hardware Acceleration to emulate Directsound. Go to a terimal and type in "winecfg". A window will open with options for you to modify. Click on the Audio tab, and then look for "Hardware Acceleration". It is currently on "Full". Click on it, and you will have a list of options. Click on "Emulation", and then click on "Apply". foobar2000 should now be able to play music. Note that this will make foobar2000 version 0.8.3 give out an error when you try to play an audio file. Just change it back to "Full" in winecfg when you're done using foobar2000 version 0.9 beta.

II. Foobar2000* If you have an existing copy of foobar, copy your old foobar2000 folder to ~/.foobar2000 and skip this section.

- Download the foobar installer from the main foobar homepage.- Run the foobar installer with wine:

QUOTE

wine foobar2000_0.9.6.3.exe

- Use the "Portable installation" Type to avoid mucking about with user profiles.- Install to the location z:\home\YOURNAME\.foobar2000\ which translates through wine as ~/.foobar2000

DO NOT install "Audio CD support", wine does not currently support direct access to optical drives.

III. Shell Script- Let's build a shell script to execute foobar like a normal Linux program

* If you are using winelocale, replace "wine" with "wineloc -l ja_JP" or something similar for your region.

- Close gedit and save the file.- Make the file executable with the following command:

QUOTE

sudo chmod +x /usr/bin/foobar2000

IV. Application Package- Pick an icon for foobar, I rather like this one by Byan. Save it as /usr/share/icons/foobar2000.png- Let's build a .desktop application package so we can launch foobar from the gnome main menu

Keyboard Shortcuts:By default, wine should allow foobar to map multimedia keys if they are not already mapped by something else however these bindings will not be global (you cannot change songs when using a different program). To globally control foobar with your multimedia keys you may want to read through this post over on the ubuntu forums. To summarize:

- Press Alt+F2 to open a Run Configuration window.- Enter "gconf-editor" in the box and either press <Enter> or click [Run]- This should open the Gnome Configuration Editor.- In the left pane navigate to /apps/metacity/keybinding_commands and define the following keys:

Announcing Now Playing Information:Many people like to announce what they are currently playing in foobar to other programs such as IRC or an Instant Meesenger. Most of the popular solutions do not translate well outside of wine. However I discovered foo_np_simple which basically dumps titleformatted text into an external plain text file that can then be processed by your external program (cat ~/.foobar2000/now_playing.txt). I have considered trying to mirror a nowplaying info file from another player such as quodlibet and then create an xchat perl script to parse the information nicely but I think that goes beyond the scope of this topic.

Other Comments:- Wine tray icons are a bit buggy with both gnome and kde, To Avoid problems you may want to prevent foobar from minimizing to it in your Columns/Panels config.- These instructions are written for a gnome environment. For KDE users replace "gksudo" with "kdesu" and "gedit" with "kate".

Do newer Wine versions fix the problem, that playback of audio starts to stutter when the CPU load caused by other applications is increased ? That problem has made foobar unusable for me, at least the playback functions - I only use it to replaygain and move files around with the masstagger.

Do newer Wine versions fix the problem, that playback of audio starts to stutter when the CPU load caused by other applications is increased ? That problem has made foobar unusable for me, at least the playback functions - I only use it to replaygain and move files around with the masstagger.

When I tried a few month ago , the problem you describe (audio stuttering on CPU load) made it unusable for me,even if the rest was working.It's also annoying foo_ui_columns do not work due to a bug / unimplemented stuff in wine. This should be fixed in wine and to my knowledge it's not, even If i've seen (but not tested) an older pacth which was more a workaround than a real fix.

Next i'm going to try with wine configured to use JACK for audio to see if i can fix the stuttering.

Starting with wine 0.9.36 (possibly 0.9.35), foo_ui_column work finally (before it was crashing foobar) !! That's great news to me as it allows me to use my windows fb2k config. An important thing to know is that in foo_uie_column layout config you have to double right click to see the contextual menu appear to add splitters/panel etc.I was able to make foo_uie_albumart work flawlessly after copying some DLL into foobar's directory:gdiplus.dll libpng13.dll zlib1.dll. If you miss some dll you probably can find it on http://www.dll-files.comfoo_playlist_tree works great too, it's a central piece of my setup.Even the icon in the systray works.

Now about audio stuttering. I'm using a creative Audigy 2 ZS Notebook (PCMCIA) and I reduced stuttering considerably using JACK in realtime mode as the wine audio driver which in turn use ALSA. Using anything else stutters audio as soon as you do basic operation in other programs. Even using JACK, it stutters easily but it's kind of supportable but still annoying. I also had with this card to set audio to 48Khz / 16 bit in winecfg audio tab and use the PPHS resampler in fb2k with the same sample rate, else I would get distorted sound. I think audio stuttering do not affect all cards.Anyway some work will be done this summer in Google Summer of code program to make audio suck less:http://www.winehq.org/pipermail/wine-devel...rch/054931.html

What kind of hardware acceleration do you use in Winecfg Bubbleguuum?Also I can't save any changes in foobar, wine starts moaning about rights even though anyone should be able to edit any file in the foobar installation dir.

I put emulation to "full" but also tried with "standard" and that didn't change anything.I put the sample rate to 48Khz / 16 bit , using the same settings for the PPHS resampler.Also tried checking driver emulation but that did'nt change anything.What specific problem do you have ?

QUOTE

Also I can't save any changes in foobar, wine starts moaning about rights even though anyone should be able to edit any file in the foobar installation dir.

You're not running an installed foobar from a windows partition ? It can be problematic and best way to experiment is to install foobar with wine.

I am running wine 0.9.37 and also experience sound choppiness when another application causes a cpu spike. I have been playing around with various options and seem to get the best performance with ALSA+OSS @ 16bit 44.1Khz and full hardware acceleration.

I played around with JACK but did not have much success at all. I think this is due to some unresolved issues with the wave mixer on my setup.

What specific problem do you have ?You're not running an installed foobar from a windows partition ? It can be problematic and best way to experiment is to install foobar with wine.

The problem is, as with most people, skipping sound. I've copied a foobar installation from my Windows partition as advised, and removed most components I had there. I've had Foobar installed with WINE earlier, without extra problems, so maybe I should try that again.

at the moment the only thing wich is stoping me to switch to linux (i never used linux before, but i'm heavly interested), is the fact that i can't use the Discogs Plugin from bubbleguuum. well that's what i think. can someone tell me if it's possible to get this plugin under ubuntu with wine to run? i know... what the hell. it's just one plugin! yeah but i've organizied all my sound-managing related stuff on this

at the moment the only thing wich is stoping me to switch to linux (i never used linux before, but i'm heavly interested), is the fact that i can't use the Discogs Plugin from bubbleguuum. well that's what i think. can someone tell me if it's possible to get this plugin under ubuntu with wine to run? i know... what the hell. it's just one plugin! yeah but i've organizied all my sound-managing related stuff on this

read you arT2

The plugin works very well once you get foobar running under wine, I tested it. You'll only need to copy gdiplus.dll from a windows install into your foobar directory.

The only big pbm at the moment is stuterring when playing audio, I hope it'll improve after this summer because some work on audio is going to happen in wine.

Very nice guide. Now I can finally run foobar as a command instead of a desktop icon/shortcut-thingy.

The one thing I noticed to fix the skipping sound problem is to set the foobar option: core: "Process priority" to "Real Time" instead of the default "normal". My philosophy on this was, since it's not windows, why bother keeping a low priority level.For me, that fixed the sound skipping problem when the CPU is busy.

I also played with renice (linux's own process priority) on wine and foobar. That didn't seem to have much of an effect on the pauses.

Hi Old to foobar2000 but new to linux (ubuntu)--just installed it three days ago, and now I'm trying to get foobar up and running...it seems to work with default ui, but when I try to use columns--not gonna even try panels yet--it crashes...Am I missing some .dll's?

Also, are there any linux players that display album art--not from amazon or online sources, but what you have in your folder like cover.jpg or folder.jpg? I've spent a lot of time finding high-res pictures, and a lot of albums I have are not even on Amazon...

Thanks! I'll check them out. And thanks for giving me the courage to try linux--I never would have made the move if there was no hope of running foobar, but I'm open to finding a music player I like that runs natively on linux.

Hi Old to foobar2000 but new to linux (ubuntu)--just installed it three days ago, and now I'm trying to get foobar up and running...it seems to work with default ui, but when I try to use columns--not gonna even try panels yet--it crashes...Am I missing some .dll's?

Very nice guide. Now I can finally run foobar as a command instead of a desktop icon/shortcut-thingy.

The one thing I noticed to fix the skipping sound problem is to set the foobar option: core: "Process priority" to "Real Time" instead of the default "normal". My philosophy on this was, since it's not windows, why bother keeping a low priority level.For me, that fixed the sound skipping problem when the CPU is busy.

I also played with renice (linux's own process priority) on wine and foobar. That didn't seem to have much of an effect on the pauses.

Where's is that Process priority option ? All I found I Therad priority in he advanced/playback section and it was already to the max (7)