BluOS controller app on Linux

Answered

Comments

160 comments

  • Official comment
    Tony W.
    Product Support Manager

    Thanks for the feedback Rand.

    I have passed it along for future consideration...

  • Fabrice A

    I finally setup a GitLab CI pipeline which automatically generates an AppImage for linux as described in the issue above. 

    The project is available at https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux

    To reproduce a build locally, follow the app-image build job in [1].
    Or you can download the AppImage built by the pipeline [2].

    [1] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/blob/main/.gitlab-ci.yml#L14
    [2] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/packages

    5
  • David S

    While I understand there would be some work involved with adding Linux support, being that the BluOS controller app is just an Electron app, It's somewhat trivial to enable support for Linux.

    For those that are interested and don't mind "Experimental" software, I have patched and re-packaged version 3.8.2 for Linux as a Snap and an AppImage. One of these should work on pretty much any Linux distro out there with a GUI. Keep in mind I did the bare minimum to get this working and while I have tested a lot of the functionality, this should definitely be treated as experimental software. I would NOT do something like a firmware update with this. 

    If you have Snap:

    1. Download the snap from here: https://drive.google.com/open?id=1-6pIG6frwJHXkHU_cGUWSij5H6dK1tUM
    2. Run: snap install --dangerous BluOS_3.8.2_amd64.snap

    If you don't have Snap:

    1. Download the AppImage from here: https://drive.google.com/open?id=1V75N_wj4bKf5a9gjmnXGDfmtDBrTMvRQ
    2. Run: chmod +x 'BluOS Controller-3.8.2.AppImage'
    3. Run: ./'BluOS Controller-3.8.2.AppImage'

    I have tested both and can connect to my Flex 2i and Pulse 2i. I also added the ability to detect Spotify however ONLY if used from a snap.

    4
  • Fabrice A

    I pushed a new version for v3.20.6. To reproduce a build locally, follow the app-image build job in [1].
    Or you can download the AppImage built by the pipeline [2].

    [1] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/blob/main/.gitlab-ci.yml#L14
    [2] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/packages

    4
  • Fabrice A

    Just pushed a new version for v3.20.1. I could not find the release notes explaining the changes since v3.20.0, but I guess it is related to [3].  

    To reproduce a build locally, follow the app-image build job in [1].
    Or you can download the AppImage built by the pipeline [2].

    [1] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/blob/main/.gitlab-ci.yml#L14
    [2] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/packages
    [3] https://support1.bluesound.com/hc/en-us/community/posts/9370049558935-BlueSound-Windows-App-version-3-20-0-issue

    3
  • Fabrice A

    I just pushed the patch for the new version v4.2.0 at the usual place.

    3
  • Antoine Gautier

    Same need here for a Linux port of the app.

    Or a cross-platform browser based version.

    2
  • Cedmue

    +1 for linux supporting app or cross-platform browser based version

    2
  • David S

    Looks like 3.8.3 came out. The "new version" dialog is annoying every time I launch it so I applied the same patch to this latest version:

     

    If you have Snap:

    1. Download the snap from here: https://drive.google.com/file/d/1GHYg_yDNGjJ8gOqq41eNQMWutJnZrF-K/view?usp=sharing
    2. Run: snap install --dangerous BluOS_3.8.3_amd64.snap

    If you don't have Snap:

    1. Download the AppImage from here: https://drive.google.com/file/d/1e14cWdnm4ftSs-wqc8NFXqKArJUX23bH/view?usp=sharing
    2. Run: chmod +x 'BluOS Controller-3.8.3.AppImage'
    3. Run: ./'BluOS Controller-3.8.3.AppImage'
    2
  • Andrés Martinelli

    Its a shame Bluesound does not do the image for Linux. It would be piece of cake for them.

    2
  • Holger Dehnhardt

    Thanks to David for providing the snap image. It simply wors!

    @blusound: I really would appreciate a linux version from you. AFAIK you use linux / open source software in your controllers. Providing a linux version in my opinion is the least you can do to give something back to the community!

    2
  • David S

    Hey everyone,

    My apologies for the delay in getting the 3.12 version up, I have been busy with work and forgot to check back on this forum. I checked today and 3.12.1 is released so I have patched and built this version as well:

    If you have Snap:

    1. Download the snap from here: https://drive.google.com/file/d/182hEaOx81wkvvvdwyVuoI8EXXnIxL2Pv/view?usp=sharing
    2. Run: snap install --dangerous BluOS_3.12.1_amd64.snap

    If you don't have Snap:

    1. Download the AppImage from here: https://drive.google.com/file/d/1QhvbrHo7vwHNlpCAHRntrm2ZsvHpMshJ/view?usp=sharing
    2. Run: chmod +x 'BluOS Controller-3.12.1.AppImage'
    3. Run: ./'BluOS Controller-3.12.1.AppImage'
    2
  • David S

    Version 3.12.3 came out:

     

    If you have Snap:

    1. Download the snap from here: https://drive.google.com/file/d/1_bkcjIG_HU5SjtZOcegB2tVryIVApkMd/view?usp=sharing
    2. Run: snap install --dangerous BluOS_3.12.3_amd64.snap

    If you don't have Snap:

    1. Download the AppImage from here: https://drive.google.com/file/d/1H2MTWObfGnozetKjdwjOl2cqcvbuKxoq/view?usp=sharing
    2. Run: chmod +x 'BluOS Controller-3.13.3.AppImage'
    3. Run: ./'BluOS Controller-3.12.3.AppImage'
    2
  • Genesio Di Sabatino

    @TONY W. - PRODUCT SUPPORT MANAGER

    is there any possibility of having an official client for linux or, better, a web interface?

    2
  • Fabrice A

    I pushed a new version for v3.20.2. I could not find the release notes explaining the changes since v3.20.1

    Since last (Linux) version, here is what I changed :
    - Add BluOS icon to AppImage (https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/issues/1)
    - 'Upgrade Check - Controller' works now (https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/issues/2)

    To reproduce a build locally, follow the app-image build job in [1].
    Or you can download the AppImage built by the pipeline [2].

    [1] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/blob/main/.gitlab-ci.yml#L14
    [2] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/packages

    2
  • Ben Simons

    Does Bluesound read this forum?

    Could someone from Bluesound explain why this work-around for linux has been going on for 3 years?

    Why still no linux client on https://bluos.net/downloads/  

    I'd like to know. It would help me understand the culture at Bluesound.

    (edit: thank-you Fabrice A)

    b.

    2
  • Fabrice A

    Hi, BluOS published a new version v4.0.2 of the controller, for which I just pushed the patch. To reproduce a build locally, follow the steps in the app-image build job [1].
    Or you can download the AppImage built by the pipeline [2].

    [1] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/blob/main/.gitlab-ci.yml#L15
    [2] https://gitlab.com/fabrice.aeschbacher/bluos-controller-linux/-/packages

    2
  • Mark Schlegel

    I'd like to see this too.  I think the Bluos app for windows might just work on linux using the wine support but I'm not sure I'd want to buy a node 2i, get it home and find it doesn't work.

    Another option would be for the node 2i to have a web interface then anything with a web browser would just work.  I'm not sure why so few network players go that route, it seems like a no-brainer.

     

     

     

    1
  • Clément Martin

    Same here, all computers run Linux at home, being limited to the android app is painful..

    1
  • David S

    Well, it's definitely possible ;) 

    1
  • David S

    @Simon Blandford Glad it worked for you and happy to help!

    1
  • David S

    Andrés Martinelli you are very much on the right track however just re-compiling it for Linux isn't enough to get it to work. There are 2 "patches" that I have to do with every version to get it to run in Linux. I'm hoping that one-day T. Williamson or someone from BlueSound will make these changes so that I/we don't have to decompile, patch, and re-compile their app every time a new version comes out. Especially knowing now that several people have been using my patched version without issues.

    Here is what is required to get it to work when built on Linux (all code lines referenced before are based on the 3.10 decompiled version)

    1. Spotify Detection: As mentioned in my first post here, I added code (after decompiling) to detect if Spotify is found on the system however for simplicity, I only check for the Snap installation. Some more work would have to be done to detect Spotify installed by other means (deb pkg, etc) To do this, the method that checks for Spotify in /app/www/js/electron.js line 979 needs one additional condition checked. I added: if(platform=='lin64') { path = "/snap/bin/spotify" } at line 995 after the windows condition
    2. Check for new versions: This one is much trickier as Bluesound has minified the app.js file which makes it much more confusing to work through. When launching the Electron app locally (electron .) you have about 1 or 2 seconds to hit CTRL + Shift + I to get the developer tools up. Doing that will show that it is hanging trying to check for a new version of the application on BlueSound's website since the platform was not detected. To address this, you have to add a couple of pieces:
    • Search for:
      f7.checkAppUpdate=function(e){var t;"macOS"==f7.appInfo.platform&&(t="http://upgrade.nadelectronics.com/desktop_app/osx/version.xml?currentVersion"),"Windows"==f7.appInfo.platform&&(t="http://upgrade.nadelectronics.com/desktop_app/windows/version.xml?currentVersion")

      Replace with:

      f7.checkAppUpdate=function(e){var t;"linux" == f7.appInfo.platform && (t = "http://upgrade.nadelectronics.com/desktop_app/osx/version.xml?currentVersion"), "macOS"==f7.appInfo.platform&&(t="http://upgrade.nadelectronics.com/desktop_app/osx/version.xml?currentVersion"),"Windows"==f7.appInfo.platform&&(t="http://upgrade.nadelectronics.com/desktop_app/windows/version.xml?currentVersion")

     

    • Search for:
      .autoupgrade,queue:{loading:!1,pagesize:200,total:0}}

      Replace with:

      .autoupgrade,queue:{loading:!1,pagesize:200,total:0},platform: "linux"}

       

    Those two changes are the only thing required to get it to launch and run on Linux. You may notice that the second code change locks it to Linux. Since I use electron-builder -linux to generate the snap and AppImage, this is fine however if Bluesound wanted to officially support Linux, they would just need to add platform detection to the app.js and provide a URL to their AppImage/Snap for checking versions. I would be more than happy to contribute this T. Williamson :)

    1
  • David S

    Alright, everyone. Took a couple of hours and got it working. Feel free to inspect the (rushed and ugly) code if you want to see what it's doing, or just use the CLI tool already built for you in the GitHub releases section. The tool will automatically pull the latest version from Bluesound's Download page, extract it, unpack it, patch it, and build it for Linux. You do not have to define which version you want, it will always grab the latest version on their website. Whenever you get the "New Version available" message, just re-run this bs-patch tool and it will build it fresh for you :) I'll also try to keep up with sharing the built files here, but this should allow everyone to have the latest without having to wait for me.

    Please note the Prerequisite section on the GitHub Readme. You MUST have NodeJS installed already and then configure the tool with the location of your NodeJS bin folder. I'll eventually try to autodetect this, but having it specified was much easier.

    The GitHub repository for the tool can be found here: https://github.com/dave92082/bs-patch

    If you don't care about the code and just want to patch and build the BluOS Controller for yourself, head over to the releases page here: https://github.com/dave92082/bs-patch/releases and download the latest .tar.gz of the tool.

     

    I have included instructions in the README however I will include them here as well:

    1. Download the release
    2. Extract the bs-patch binary
    3. Execute which npm
    4. Copy the path to the bin folder
    5. Create a file named config.yaml in the same folder as the bs-patch binary and place the config entry `nodeBinPath: <your node bin path>`
    6. Execute ./bs-patch
    7. If all goes well, you should now have a folder named dist in the same location that you executed the bs-patch utility. This folder will contain the Snap and the AppImage
    8. (Hopefully) Enjoy your new BluOS Controller app on Linux
    1
  • David S

    Francesco Frassinelli, I always get jealous when I see people that are good at bash :) You have all the steps correct, however, you forgot to actually patch the application for Linux support which is why you are getting stuck on "looking for players..." Under the hood, they are checking for Spotify and then checking for updates, both of which will hang the electron on Linux. 

     

    See the following three patches (string replacements). If you add them to your script it should work:

    https://github.com/dave92082/bs-patch/blob/5faae18d4d77578a6e68685664f92a7c61906ad7/main.go#L57

    https://github.com/dave92082/bs-patch/blob/5faae18d4d77578a6e68685664f92a7c61906ad7/main.go#L68

    https://github.com/dave92082/bs-patch/blob/5faae18d4d77578a6e68685664f92a7c61906ad7/main.go#L73

     

    That function call is <file>, <original>, <replacement>

    1
  • David S

    Version 3.14.0 came out:

     

    If you have Snap:

    1. Download the snap from here: https://drive.google.com/file/d/1sgPFoijWkSrKQ0zCuFUdxx2dNjsWlPP_/view?usp=sharing
    2. Run: snap install --dangerous BluOS_3.14.0_amd64.snap

    If you don't have Snap:

    1. Download the AppImage from here: https://drive.google.com/file/d/1yhiDGWGLxIinP_xs0Dj_vFgndAu6Lztq/view?usp=sharing
    2. Run: chmod +x 'BluOS Controller-3.14.0.AppImage'
    3. Run: ./'BluOS Controller-3.14.0.AppImage'
    1
  • Sukant Hajra

    Yet Another Packaging, This Time With Nix

    Hi everyone.  First off, huge thanks to David and Francesco for the automation via open source projects.  I was able to follow along easily.

    I personally run NixOS on my main computers, which is a little different.  So I did my own packaging of the BluOS controller targeting the Nix package manager:  https://github.com/shajra/bluos-nix.

    This does require installing the Nix package manager on your Linux system, Nix will install on most Linux distributions without conflicting with your native package manager (APT, Yum, etc.).  I've tried to fully document the steps required on the repository's README file.

    I'm committed to keeping this repository up-to-date, because I don't see myself getting rid of my BluOS streamers any time soon, nor do I see myself getting off NixOS.

    Also, I did a tiny, tiny tweak beyond what the prior patches have been done to date.  Specifically, I auto-hid the menu.  It was bothering me that the menu was stuck taking up screen real estate.  But that's a very simple change that I'm sure David and Francesco can roll into their projects if they are so inclined.

    Anyway, I hope this helps the community.

    1
  • Mitch

    @edward, i just tried with fresh bottles installation but the latest Windows BS (BluOS-Controller-Setup-3.16.2.exe) is not launching. Are there any dependencies to enable or other settings?

    [edit] I got it working, had to create a custom bottle and use 32bit architecture. [/edit]

     

    1
  • Bersa

    Hey David S,

    any chance to get the BluOS Controller AppImage updated to 3.18.7 ?

    Your patched version is what has worked best for me on Debian.

    Thanks in advance.

    BR Bersa

    1
  • Fabrice A

    It's a rainy Sunday afternoon, and I tried to update my old 3.16.0 with the current 3.18.4. [1]

    For those who are interested, I can confirm that the method I described in [2] still works fine with 3.18.4.

    [1] https://bluos.net/wp-content/uploads/2022/08/BluOS-Controller-Setup-3.18.4.exe
    [2] https://github.com/frafra/bs-bashpatch/issues/2

    1
  • Nicolas

    I was not involved.
    Kudos to David, Fabrice and all the other people involved.

    1

Please sign in to leave a comment.