Running Foobar in Linux, Alien Cats crossbreeding with Penguins
Running Foobar in Linux, Alien Cats crossbreeding with Penguins
May 17 2007, 13:38
Joined: 8-May 06
Member No.: 30546
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.
- You will need a working linux box with wine. Under Ubuntu you can use the command:
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:
sh winetricks winxp allfonts- To correct audio stuttering problems during CPU spikes, set wine audio acceleration to "Emulation" instead of "Full". From the Wine Application DB entry for foobar2000:
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.
* 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:
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
- Let's build a shell script to execute foobar like a normal Linux program
gksudo gedit /usr/bin/foobar2000
#!/bin/sh* If you are using winelocale, replace "wine" with "wineloc -l ja_JP" or something similar for your region.
if [ "$1" != "" ]; then
filename=`echo z:$1 | sed 's/\\//\\\\/g'`
wine foobar2000.exe "$filename" &
wine foobar2000.exe &
- Close gedit and save the file.
- Make the file executable with the following command:
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
gksudo gedit /usr/share/applications/foobar2000.desktop
[Desktop Entry]- Close gedit and save the file.
Not all components work well with wine, here is a list of some components with special requirements:
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:
command_1 - wine ~/.foobar2000/foobar2000.exe /playpause- In the left pane navigate to /apps/metacity/global_keybindings and define the following keys:
command_2 - wine ~/.foobar2000/foobar2000.exe /stop
command_3 - wine ~/.foobar2000/foobar2000.exe /next
command_4 - wine ~/.foobar2000/foobar2000.exe /prev
run_command_1 - XF86AudioPause
run_command_2 - XF86AudioStop
run_command_3 - XF86AudioNext
run_command_4 - XF86AudioPrev
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.
- 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".
This post has been edited by Yotsuya: Mar 20 2009, 01:22
Jul 3 2007, 13:35
Joined: 4-January 05
Member No.: 18834
I'm just trying out Ubuntu and i would like to have foobar play my files. I followed the guide in the first post, but i get an error when trying to start foobar from the menu:
Failed to execute child process "/usr/bin/foobar2000" (Permission denied)
Offcourse i see there is something wrong with the permissions, but how do i solve this?
Also when i try to start foobar from a terminal with: wine -l ja_JP foobar2000.exe
i get the error: wine: could not load L"c:\\windows\\system32\\-l.exe": Module not found
I would really appreciate the help getting my way with wine and ubuntu
Inter Deum et Diabolum semper Musica est", Tanzwut
Jul 3 2007, 21:40
Joined: 12-September 06
Member No.: 35092
wine -l ja_JP foobar2000.exe
I thing this is wrong. Let the bold text away.
go to your directory /home/user(or what your name is)/.foobar2000
Choose the foobar2000.exe rightclick and then open with wine.
This should run foobar.
I had some problems too with creating a shell script.
This post has been edited by Spirit_of_the_ocean: Jul 3 2007, 21:41
|Lo-Fi Version||Time is now: 3rd March 2015 - 21:29|