Difference between revisions of "SpotCommander"

From ArchWiki
Jump to: navigation, search
m (rm merge request which was added to a recent revision that actually had no content, unlike this one)
Line 6: Line 6:
 
SpotCommander is [https://aur.archlinux.org/packages/spotcommander/ available in AUR], and can be installed [https://wiki.archlinux.org/index.php/AUR#Installing_packages like any other package from AUR]. The package automates the manual installation process described below.
 
SpotCommander is [https://aur.archlinux.org/packages/spotcommander/ available in AUR], and can be installed [https://wiki.archlinux.org/index.php/AUR#Installing_packages like any other package from AUR]. The package automates the manual installation process described below.
  
{{Note|If you have any kind of web server software installed on your system already, you should install manually instead to avoid touching your current configuration.}}
+
{{Note|If you have any kind of web server software installed on your system already, you should install manually to have complete control over your current configuration.}}
  
 
== Option 2: Install manually ==
 
== Option 2: Install manually ==

Revision as of 11:39, 26 November 2014

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

Option 1: Install from AUR

SpotCommander is available in AUR, and can be installed like any other package from AUR. The package automates the manual installation process described below.

Note: If you have any kind of web server software installed on your system already, you should install manually to have complete control over your current configuration.

Option 2: Install manually

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: The note above claims this is necessary to "avoid touching your current configuration", yet the steps are highly dubious (Discuss in Talk:SpotCommander#)
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 xdotool wget
  • DO NOT FORGET: Enable PHP as described in the LAMP article. Make sure you enable mod_mpm_prefork.
  • 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/extra/spotcommander.conf and add:
<Directory "/srv/http/spotcommander">
AllowOverride AuthConfig
</Directory>
  • In /etc/httpd/conf/httpd.conf, add to bottom:
Include conf/extra/spotcommander.conf
  • Restart Apache:
 $ systemctl restart httpd.service
  • Make Apache start when system boots:
 $ systemctl enable httpd.service

Install SpotCommander

  • Go into the web server root directory:
 $ cd /srv/http/
  • Download:
 $ wget -N http://www.olejon.net/code/spotcommander/files/spotcommander-latest.tar.bz2
  • Extract:
 $ tar -jxvf spotcommander-latest.tar.bz2
  • Remove:
 $ rm spotcommander-latest.tar.bz2
  • Go into folder:
 $ cd spotcommander
  • Set correct permissions:
 $ chmod 755 . && chmod 755 bin/* && chmod -R 777 db/ && chmod 777 run/ && 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
  • 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
  • To find your current IP address, run this command:
 $ ip addr
  • Android users should download the Android app, which can find your computer automatically

Configuration

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

See also