Here is a tutorial to install Sonos on ubuntu using Wine, PlayonLinux and Samba (for the music library).
I/ Install the Sonos Controller
The first thing to do is to install Wine and PlayonLinux so your computer can use Windows software. Open a terminal (ctrl+alt+t) and copy/paste the following line by line.
sudo apt-get install wine
sudo apt-get install playonlinux
Then download the latest version of the Sonos Controller for Windows.
Start PlayonLinux and click on "install a program". A new window opens. Select "Install a non listed program" (at the bottom). If it is the first time you use PlayonLinux you may not have this option. Then close the window and re-open it.
Select "install in a new virtual drive". Name the drive however you want (but "sonos" seems a logical choice). Untick the boxes that may be ticked and choose "32-bit installation". Browse to the sonos controller you downloaded and click "next".
The installer starts. Install the software (leave everything as it is) but DO NOT run the application after setup. At the end of the installation PlayonLinux proposes you to create shortcuts. Create one for the sonos.exe file. You now have a Sonos launcher on your desktop. You can change its icon to a Sonos icon and drag it to the launcher.
Sonos is now listed in PlayonLinux. Right click on it and select "configure wine". In "application" make sure "Windows XP" is selected.
In PlayonLinux select "Sonos" and click on "configure" (on the right side of the window). A window opens. Go to "install components", look for "dotnet40" and install it.
Start the application. Click "next" and then choose "don't configure windows firewall". Your Sonos controller is now installed and ready to work.
II/ Make the Sonos Controller fullscreen
If double clicking on the menu bar of the Sonos controller works for you, skip this part of the tutorial.
If double clicking on the menu bar freezes your controller follow these steps to make your controller fullscreen.
Make sure Sonos is not working. Open PlayonLinux, right click on Sonos and select "configure wine". Go to the "graphics" tab and select "emulate a virtual desktop". Increase the resolution to 1000x800. Close Wine.
Start Sonos. The application will start in a virtual desktop. It is ugly but we will get rid of it. Double click on the menu bar to make Sonos fullscreen in the virtual desktop. Close Sonos.
Go back to PlayonLinux, right click, "configure wine". Untick "emulate a virtual desktop". Close Wine and PlayonLinux. Start Sonos. It should be fullscreen.
If your controller is still not fullscreen, repeat the operation but increase the resolution of the virtual desktop to its maximum (similar to your own resolution).
III/ Access the music library
To access your music library is a bit more complicated but still doable. To do so we will use Samba and create a network share.
The first thing to do is to install Samba.
sudo apt-get update
sudo apt-get install samba
Create a username and a password for Samba (they can be different or similar to your usual username and password). In the following line replace username by the username of your choice.
sudo smbpasswd -a username
You will then be asked to create a password.
For the following I suppose the folder you wish to share and to set as your music library is your music folder (/home/username/Music). If not change as needed.
Edit the samba configuration file
sudo gedit /etc/samba/smb.conf
Once the file is open add at the very end
path = /home/username/Music
valid users = username
read only = n
Name the folder whatever you want. Change the path to set it with your username. The username in "valid users" should be the username you set earlier for samba. Save the changes and close gedit.
You now need to restart samba
sudo service smbd restart
Your music folder is ready to be shared.
Start Sonos. Click on "manage" and open "music library settings". Click "add" and choose "on a networked device such as a network attached storage (NAS) drive".
Write the path this way:
//computer's name/folder name
So if my computer is called "Poulpe" and I named my folder "Music" in the samba configuration file, my network will be:
Sonos asks you a username and a password. Give the one you set at the beggining in samba.
You Sonos is now working, fullscreen, and you can access your music library.
It would have been impossible for me to use Sonos on my computer, and to write this tutorial, without this article on Michael's blog, this tutorial on help.ubuntu and a few posts on the sonos support forum from a guy named Keith.
English in not my mother tongue. If there is mistakes or if something could be better explained please tell me, I'd be thankful.
This is a repost from askubuntu. I am the writer of the original article.
The article on Michael's blog
The tutorial for samba