[[howto:desktop:create-global-shortcut-keys-for-rhythmbox-music-player-in-any-desktop]]

Posted 10 April 2008 by Brendan Kidwell

Create Global Shortcut Keys for Rhythmbox Music Player in Any Desktop

I use Rhythmbox as my primary music player in Ubuntu Linux, but a few months ago I switched from GNOME desktop to KDE. Since Rhythmbox is a GNOME-style program I couldn't find an easy way to setup global hotkeys in the KDE desktop that send commands like Pause and Play to the running instance of Rhythmbox. The command-line tool “rhythmbox-client” provides a solution:

Create a launcher anywhere in your desktop's menu system that runs the command you want, for example

rhythmbox-client --play-pause

And then assign a global shortcut key to that launcher, for example Ctrl+Alt+\.

Here is a list of all the commands rhythmbox-client supports:

–no-start Don't start a new instance of Rhythmbox
–quit Quit Rhythmbox
–no-present Don't present an existing Rhythmbox window
–hide Hide the Rhythmbox window
–next Jump to next song
–previous Jump to previous song
–notify Show notification of the playing song
–play Resume playback if currently paused
–pause Pause playback if currently playing
–play-pause Toggle play/pause mode
–play-uri=URI to playPlay a specified URI, importing it if necessary
–enqueue Add specified tracks to the play queue
–clear-queue Empty the play queue before adding new tracks
–print-playing Print the title and artist of the playing song
–print-playing-formatPrint formatted details of the song
–set-volume Set the playback volume
–volume-up Increase the playback volume
–volume-down Decrease the playback volume
–print-volume Print the current playback volume
–mute Mute playback
–unmute Unmute playback

Note that the launcher you create will probably NOT open a terminal by default, so any output that might result from your Rhythmbox command (from the “–print-playing” command, for example) will probably be lost.

Carlos Albe', 2013-11-19 16:47

Hi there!
I did it and what happened was weird! I typed "$ rhythmbox-client --next" and the system asked me to type new command and I did Ctrl+ →, then, $ rhythmbox-client --previous and I typed Ctrl+ ← in order to change old defaut commands Alt+ → to play next song and Alt+ ← for previous. I have installed both Rhythmbox and Banshee for different uses, and now when I type Ctrl+ → or Ctrl+ ←, it executes Banshee! It doesn't make sense for me, however my question is: How can I set the default settings again? I mean by type Ctrl+ → or Ctrl+ ← without executing Banshee?

Thanks in advance.

tyler, 2013-11-21 10:52

This was spot on. Thank-You, I simply put this in as custom shortcuts in the system settings with a hotkey... ty sir.

To comment on this page, please copy and paste the following into an email and send it to me. Useful and informative comments will be published within a day or two.

To: brendan@glump.net
Subject: Glump.net comment - Create Global Shortcut Keys for Rhythmbox Music Player in Any Desktop

Regarding: http://www.glump.net/howto/desktop/create-global-shortcut-keys-for-rhythmbox-music-player-in-any-desktop
My name: [your name here]
My social media or web site: [optional URL here]
Publish this comment: yes

[your comment here]