Page 1 of 1

How to install a Spotify client on SqPOS

Posted: Sat Aug 29, 2015 5:50 pm
by papaiannis
Please find below the instructions to install a Spotify client on roobarb's SqueezePlay OS.

0) First open a remote SSH session

1) Install the (missing) required packages:
sudo apt-get install xdg-utils curl libxss1

2) In your browser open the page at the following URL:
http://repository-origin.spotify.com/po ... fy-client/

3) In the just-opened page copy the download URL of the spotify client package for i386.

4) Download the spotify package from the just-copied URL. The command line should look like the following:
sudo wget http://repository-origin.spotify.com/po ... 3_i386.deb

5) Install the just downloaded package:
sudo dpkg -i spotify-client*i386.deb

6) If any errors occurr during installation due to dependencies, try the following:
sudo apt-get -f install

At this point you should have a working spotify client, which can be simply launched with the command:
spotify

Note this client has nothing to do with the Spotify app available in SqueezePlay and is independent from the Logitech Media Server and from the Triode Spotify plugin as well.

Please also note that this command can't be launched from the remote ssh session.
In my first attempt, I edited the .xinitrc file under the home of the user joggler, and inserted the command spotify just before the lines launching squeezeplay. However, this cannot be a definitive solution, because squeezeplay cannot be executed any more.
Now I'm thinking of a solution to switch between SqueezePlay and Spotify.
Any suggestion is welcome.

Alekos

Re: How to install a Spotify client on SqPOS

Posted: Sun Aug 30, 2015 3:17 pm
by papaiannis
My "dirty" solution to toggle between SqueezePlay and Spotify:

0) Open a SSH session

1) In the home create and edit a new file named "toggle"
vi toggle

2) Put the following lines in this new file, then save an exit:

if [ -f ./sq ]; then
mv ./sq ./sp
killall -v squeezeplay.sh
elif [ -f ./sp ]; then
mv ./sp ./sq
killall -v spotify
else
echo dummy > ./sq
fi

3) Add the execute privilege to the newly created file:
chmod a+x toggle

4) Edit the file .xinitrc to modify its content as follows (please save a copy of the original file) :

export DISPLAY=:0.0
setterm -blank 0 -powersave off -powerdown 0
xset dpms 0 0 0 s off
if [ -f ./sq ]; then
/opt/squeezeplay/bin/squeezeplay.sh
elif [ -f ./sp ]; then
spotify
else
xterm
fi


Now you can switch back and forth between the two application by simply sending the command:
./toggle

I usually remotely control my Joggler with OrangeSqueeze (or with the Logitech app) from my android tablet. Therefore I wanted to switch between apps from my tablet in a simple way. This can be done with the (free) "Raspberry SSH Lite" app. This app allows you to configure a button that opens a SSH session and launches the toggle command.

Comments and ideas are welcome.

Alekos

Re: How to install a Spotify client on SqPOS

Posted: Fri Sep 04, 2015 12:15 pm
by Man in a van
papaiannis wrote:Please find below the instructions to install a Spotify client on roobarb's SqueezePlay OS.

0) First open a remote SSH session

1) Install the (missing) required packages:
sudo apt-get install xgd-utils curl libxss1

Alekos

Alekos, thought I would try this today (or at least start), but I think there is a typo with "xgd-utils".

Anyway, with or without the typo, I have no luck

Code: Select all

Package xdg-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libxss1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'xdg-utils' has no installation candidate
E: Package 'curl' has no installation candidate
E: Package 'libxss1' has no installation candidate
joggler@openframe:~$
Any suggestions?

Ronnie.

Re: How to install a Spotify client on SqPOS

Posted: Fri Sep 04, 2015 4:22 pm
by papaiannis
Hi Ronnie,
there is a typo in my post, sorry (now corrected, thank you for having noted). Please read xdg-utils instead of xgd-utils.

Please be sure to have done the following operations before installing packages:
1) In the file /etc/apt/sources.list replace http://ubuntu.datahop.net/ubuntu/ with http://archive.ubuntu.com/ubuntu/ (eveywhere in that file)
2) Update apt:
sudo apt-get update

Then try again the procedure described in my post (that worked on my Joggler with latest SqPOS).

In case of errors try to install the spotify package first:
sudo dpkg -i spotify*.deb
sudo apt-get -f install
sudo apt-get install xdg-utils curl libxss1

Finally, just to be sure:
sudo dpkg --configure --pending

Hope this helps.

Alekos

Re: How to install a Spotify client on SqPOS

Posted: Wed Sep 09, 2015 10:40 pm
by Man in a van
papaiannis wrote:My "dirty" solution to toggle between SqueezePlay and Spotify:

0) Open a SSH session

1) In the home create and edit a new file named "toggle"
vi toggle

Alekos,

I have got as far as this.

Image


I would be grateful if you could expand your instructions a little please.

In the above quote, do you mean the home folder or root?

When I SSH into the Joggler as root do I just type vi toggle?

I have done this and copied the text but don't know the save and exit commands.

Thanks

Ronnie.

Re: How to install a Spotify client on SqPOS

Posted: Thu Sep 10, 2015 7:22 pm
by papaiannis
Hi Ronnie,
actually installing the spotify client requires a little knowledge of linux/unix and of its shell.

Usually, when you establish the SSH session (username=joggler, password=joggler), you are at the home of the user joggler, and it is there that you must operate. Just to be sure, before starting operations, send the command:
cd /home/joggler

vi is the classic text editor you can find in any unix system. It is powerful yet tricky to use. If you do not already know it, you would better use the much simpler nano editor (by typing F1 you get an help screen). Therefore to create and edit the file, you can use the following:
nano toggle

However your screenshot is that of a remote explorer, not the one of a terminal, which is what you need. I would suggest to use putty (http://www.chiark.greenend.org.uk/~sgta ... nload.html) instead of WinSCP.

Hope this helps.
Alekos

Re: How to install a Spotify client on SqPOS

Posted: Thu Sep 10, 2015 9:33 pm
by Man in a van
papaiannis wrote:Hi Ronnie,
actually installing the spotify client requires a little knowledge of linux/unix and of its shell.

Usually, when you establish the SSH session (username=joggler, password=joggler), you are at the home of the user joggler, and it is there that you must operate. Just to be sure, before starting operations, send the command:
cd /home/joggler

vi is the classic text editor you can find in any unix system. It is powerful yet tricky to use. If you do not already know it, you would better use the much simpler nano editor (by typing F1 you get an help screen). Therefore to create and edit the file, you can use the following:
nano toggle

However your screenshot is that of a remote explorer, not the one of a terminal, which is what you need. I would suggest to use putty (http://www.chiark.greenend.org.uk/~sgta ... nload.html) instead of WinSCP.

Hope this helps.
Alekos

Thanks for the info Alekos.

I was using Putty, I just included the screen shot to show how far I had progressed.

I have used 'nano' a little before, so I know how to save and exit.

Finished it off tonight, just need to use a hub to connect a keyboard and mouse to log in to Spotify.

I think I might set up a Joggler just for Spotify, use the internal SqPOS and an external usb DAC (maybe with the EDO plugin).

Thanks for developing the idea and also for your patience and help in getting me 'there' ;)

atb

Ronnie.

Re: How to install a Spotify client on SqPOS

Posted: Fri Sep 11, 2015 2:37 pm
by gegs
papaiannis wrote:... However your screenshot is that of a remote explorer, not the one of a terminal, which is what you need. I would suggest to use putty (http://www.chiark.greenend.org.uk/~sgta ... nload.html) instead of WinSCP.
You can open a terminal session in WinSCP. There is a terminal icon on the toolbar or you can access it by typing Ctrl+T.

Having said that, I still use PuTTY.

Re: How to install a Spotify client on SqPOS

Posted: Sat Sep 12, 2015 11:34 am
by papaiannis
Please note that it is difficult to work with the spotify client on the joggler because the screen is not meant for small touch screens.
However the spotify client on the joggler can be remotely controlled with a spotify client running on a smartphone, tablet or pc. All you have to do is to click on "Spotify Connect" and then select the name of the remote client you want to control. The default name for the joggler is openframe.

Alekos

Re: How to install a Spotify client on SqPOS

Posted: Sun Mar 06, 2016 11:00 am
by SteveC
Thanks for this - works well :) Any way of getting an on screen keyboard though?

Re: How to install a Spotify client on SqPOS

Posted: Sun Mar 13, 2016 5:32 pm
by papaiannis
Hi SteveC,
I have tried with no success. Sorry.
An USB keyboard will work, though.

Re: How to install a Spotify client on SqPOS

Posted: Mon May 02, 2016 4:53 pm
by chris
Have you tried nuvola player? https://tiliado.eu/nuvolaplayer/

It's on my list of things to do that I don't have time to do :lol:

Re: How to install a Spotify client on SqPOS

Posted: Sat May 14, 2016 3:05 pm
by papaiannis
chris wrote:Have you tried nuvola player? https://tiliado.eu/nuvolaplayer/

It's on my list of things to do that I don't have time to do :lol:
Hi chris,
no I haven't tryed it yet, but what I have read on the nuvola web site sounds good!
I will try in the next days and will report to the forum.
Thank you!

Re: How to install a Spotify client on SqPOS

Posted: Wed May 18, 2016 2:28 pm
by monkums
Working through the step when I install I get dependency problems. Specifically:

libgconf-2-4
libgtk2.0-0
libnss3
libudev1

Any idea how to add these?

When I run ./toggle i get:

Code: Select all

spotify: no process found

Re: How to install a Spotify client on SqPOS

Posted: Sun Jun 05, 2016 8:07 pm
by papaiannis
Hi monkums,
please try the procedure described in my post Fri Sep 04, 2015 4:22 pm.
Hope this helps.

Re: How to install a Spotify client on SqPOS

Posted: Thu Jun 30, 2016 8:56 pm
by monkums
When I try a run the spotify command i get:

(spotify:7218): Gtk-WARNING **: cannot open display: