Difference between revisions of "Shairport Sync"

From ArchWiki
Jump to: navigation, search
(Installation: the other two packages no longer exist, the remaining one has a systemd service file included)
(Configuration)
Line 7: Line 7:
 
==Configuration==
 
==Configuration==
  
=== shairport-git-sysdcompat ===
+
The configuration file can be found in:
The configuration file for systemd lives in:
 
  
 
  /etc/conf.d/shairport
 
  /etc/conf.d/shairport
Line 16: Line 15:
 
  # systemctl start shairport
 
  # systemctl start shairport
  
=== Other versions ===
+
=== Alternative configuration ===
 
The configuration is managed by the perl script /usr/bin/shairport.pl. For novice users, the defaults should be left as is, unless they wish to set a password for the AirPlay server. In this case, they should change line 56 from {{ic|<nowiki>my $password = '';</nowiki>}} to {{ic|<nowiki>my $password = '<yourpassword>';</nowiki>}} where <yourpassword> is to be replaced by the password of your choice.
 
The configuration is managed by the perl script /usr/bin/shairport.pl. For novice users, the defaults should be left as is, unless they wish to set a password for the AirPlay server. In this case, they should change line 56 from {{ic|<nowiki>my $password = '';</nowiki>}} to {{ic|<nowiki>my $password = '<yourpassword>';</nowiki>}} where <yourpassword> is to be replaced by the password of your choice.
  

Revision as of 22:08, 23 June 2014

Shairport is a utility for emulating AirPlay functionality on Linux. However, since it has been created by reverse-engineering Apple's key used in its AirPort Express, be advised that the functionality may be removed at Apple's discretion.

Installation

You can install Shairport with the shairport-gitAUR package from the AUR.

Configuration

The configuration file can be found in:

/etc/conf.d/shairport

Name your Shairport server, then start the service:

# systemctl start shairport

Alternative configuration

The configuration is managed by the perl script /usr/bin/shairport.pl. For novice users, the defaults should be left as is, unless they wish to set a password for the AirPlay server. In this case, they should change line 56 from my $password = ''; to my $password = '<yourpassword>'; where <yourpassword> is to be replaced by the password of your choice.

If you have not used the shairport-git-sysdcompat package, then you will need to create the systemd service file on your own. The one used by the sysdcompat package is:

[Unit]
Description=Shairport Airtunes emulator
Requires=avahi-daemon.service

[Service]
Type=forking
PIDFile=/var/run/shairport.pid
ExecStart=/usr/bin/shairport.pl -d --writepid=/var/run/shairport.pid -a %i

[Install]
WantedBy=multi-user.target

If you are manually creating the file, remember to run systemctl daemon-reload after writing the file. For starting the service, simply issue the command:

# systemctl start shairport@<nameofserver>.service

where <nameofserver> can be any name of your choice. While it has not been tested, it would be good if the name avoided any special characters. For automatically starting the service at launch, issue the command:

# systemctl enable shairport@<nameofserver>.service

The result should be an AirPort station by the name <nameofserver> which should be able to accept output from any Apple product.