Difference between revisions of "SpotCommander"

From ArchWiki
Jump to: navigation, search
Line 85: Line 85:
  
 
* Go into the web server root directory:
 
* Go into the web server root directory:
 +
 
   $ cd /srv/http/
 
   $ cd /srv/http/
  
 
* Download the tar.bz2 file:
 
* Download the tar.bz2 file:
 +
 
   $ wget -N http://www.olejon.net/code/spotcommander/files/spotcommander-8.7.tar.bz2
 
   $ wget -N http://www.olejon.net/code/spotcommander/files/spotcommander-8.7.tar.bz2
  
* Extract and remove it:
+
* Extract the tar.bz2 file:
   $ tar -jxvf spotcommander-8.7.tar.bz2 && rm spotcommander-8.7.tar.bz2
+
 
 +
   $ tar -jxvf spotcommander-8.7.tar.bz2
 +
 
 +
* Remove the tar.bz2 file:
 +
 
 +
  $ rm spotcommander-8.7.tar.bz2
  
 
* Go into the spotcommander folder:
 
* Go into the spotcommander folder:
 +
 
   $ cd spotcommander
 
   $ cd spotcommander
  
* Set the correct file permissions:
+
* Set the correct permissions:
  $ chmod 755 . && chmod 755 bin/* && chmod 777 cache/* && chmod -R 777 db/ && chmod 666 run/*
+
  
* Create a symlink, to be able to execute the SpotCommander [[daemon]] easily:
+
  $ chmod 755 .
   $ ln -fs /srv/http/spotcommander/bin/spotcommander /usr/local/bin/spotcommander
+
  $ chmod 755 bin/*
 +
  $ chmod 777 cache/*
 +
  $ chmod -R 777 db/
 +
  $ chmod 666 run/*
 +
 
 +
* Create symlink:
 +
 
 +
   $ ln -fs $(pwd)/bin/spotcommander /usr/local/bin/spotcommander
 +
 
 +
* You must now start the daemon. Open up a desktop terminal (not SSH) as the desktop user running Spotify (not root), and run this command:
  
* Start the daemon. Run this command in a desktop terminal as the desktop user running Spotify:
 
 
   $ spotcommander start
 
   $ spotcommander start
  
* If you have followed the instructions carefully, you should be able to open SpotCommander under ''http://localhost/spotcommander'' now.
+
By running it in the terminal the first time, you will be able to see if there are any errors.
  
=== Add daemon to startup (optional) ===
+
* You should add the daemon to your startup applications. As root, create the file /etc/xdg/autostart/spotcommander.desktop and add:
Create the file {{ic|/etc/xdg/autostart/spotcommander.desktop}} and add:
+
  
 
  [Desktop Entry]
 
  [Desktop Entry]
Line 115: Line 129:
 
  Exec=spotcommander start
 
  Exec=spotcommander start
  
=== Configuration (optional) ===
+
=== Try it ===
  
It is not necessary to configure anything, but in the config.php file there are some options you can change.
+
* You should now be able to control Spotify by going to:
  
== Usage ==
+
  http://your.computers.ip.address.or.hostname/spotcommander
After you have set up the server successfully, every device in your local network should be able to access SpotCommander under the ip adress of the server. For example, if the server would have the ip 192.168.0.24:
+
  
  http://192.168.0.24/spotcommander/
+
* Android users should download the Android app, which can find your computer automatically
  
To find out your current ip adress, execute the following:
+
* To find out your current IP address, run this command:
  
   ip addr
+
   $ ip addr
  
If you cannot access the server, make sure, that apache is accessible by other hosts in the LAN. Check in {{ic|/etc/httpd/conf/httpd.conf}} to what hosts it is listening to. The line should look like this:
+
=== Configuration ===
  
  Listen 80
+
It is not necessary to configure anything, but in the config.php file there are some options you can change.
  
 
== See also ==
 
== See also ==
  
* [http://code.google.com/p/spotcommander/ Official web site with more detailed information]
+
* [http://code.google.com/p/spotcommander/ Official website]

Revision as of 19:55, 27 May 2013

SpotCommander is a remote control for Spotify for Linux, optimized for mobile devices. It's based on HTML5 & PHP, works on any device with a modern browser, and it's free and open source.

SpotCommander is the most elegant, intuitive, feature-rich & universal remote control for Spotify, exclusive for Linux users!

Features

  • Reponsive & intuitive user interface
  • Launch/quit Spotify
  • Now playing
  • Control playback
  • Adjust volume
  • Toggle shuffle & repeat
  • Playlists
  • Starred items
  • Search
  • Browse playlists
  • Browse albums
  • Recently played
  • Queue
  • Lyrics
  • Start track radio
  • Play artists
  • Top lists
  • Popular playlists
  • New albums
  • Genres
  • Share to social networks
  • Gestures
  • Keyboard shortcuts
  • Android app
  • Fullscreen on iOS
  • Automatic update checking

Installation

Note: This must be done as root.

Install & configure required packages

  • Install required packages:
 $ pacman -S apache php php-apache php-sqlite qt4 inotify-tools xautomation wmctrl wget
  • Enable PHP as described in the LAMP article
  • Enable required PHP modules. In /etc/php/php.ini, uncomment these:
 extension=curl.so
 ...
 extension=pdo_sqlite.so
 ...
 extension=posix.so
 ...
 extension=sqlite3.so
  • As root, create the file /etc/httpd/conf/httpd.conf and add:
AddType text/cache-manifest .appcache

<Directory "/srv/http/spotcommander">
AllowOverride All
ExpiresActive On
ExpiresByType text/cache-manifest "access plus 0 seconds"
</Directory>
Note: If you are going to install in another directory than /srv/http/spotcommander, make sure you use the correct directory above.
  • Make Apache start when system boots:
 $ systemctl enable httpd.service

Give Apache access to /tmp

  • As root, open /usr/lib/systemd/system/httpd.service
  • Set:
 PrivateTmp=false

Reboot

  • Some of the actions above requires a reboot to take effect, so you must reboot your system before continuing

Install SpotCommander

  • Go into the web server root directory:
 $ cd /srv/http/
  • Download the tar.bz2 file:
 $ wget -N http://www.olejon.net/code/spotcommander/files/spotcommander-8.7.tar.bz2
  • Extract the tar.bz2 file:
 $ tar -jxvf spotcommander-8.7.tar.bz2
  • Remove the tar.bz2 file:
 $ rm spotcommander-8.7.tar.bz2
  • Go into the spotcommander folder:
 $ cd spotcommander
  • Set the correct permissions:
 $ chmod 755 .
 $ chmod 755 bin/*
 $ chmod 777 cache/*
 $ chmod -R 777 db/
 $ chmod 666 run/*
  • Create symlink:
 $ ln -fs $(pwd)/bin/spotcommander /usr/local/bin/spotcommander
  • You must now start the daemon. Open up a desktop terminal (not SSH) as the desktop user running Spotify (not root), and run this command:
 $ spotcommander start

By running it in the terminal the first time, you will be able to see if there are any errors.

  • You should add the daemon to your startup applications. As root, create the file /etc/xdg/autostart/spotcommander.desktop and add:
[Desktop Entry]
Type=Application
Name=SpotCommander
Exec=spotcommander start

Try it

  • You should now be able to control Spotify by going to:
 http://your.computers.ip.address.or.hostname/spotcommander
  • Android users should download the Android app, which can find your computer automatically
  • To find out your current IP address, run this command:
 $ ip addr

Configuration

It is not necessary to configure anything, but in the config.php file there are some options you can change.

See also