Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get gmusicbrowser to copy song information to my clipboard with the Now Playing plugin. For on song change, in the plugin's configuration, I have

echo "%a - %t (from %l, %y)" | xclip -i -selection "clip-board"

which shows echo as the command and every chunk as an argument (e.g. "..." is arg1, | is arg2, etc.)

ian@iris:~$ echo -e "test" | xclip -i -selection "clip-board"
ian@iris:~$ xclip -o -selection "clip-board"

I'm then able to see 'test' as resulting from a paste into another window. However, when a song changes, this isn't the result!

I'm running xubuntu 12.04.2 with gmusicbrowser 1.1.9-1

share|improve this question
up vote 0 down vote accepted

I had to create a bash script

echo "${@}" | xclip -i -selection "clip-board"

and call it from the Now playing plugin

bash /home/ian/scripts/ "%a - %t (from %l, %y)"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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