Running textbased spotify client with a spotify daemon for native playback - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +--- Thread: Running textbased spotify client with a spotify daemon for native playback (/showthread.php?tid=13081) |
Running textbased spotify client with a spotify daemon for native playback - yeold - 02-12-2021 There's a text based spotify client that runs in text mode called spotify-tui, which I thought looked nice, so I took some time to make it run on the pinephone. Here it is running in the st terminal in sxmo Prereqs: You need the following packages installed (there might be some missing from this list though)
You also need to add the cargo bin dir to path, easiest way is to add this line to ~/.profile Code: export PATH=$PATH:~/.cargo/bin Code: source ~/.profile Code: cargo install spotify-tui -j4 And this operation might take an hour on the phone (I'm trying to figure out cross-compilation to make it faster, but openssl is giving me a hard time). Now we need to temporarily change the default browers to firefox (or chromium), in order to open up the link to authenticate the spotify API. You can do this in sxmo by setting the $BROWSER flag by setting Code: export BROWSER=firefox or by just passing it in a console you're running in your phones GUI (not in a ssh shell since it might not load the web browser properly) After that just follow this guide: https://github.com/Rigellute/spotify-tui#connecting-to-spotifys-api You can now run the client with the command Code: spt This will open the API authentication link in Firefox, login and confirm the authentication, and then close Firefox. Now you can control your Spotify clients from your text interface. But for native playback we need to have spotifyd installed and running as a daemon, install should be as easy as installing spotify-tui: Code: cargo install spotifyd -j4 After the install, try running it with: Code: spotifyd -u <spotify username> -p <spotify password> Make sure that your phone is set to play from the speakers (or headphones, if you have those plugged in) In spotify-tui you might need to set which client you want to do the playback by pressing Code: d Spotifyd has systemd scripts to turn it into a service, you can convert that script into an openrc service by using initify: https://github.com/goose121/initify and placing it in /etc/init.d/ Some extra tweaks needs to be done here to make it run properly which I haven't done yet, it crashes on boot and needs to be restarted (probably need to add network prereq in rc script) |