Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to get gmusicbrowser to copy song information to my X.org 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"
test

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

1 Answer 1

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/gmb-np.sh "%a - %t (from %l, %y)"
share|improve this answer

Your Answer

 
discard

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.