Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS working docker-tizonia #8

Merged
merged 9 commits into from Mar 12, 2020
Merged

Conversation

thed24
Copy link
Contributor

@thed24 thed24 commented Sep 19, 2019

Requires pulse audio to be installed via homebrew, and the following lines in /usr/local/Cellar/pulseaudio/13.0/etc/pulse/default.pa to be uncommented:
load-module module-esound-protocol-tcp
load-module module-native-protocol-tcp

Might've missed a step, but from my recollection my docker-tizonia file in-conjunction with these steps should allow MacOSX support, works on my device :)

Requires pulse audio to be installed via homebrew, and the following lines in /usr/local/Cellar/pulseaudio/13.0/etc/pulse/default.pa to be uncommented:
load-module module-esound-protocol-tcp
load-module module-native-protocol-tcp
README.md Outdated
@@ -4,6 +4,30 @@

Containerized [**Tizonia**](http://www.tizonia.org/) cloud music player that uses the host's sound system.

## Mac Support
Copy link

@victor-ca victor-ca Dec 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Howdy
thanks for trying this out on mac; i can confirm that it works
i assembled the following script so we would automate these steps; hope it eases someone else's setup

#get pulse audio
brew install pulseaudio

#uncomment load-module module-esound-protocol-tcp and load-module  module-native-protocol-tcp
sed -i.bak -e 's/^#load-module module-esound-protocol-tcp/load-module module-esound-protocol-tcp/g' -e 's/^#load-module module-native-protocol-tcp/load-module module-native-protocol-tcp/g'  '/usr/local/Cellar/pulseaudio/13.0/etc/pulse/default.pa'

#list sinks with description
pactl list sinks | egrep '(^\s+(Name|Description).*$)|^Sink.*$'

echo 'Pick an output device enter the numer ( enter a number between 1 and' $(pactl list sinks short | wc -l) ')'
read outputChannel

pacmd set-default-sink $outputChannel
pulseaudio --load=module-native-protocol-tcp --exit-idle-time=-1 --daemon
cp ./docker-tizonia /usr/local/bin  

./docker-tizonia

chmod a+wrx $HOME/.config/tizonia

@matthewarmand
Copy link
Member

matthewarmand commented Mar 6, 2020

This PR probably is more likely to be merged if the docker-tizonia changes are done a bit differently so that the script can recognize whether its running under Mac or Linux and run the correct docker run command accordingly.

For example, potential new docker-tizonia:

#!/bin/bash -e

USER_ID=$(id -u);
GROUP_ID=$(id -g);

if uname -s | grep -iq "Darwin" ; then
  pulse_server=docker.for.mac.localhost
  runtime_dir="$HOME"
else
  pulse_server=unix:"${XDG_RUNTIME_DIR}/pulse/native"
  runtime_dir="${XDG_RUNTIME_DIR}/pulse"
fi

docker run -it --rm \
    -e PULSE_SERVER="$pulse_server" \
    --volume="$runtime_dir":"$runtime_dir" \
    --volume="${HOME}/.config/tizonia":/home/tizonia/.config/tizonia \
    --volume="${HOME}/.config/pulse/cookie":/home/tizonia/.config/pulse/cookie \
    --name tizonia \
    tizonia/docker-tizonia "$@";

matthewarmand and others added 4 commits March 11, 2020 17:03
- Re-organize the README a bit and pretty up the markdown a tad
- Make the docker-tizonia script smart enough to recognize whether its running under Mac or not and behave accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants