3

I am trying to get the following shortcut to work:

notify-send -i rhythmbox "RhythmBox Is Playing" "$(rhythmbox-client --print-playing)"

It works fine If I run it from the command line, but when I set it as a keyboard shortcut I just get the text printed out and the program (rhythmbox-client) doesn't run.

What am I doing wrong?

5
  • I got your method working without issue. What version of Ubuntu are you on? run unname -a . regardless you should try my answer below.
    – Jeff
    May 8, 2018 at 12:17
  • 1
    Strange. I'm using ubuntu 18.04 (uname -a Linux chud37 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux )
    – Chud37
    May 8, 2018 at 12:26
  • Have you tried setting another custom shortcut? I would suggest trying something simple just to see if you can get that to work. Then let us know the result.
    – Jeff
    May 8, 2018 at 12:33
  • 1
    @Jeff yes I have other custom shortcuts (all for the rhythmbox-client such as --play-pause) and they work fine.
    – Chud37
    May 9, 2018 at 10:26
  • It would probably be a good idea to update your question with the information of a working shortcut and an example. And that you have tried the full path without that working.
    – Jeff
    May 9, 2018 at 13:40

1 Answer 1

0

Try using the full paths

find your paths:

$ which rhythmbox
/usr/bin/rhythmbox

$which rhythmbox-client
/usr/bin/rhythmbox-client

Then sub the results in instead of just the commands

notify-send -i /usr/bin/rhythmbox "RhythmBox Is Playing" "$(/usr/bin/rhythmbox-client --print-playing)"

2
  • 1
    Thank you for your answer. Did you try it? Because it's just producing the same results for me :(
    – Chud37
    May 8, 2018 at 12:24
  • I did try it and it worked, but your method was also working for me. However, I'm on ubuntu 16.04.
    – Jeff
    May 8, 2018 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.