I’m please to announce folks that you have one less excuse to use Linux in favour of OpenSolaris… you can now run Spotify on OpenSolaris, granted not natively, but in the same way you can on Linux: with Wine.

The process is really easy:

  1. Switch to the dev repository (http://pkg.opensolaris.org/dev/) either via the CLI or within the Package Manager GUI
  2. Upgrade your OpenSolaris release to the latest and greatest, which at the time of writing is snv_118 using either the CLI (pkg image-update) or the Update Manager GUI.
  3. Install Wine as per the details on the Wine wiki. You can use either the Wine source code tarball or the latest git sources (which I used). Do NOT try and use the prebuilt Wine in the contrib repository as it does not have sound or network support - both of which are needed by Spotify.
  4. Install Spotify as per the Spotify under Wine instructions
  5. Start Spofity, login and start listening.

It’s that simple. See…

Spotify on OpenSolaris

There are details about on getting it working on earlier releases of OpenSolaris, and prebuilt pkgs available too if you don’t want to live on the cutting edge, but I do, so I’ve gone with the cutting edge method :-D .


10 Responses to “Spotify On OpenSolaris”  

  1. 1 Jan Ekbom

    It doesn’t work. I’m used to more comprehensive tutorials from the linux world. In the OpenSolaris world it seems like everyone excludes several steps.

    I don’t understand. How to use the Wine wiki, the Wine source code tarball or the latest git sources?

    I tried the Wine wikie = no success
    Which source code tarball to use within OpenSolaris 2009.06?
    I downloaded the latest git sources, and then what?

  2. 2 Colin

    @Jan: The instructions aren’t much different to the usual Linux compile/install procedure and the only step I can see that has been missed out is the part about downloading the git sources (which is actually documented elsewhere on the wiki). The only real difference here is someone has kindly given you details of what to put into a script to setup your env and compile Wine in one go. This actually contrasts with the Linux method of making you guess the environment variables you need and then hunt around to see if someone else hit the issues you may hit, if you do hit any.

    As for the source: you can use either the latest source tarball OR the git sources - the choice is yours. I don’t even know if they differ other than their delivery mechanism.

    … then what?“: well, once you’ve got the source, cd to the source code directory and create a file containing the code depicted in the box under “Building Wine” (eg buildwine.sh), give it execute permissions (chmod +x buildwine.sh) and execute it (./buildwine.sh). You don’t have to use this script, you can just use the normal ./configure; make method as used on Linux, however you face the risk of the configure not finding all the necessary libraries. You also face the risk of having to set LD_LIBRARY_PATH every time you run the app. The scripted compilation env prevents this. You should NEVER need to set LD_LIBRARY_PATH and accordingly the Solaris/OpenSolaris community encourage the method detailed in the script.

    As the wiki says, this should now compile Wine (with a lot of warnings which can be ignored).

    Once it’s finished compiling, install it into a system wide location (/usr/local by default) by running “pfexec make install

    Once installed, run Wine exactly as you do on Linux.

  3. 3 Jan Ekbom

    Wine is getting installed in /usr/local/bin, but I have also .wine catalogue under /home/janne and I have a catalogue with wine-1.1.28 under /home/janne.

    I can start Spotify if I go to /usr/local/bin/winefile and run in terminal, then start spotify.exe within Winefile under C:\Program Files.

    I can’t make a shortcut. I tried
    env WINEPREFIX=”/export/home/janne/.wine/drive_c/Program Files/spotify.exe”
    env WINEPREFIX=”/export/home/janne/.wine” wine “C:\Program Files\spotify.exe”

    If I look for the Spotify icon in the sysem monitor and just holds the cursor gently above the name, it shows:
    /usr/local/lib/../bin/wine C:\Program Files\spotify.exe
    So I tried that command as a shortcut as well, without sucess.

    I’m really glad that you showed me this post, because Spotify is the best thing with music on internet.

    The reason why I started using OpenSolaris, is that I earlier used Fedora from Fedora 9 to Fedora 11, and I really believed in this distro. I also became a Fedora ambassadeur and promoted Fedora amongst friends.

    After some very annoying updating problems, where I got the cursor in the left corner, but couldn’t find any solution to it, I switched to openSUSE hoping that there’s no problems.
    But the problem with them is that the most of them are KDE-lovers and I don’t like KDE, but love Gnome.

    And as I remembered OpenSolaris will only run Gnome on the desktop, which means that everyone that uses it has in someway a more united experience. So from the last edition 2008.11 to 2009.06 a lot of things have happened with OpenSolaris. It’s faster (no slowlaris-experience), and the world wide community is growing.

    I just hope that Larry Ellison from Oracle has become a good friend with Ian Murdock, so that the future of this exciting OS has a bright future.

    That includes bringing some Gnome (and maybe KDE-programs), as well as Windows programs to OpenSolaris.

    On the wishlist is to bring Spotify into Songbird.

  4. 4 Jan Ekbom

    A step closer to the solution may be found here http://blogs.sun.com/yuksel/entry/wine_on_opensolaris

    # cd /usr/bin
    # ln -s /usr/local/bin/wine wine

    Doing that it’s possible to right click on /export/home/user/.wine/drive_c/Program Files/Spotify/spotify.exe

    …and open with Wine Windows Programstarter.

    It’s still tricky to have a starter on the panel.

  5. 5 Colin

    @Jan: Wow, what a history in Linux OSes. Well at the moment OpenSolaris isn’t quite on par with Linux in some aspects, but streets ahead in others. I too hope Oracle doesn’t kill it off, and I don’t think they will.

    Good to hear you’ve getting closer to getting Spotify working as you want. I didn’t need to perform this symlink, though I do have /usr/local/bin in my path already. On my system I automatically ended up with a menu item in Applications -> Wine -> Programs -> Spotify. I’ve also got a desktop icon which, like the menu option, runs the following command:

    env WINEPREFIX=”/export/home/col/.wine” wine “C:\Program Files\Spotify\spotify.exe”

    This works a treat.

    This is the same as your 2nd attempt further up except with the correct path… you missed off the “Spotify” directory.

    HTH

  6. 6 Jan Ekbom

    Thx for replying.

    To get it working, you hav to do this:
    env WINEPREFIX=”/export/home/col/.wine” wine “C:\Program Files\Spotify\spotify.exe”
    has to be changed to
    env WINEPREFIX=”/export/home/col/.wine” wine “C:\Program Files\Spotify\spotify.exe”

    It’s a small difference between ” and ” but it’s important.

    I also found this command working as well:

    /usr/local/bin/wine “C:\Program Files\Spotify\spotify.exe”

    I got it from here: http://opensolaris.org/jive/thread.jspa?threadID=109314&tstart=45

  7. 7 Jan Ekbom

    My history in Linux OSes is deeper:

    1. Running a fake pirate copy of Windows XP for a couple of years, made me tired of all the viruses, trojans, adwares, spywares… So I had to someting.

    2. I read articles about different linuxdistributions and couldn’t believe a free OS was good, so I bought Xandros 3.0 (later upgraded to 3.1) and then I bought the upgrade to Xandros 4.0. But Xandros wasn’t a comfort experience after a while.

    3. So I changed to Debian 3.0, also upgraded to 3.1 later. Debian is easy if you don’t tweak the system, but if you want to have the necessary things like flash, java and so on it can become painful.

    4. So I downloaded the nr one OS on Distrowatch.com, Ubuntu 6.10 and liked it because it was easier to handle. So I followed Ubuntu with 7.04, 7.10 and to 8.04 but there it ended, because it became slower and slower and more bugs made it instable.

    5. So where to go from there? Yes, to Fedora 9, which was a fresh wind, comparing to Ubuntu. Fedora 9 and 10 worked well without any problems (just minor ones). So I became a Fedora ambassador when Fedora 11 came. But with three major updating problems, where I had to reinstall everything. I didn’t do anything special, just an ordinary update the last time I had Fedora on my laptop. I really wanted a solution to it, but many more people was upset byt this: http://forums.fedoraforum.org/showthread.php?t=227728
    I still have a stationary computer with Fedora on, so that I can check out what’s happening. The trick to stay out of trouble is to not update immediately.

    6. So then I decided to try openSUSE, which I already installed on my girlfriends laptop, a Packard Bell R1980D. I tried to install Xubuntu, Puppy linux, Fedora, Limux Mint, PCLinuxOS and Mandriva, one her laptop, but openSUSE was the only OS that ran quite well . So I decided to install openSUSE myself, and rather satisfied in the beginning. But then Gnome, Firefox and their packagemanager Yast had problems.
    And in openSUSE forums they are so fanatic about KDE, that when you ask a question about Gnome, you have very few answers. I don’t like KDE, but I like some KDE programs, like Tellico and Okular. I really hope that Gnome/OpenSolaris come up with a project like Okular http://okular.kde.org

    7. So beacuse that I really like Gnome, my head was spinning round. What linux OS are in favour of Gnome? The answer is Ubuntu, Debian and Fedora, but I was done with them. So I was thinking, what about giving OpenSolaris a new chance. My last experience with OpenSolaris was that it was very slow after just a short while. Could it be different this time? And yes, it seems to be that way. And is it stable? Certainly yes.
    Stability comes first, and first comes also security. Is OpenSolaris secure? Yes, if NSA want’s to join the OpenSolaris community it’s something worth mention: http://blogs.sun.com/jonathan/entry/opensolaris_and_the_nsa_national

    So it’s better to have a stable and secure OS, than a bleeding edge experience on evere new program that comes out. I will give Virtualbox a try to see if I can virtualize the OSes that I want to try. And maybe run Okular in that way.

    Sorry for writing such a long text…but it had to come out.

  8. 8 Colin

    Good to hear you got it working - those damn quotes ;-), and thanks for the detailed explanation of your OS history. It’s very interesting to hear how other people have made it to Solaris/OpenSolaris. Hopefully one day it’ll be people’s first choice, but that’ll take time.

  9. 9 Al

    Ok almost, but I dont see how you got sound support work without forcing OSS sound driver.

    Walkthrough:

    1. download wine and extract
    2. cd to directory its extracted to
    3. open a text file and paste in:

    #!/bin/sh
    CFLAGS=”-g -Os -march=i586 -mtune=prescott -pipe -fno-omit-frame-pointer -I/usr/X11/include -I/usr/gnu/include -I/usr/sfw/include -Xlinker -i”
    CC=”/usr/bin/gcc”
    LDFLAGS=”-L/usr/gnu/lib -R/usr/gnu/lib -L/usr/X11/lib -R/usr/X11/lib -L/usr/sfw/lib -R/usr/sfw/lib”
    LD=”/usr/ccs/bin/ld”
    PATH=”/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/ccs/bin:/usr/sfw/bin:$PATH”
    export CFLAGS
    export LDFLAGS
    export CPPFLAGS
    export CC
    export LD
    export PATH
    ./configure –prefix=/opt/wine –with-oss –without-esd
    make depend
    make

    4. Save as buildwine,sh
    5. make it executable # chmod a+x buildwine.sh
    6 ./buildwine.sh

    Works.
    Yeah its the script from the wiki but without the ‘–with-oss’ you’ll have no sound support. did it work for you without?

  10. 10 Colin

    @Al : thanks for the detailed walkthrough. I don’t recall needing to use the ‘–with-oss’ flag when compiling wine. I do know that a lot of things, including sound didn’t work until I updated to snv_118, but I can’t remember why. Sorry.

    Your helpful walkthrough should hopefully help others who stumble upon this post in the future. Thanks.

Speak Your Mind    cocomment icon