It just got a little easier for Ubuntu users to cast video, music and pictures to a Chromecast equipped TV direct from the desktop.
We’ve previously shown you how to cast video from Ubuntu to a Chromecast using the open-source MKChromecast tool, and the latest versions of the popular VLC media player has Chromecast support built-in too.
Now there’s a new way for Linux users to cast content to a nearby TV over the local network using Google’s cheap n’ cheerful dongle using a GNOME Shell extension.
Cast to TV GNOME Extension
The ‘Cast to TV’ GNOME Shell extension is a tray-based tool. When installed and enabled you access its features via the main GNOME Shell Status Menu. It doesn’t (alas) have the option of using a separate applet.
The extension lets you:
- Stream video from Ubuntu to Chromecast
- Stream photos from Ubuntu to Chromecast
- Stream music from Ubuntu to Chromecast
With options to:
- Encode media on the fly
- Set position of nn-screen player controls
- Bitrate settings
- See a music visualiser on the TV when playing music
Getting Set Up
Although Cast to TV is a GNOME extension it’s not quite as simple to set-up and use as other GNOME extensions.
The extension’s Github page details the dependencies required to use the tool. All of these are necessary (the extension won’t work without them) but, thankfully, all available to install via the standard Ubuntu repos:
sudo apt install nodejs npm ffmpeg
Next, you’ll need to install the Cast to TV extension itself.
The Cast to TV GNOME extension is available to install from the GNOME Extensions website:
Visit the page above a web browser like Google Chrome or Firefox and slide the toggle from ‘off’ to ‘on’ to trigger installation. Accept the install request when it appears and wait a few seconds while the add-on is downloaded, unpacked and installed.
— But you’re not done yet.
The last step is to install several additional dependencies the tool needs via NPM, the ‘node.js package manager’.
To do this move to the extension directory:
You will see a full list of the packages this pulls in at the command prompt, but if you’d like to check before running they are listed in the ‘package.json’ file in the extension’s folder.
The Cast to TV extension will have been enabled automatically upon install. It it wasn’t, or it was and you later decide you don’t want to use it, remember that you can manage all of your GNOME Extensions using the terrific ‘GNOME Tweaks’ desktop tool. It’s available in the Software store.
To cast a video, image or music file to the nearest available Chromecast device on your network (and ideally there’ll only be one in range) just open the Status Menu, select your content type, and select your media file. Streaming will begin instantly.
Depending on your Chromecast model you may find that some video formats don’t work — but if your video does not play, don’t panic. Select the “Transcode Video” option during file selection to encode video to a supported H.264 format.
That’s pretty much all there is to it! The set-up is perhaps a little more involved than using something like MKChromecast or VLC, but the native GUI integration is a nice touch.