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
May 30 2007, 02:49
Joined: 30-May 07
Member No.: 43852
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.
This post has been edited by btag: May 30 2007, 02:51
|Lo-Fi Version||Time is now: 31st August 2015 - 23:08|