VLC D-Bus shortcuts and Unity launcher in Ubuntu 12.04 Precise Pangolin

Have you ever wondered about adding VLC playlist shortcuts to its launcher entry ( Ubuntu 12.04 Precise Pangolin )?
Since version 2.0 VLC supports the library MPRIS and then D-Bus  for Desktop process intercommunication.

This allows us to use D-Bus commands to trigger VLC  playlist actions.

  • Play/Pause Track command:
    dbus-send --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
  • Stop Playing command: 
    dbus-send --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
  • Next Track command: 
    dbus-send --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
  • Previous Track command: 
    dbus-send --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
Custom VLC Playlist Commands (Unity Launcher)

Custom VLC Playlist Commands (Unity Launcher)

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s