<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>i3 FAQ - Individual question feed</title><link>https://faq.i3wm.org/questions/</link><description>Frequently asked questions and answers about the i3 window manager</description><atom:link href="http://faq.i3wm.org/feeds/question/5194/" rel="self"></atom:link><language>en</language><copyright>Copyright i3, 2012</copyright><lastBuildDate>Thu, 18 Dec 2014 12:03:09 +0000</lastBuildDate><item><title>Some key bindings do not work reliably when also using gnome-settings-daemon</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/</link><description>I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.

    bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
    bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
    bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev

(The script can be found [on GitHub](https://github.com/mgarratt/spotify-control/blob/master/spotify-control))

The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
![image description](/upfiles/14188240772194774.png)


I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with `exec` from my i3 configuration. I also have gnome-settings-daemon running.</description><pubDate>Wed, 17 Dec 2014 13:47:32 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/</guid></item><item><title>Comment by Adaephon for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5233#comment-5233</link><description>At which line did you add the command? And how do you make sure that spotify runs?</description><pubDate>Wed, 17 Dec 2014 23:34:52 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5233#comment-5233</guid></item><item><title>Comment by kviktor for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5232#comment-5232</link><description>I added a command to the script file that creates an empty file and it never got created when trying to use the buttons. Also sometimes it works (as in after boot sometimes it's all fine, then after another reboot it's wrong again the whole time).</description><pubDate>Wed, 17 Dec 2014 22:20:02 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5232#comment-5232</guid></item><item><title>Comment by Adaephon for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5231#comment-5231</link><description>Ok, so the script only sends messages to spotify via DBus and nothing else. That only leaves the Spotify as creator of the image. I would say that `bindsym` works just fine, as indeed *something* is happening, just not the expected thing. There may be an issue with Spotify itself.</description><pubDate>Wed, 17 Dec 2014 21:52:19 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5231#comment-5231</guid></item><item><title>Comment by Adaephon for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5195#comment-5195</link><description>This window is definitely not from *i3*, so I'd guess that it is an issue with spotify-control. So the question is: does that also happen when you call it from a shell?</description><pubDate>Wed, 17 Dec 2014 14:03:16 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5195#comment-5195</guid></item><item><title>Comment by kviktor for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5196#comment-5196</link><description>`exec sh /home/kviktor/spotify-control play` into my shell works like a charm.

It seems like the script is not even ran.</description><pubDate>Wed, 17 Dec 2014 15:22:24 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5196#comment-5196</guid></item><item><title>Comment by Adaephon for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5229#comment-5229</link><description>While `exec` is also a valid shell command, here it is a *i3* command and **not** part of the actual command, which in this case starts with `sh`. Could you post a link to the source of that script or, if it is not too long, add it to the question?</description><pubDate>Wed, 17 Dec 2014 20:55:24 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5229#comment-5229</guid></item><item><title>Comment by kviktor for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5230#comment-5230</link><description>This is it https://github.com/mgarratt/spotify-control/blob/master/spotify-control</description><pubDate>Wed, 17 Dec 2014 20:58:06 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5230#comment-5230</guid></item><item><title>Comment by kviktor for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5234#comment-5234</link><description>The seconds one, also I have an `exec spotify` line in my i3 config. (plus atm it's opened, cause it's playing music)</description><pubDate>Wed, 17 Dec 2014 23:40:20 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5234#comment-5234</guid></item><item><title>Comment by kviktor for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5236#comment-5236</link><description>gnome-settings-daemon is running, but as I said, sometimes the spotify control stuff works.

edit: killed the proccess, now it works, do you have any idea for a workaround?</description><pubDate>Thu, 18 Dec 2014 11:03:13 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5236#comment-5236</guid></item><item><title>Comment by Adaephon for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5235#comment-5235</link><description>Do you have anything else running, that might grab your keyboard? Possibly some daemon of a desktop environment. It might be, that it grabs the multi-media keys before *i3* can do it. Though I am not sure if and how that is possible.</description><pubDate>Thu, 18 Dec 2014 06:50:41 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?comment=5235#comment-5235</guid></item><item><title>Answer by Adaephon for &lt;p&gt;I have a shell script in my home directory that lets me control spotify and I'm trying to use it with these lines in my i3 config.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bindsym X86AudioPlay exec sh /home/kviktor/spotify-control play
bindsym X86AudioNext exec sh /home/kviktor/spotify-control next
bindsym X86AudioPrev exec sh /home/kviktor/spotify-control prev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The script can be found &lt;a href="https://github.com/mgarratt/spotify-control/blob/master/spotify-control"&gt;on GitHub&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The commands work reliably, when started from a shell. However they do not always work when using the key bindings. Sometimes this image pops and nothing else happens: 
&lt;img alt="image description" src="/upfiles/14188240772194774.png"/&gt;&lt;/p&gt;

&lt;p&gt;I'm on Ubuntu 12.04 and i3 version 4.7.2 (2014-01-23, branch "tags/4.7.2"). Spotify is started with &lt;code&gt;exec&lt;/code&gt; from my i3 configuration. I also have gnome-settings-daemon running.&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?answer=5237#post-id-5237</link><description>`gnome-settings-daemon` is interfering with your key bindings. The keys `X86AudioPlay`, `X86AudioPrev` and `X86AudioNext` are also bound to functions `gnome-settings-daemon` and depending on whether `i3` or `gnome-settings-daemon` grab the keys first, your *i3* key bindings work or you get the image.

It should be possible to solve the issue by removing the key bindings from the gnome settings.

It may be possible to do this from within the *Gnome Control Center* or you can use the `gsettings` tool. You can retrieve the current media-key settings with

    gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys

By default these keys are bound to the `play`, `previous` and `next` functions and you can unset them with:

    gsettings set org.gnome.settings-daemon.plugins.media-keys next ''
    gsettings set org.gnome.settings-daemon.plugins.media-keys play ''
    gesttings set org.gnome.settings-daemon.plugins.media-keys previous ''

----

Alternatively, if you do not have `gsettings`, you can use `dconf`:

    dconf write /org/gnome/settings-daemon/plugins/media-keys/next "''"
    dconf write /org/gnome/settings-daemon/plugins/media-keys/play "''"
    dconf write /org/gnome/settings-daemon/plugins/media-keys/previous "''"

You can view bindings that have changed from the default configuration with

    dconf dump /org/gnome/settings-daemon/plugins/media-keys/
</description><pubDate>Thu, 18 Dec 2014 12:03:09 +0000</pubDate><guid>https://faq.i3wm.org/question/5194/some-key-bindings-do-not-work-reliably-when-also-using-gnome-settings-daemon/?answer=5237#post-id-5237</guid></item></channel></rss>