<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Linux Spotify Keybindings &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Wed, 04 Oct 2023 10:43:55 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>Linux Spotify Keybindings &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Linux Spotify Keybindings]]></title>
		<link>https://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/</link>
					<comments>https://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 11 Dec 2011 14:32:02 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[spotify]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=4942</guid>

					<description><![CDATA[Hurrah! Spotify have released a native Linux player which works with free accounts!  These notes show (which are mostly for my benefit) show you how to install it and configure your multimedia keyboard so the play/pause key controls the music on Spotify.  Download Spotify for Linux. It&#039;s available in 32bit or 64bit.  Double click on the .deb that has been downloaded and it should install.  Nice…]]></description>
										<content:encoded><![CDATA[<p>Hurrah! Spotify have released a <a href="http://www.omgubuntu.co.uk/2011/12/spotify-on-linux-works-for-free-accounts-offers-15-million-tracks/">native Linux player which works with free accounts</a>!</p>

<p>These notes show (which are mostly for my benefit) show you how to install it and configure your multimedia keyboard so the play/pause key controls the music on Spotify.</p>

<p><a href="http://repository.spotify.com/pool/non-free/s/spotify/">Download Spotify for Linux</a>. It's available in 32bit or 64bit.</p>

<p>Double click on the .deb that has been downloaded and it should install.  Nice and easy!</p>

<p>To get the multimedia keys working, we need to follow the instructions in <a href="https://web.archive.org/web/20111009011517/http://www.mabishu.com/blog/2010/11/15/playing-with-d-bus-interface-of-spotify-for-linux/">this tutorial</a> and the codes <a href="https://web.archive.org/web/20120306050409/https://lnxscene.org/~jylam/spotify.html">described at lnxscene</a>.</p>

<p>Install xbindkeys.</p>

<pre>sudo apt-get install xbindkeys</pre>

<p>Create the default configuration file for xbindkeys.</p>

<pre>xbindkeys --defaults &gt; ~/.xbindkeysrc</pre>

<p>Edit the configuration file for xbindkeys.</p>

<pre>nano ~/.xbindkeysrc</pre>

<p>Add these lines:</p>

<pre>"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
XF86AudioPlay
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
XF86AudioStop</pre>

<p>Run xbindkeys to see if it all works</p>

<pre>xbindkeys</pre>

<p>Now, when Spotify is running, pressing th eplay/pause key will make your music start or stop.</p>

<p>You will need to set xbindkeys to run automagically on startup.</p>

<p>On Ubuntu, System -&gt; Preferences -&gt; Startup Applications.</p>

<p>Done!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=4942&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/feed/</wfw:commentRss>
			<slash:comments>17</slash:comments>
		
		
			</item>
	</channel>
</rss>
