Skip to content

Instantly share code, notes, and snippets.

@mikaelz
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikaelz/71055bbf5fc1aaf34ae7 to your computer and use it in GitHub Desktop.
Save mikaelz/71055bbf5fc1aaf34ae7 to your computer and use it in GitHub Desktop.
Control VLC via command line (CLI). More info at https://stackoverflow.com/questions/8943464/linux-shell-vlc-programming
#!/bin/bash
export DISPLAY=":0.0"
dbus-send --session --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
#!/bin/bash
export DISPLAY=":0.0"
dbus-send --session --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment