Entertainment at it's peak. The news is by your side.

Show HN: Control Chromecasts from Linux


Alter your Chromecast by MPRIS media player controls. MPRIS is the fashioned media player interface on Linux desktops.
chromecast_mpris potential that you just can govern media playback on Chromecasts, and affords an interface for playback recordsdata.

MPRIS integration is enabled by default in Plasma Desktop, and, on the side of GNOME’s volume management widget, there are widgets for GNOME, too. playerctl affords a CLI for controlling media gamers thru MPRIS.

Test out ▶️mpris_server at the same time as you might per chance clutch to integrate MPRIS purple meat up into your media player.


Controlling a Chromecast by Plasma Desktop’s Media Participant widget:


  • Alter generic music and video playback
  • Alter app playback
  • Scrutinize playback recordsdata in proper-time
  • Exhibit thumbnail and title
  • Exhibit playback place and total time
  • Discover forward and backward
  • Play / Quit / Cease
  • Quantity up and down
  • Play next and outdated
  • Quit Chromecast app
  • Commence media from MPRIS
  • Playlist integration

Set up


Putting in PyGObject

On Debian-derived distributions cherish Ubuntu, install python3-gi with steady. On Arch, bear in mind to install python-gobject. On macOS, install pygobject3 by brew.

Use pip to install PyGObject>=3.34.0 if there are no set up candidates available in your dealer’s equipment repositories.


pip3 install chromecast_mpris

You might per chance salvage a chromecast_mpris executable added to your $PATH.


Clone the repo, jog pip3 install -r requirements.txt, adopted by python3 install.

You might per chance salvage a chromecast_mpris executable added to your $PATH.


You might per chance must fabricate distinct your computer is on the identical network as your Chromecasts, and that you just’re prepared to manufacture connections to them.

It also helps to clutch the names of the units in strategy.



$ chromecast_mpris --aid
Usage: chromecast_mpris [OPTIONS]

  Alter Chromecasts thru MPRIS media controls.

Alternate choices:
  -n, --name TEXT          Specify Chromecast, otherwise management first
                           Chromecast stumbled on.
  -l, --log-level INTEGER  Debugging log level.  [default: 20]
  --aid                   Current this message and exit.

Connecting to a Utility

Join to a Chromecast named “My Chromecast” and jog chromecast_mpris within the background.

$ chromecast_mpris -n "My Chromecast" &
[1] 1234


Peek LICENSE. Message me in show for you to utilize this intelligent in with a distinct license.

Read More

Leave A Reply

Your email address will not be published.