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".

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.