I just saw the video about Chromecast and I am interested in knowing how can I enable this on my Ubuntu PC. My TV has an HDMI port.
-
2Which video did you watch? Could you link to it in your question? – Kevin Bowen Jul 26 '13 at 20:27
-
None yet, but the addon did install (And I actually took my time to read the information about "How to use Chromecast) which I accidentally skipped yesterday. Was too tired). When I get the chance to test it with a device I will let you know immediately. – Luis Alvarado Jul 26 '13 at 20:39
-
ok. I just thought that you had a specific video in mind that would be useful for others. I've found a few for my own edification. Cheers! – Kevin Bowen Jul 26 '13 at 22:39
-
https://github.com/keredson/gnomecast lets you cast a video file to your chromecast. (disclaimer: my project) – keredson Mar 01 '18 at 05:35
-
1Many options and work-arounds are posted here including a now deprecated Chromium extension and several reports that the functionality has been added to Chrome and Chromium and therefore available by default. I think we're losing track of the main question. Should I buy a Chromecast to use with Ubuntu? Answer: No. Chromecast does not currently work with Ubuntu out of the box. There may be some suggested work-arounds, but the fact remains. It's not supported by Google or anyone on the Ubuntu side. It doesn't work out of the box and there's nobody working to make sure any unrelated changes don't – jorfus Oct 01 '18 at 19:54
-
@jorfus Hi buddy, well I would disagree with your comment. I have here 2 Chromecast that I have used through Ubuntu (Using Google Chrome with Videostream app) and 2 Chromecast Ultra which I use via smplayer or VLC. Or simply using Google Chrome with youtube and from there I share it to any of the TVs that have Chromecast. If you need any assistance with this, let me know so we can do a quick online meeting to guide you about issues with chromecast itself, networking configurations and other minor things that after they are known, you save a lot of time when sharing to, in my case, to the kids. – Luis Alvarado Oct 01 '18 at 20:53
-
Thanks Luis, your question generically asks, how to connect from Ubuntu to Chromecast. The most basic way this should work is casting a tab from Chrome. That's the use case it might be most beneficial to post as an answer if you have gotten it to work. All other answers to that specific use case refer to a discontinued plugin. Thanks. – jorfus Oct 01 '18 at 22:17
-
@jorfus yes boss will do this week. – Luis Alvarado Oct 02 '18 at 01:39
-
@jorfus Hi buddy, done, hope you like the answer. – Luis Alvarado Oct 05 '18 at 00:13
-
1After the merge of this PR will add Chromecast support to GND (Gnome Network Displays) – Pablo Bianchi Apr 24 '23 at 13:32
13 Answers
The documentation from Google indicates that the Google Cast extension is not supported in Linux, but it actually does work.
To get this working in Ubuntu:
Make sure you are running either Chromium or Chrome version 28 or higher. Earlier versions will get a "This application is not supported on this computer. Installation has been disabled." error. The 'chromium-browser' package in Ubuntu 13.04 works fine.
Make sure iptables is configured to allow the UPnP/SSDP traffic used by the Google Cast browser extension to discover the ChromeCast device.
The browser will send a multicast UDP packet from the local IP and an ephemeral (random) port to 239.255.255.250 port 1900. The ChromeCast device will respond with a unicast UDP packet from the ChromeCast device's IP and another ephemeral port to the source IP/port of the multicast packet. Note that this is slightly different than most other UPnP devices, which will usually respond with a unicast UDP packet from port 1900 instead of an ephemeral port.
The typical
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
rule WILL NOT match the response packet, as iptables does not currently have a conntrack helper that supports SSDP. In addition, theiptables -A INPUT -p udp --sport 1900 -j ACCEPT
rule typically used for UPnP/SSDP will not work since the replies from the ChromeCast device do not come from port 1900.Therefore, you will need to add a rule to accept UDP packets on all ephemeral ports. The ephemeral port range for the initial multicast packet should be 32768-61000 (Verify with
cat /proc/sys/net/ipv4/ip_local_port_range
), so the following rule should work (note it inserts at the top of the input rules):iptables -I INPUT -p udp -m udp --dport 32768:61000 -j ACCEPT
After the ChromeCast device has been discovered (each time the browser starts), the browser will control it using TCP (HTTP) connections to port 8008, which should not require any special iptables rules.
Install the Google Cast browser extension in either Chromium or Chrome. Note that an app/extension called ChromeCast is available, but this is not what you want.
If you have not yet set up your ChromeCast device, follow the instructions that come with the device to set it up.
Once your device is configured, you should be able to simply click the Cast button in Chromium to Cast your current tab.

- 1,027
- 1
- 6
- 5
-
2Thanks for the info on IP tables. I wasn't aware of Chromecast's different behavior from other uPnP devices. – Fred Thomsen Aug 24 '13 at 23:15
-
1To get this solution to work in Fedora using the GUI, go to the Zones tab in "Firewall configuration", select the public zone, go to the ports tab, and add the udp port range 32768-61000 – CamelBlues Jun 20 '14 at 01:07
-
-
The castv2 protocol seems to use mDNS + Cast(s) protocol on port 8009 instead of the original approach. Additionally, when Mirroring your screen it will send traffic on a separate UDP port for the screen data which is announced dynamically during the handshake. – Roberto Andrade Sep 13 '15 at 14:13
-
You still need to unblock your incoming port for TCP connections, e.g. 8080, in iptables. – ApolloLV Oct 25 '15 at 22:55
-
I did not need to change
iptables
. I guess in the 3 years since this answer, Google found a way to controliptables
, or it found another way around. – trysis Mar 27 '16 at 18:14 -
I recently discovered that it doesn't work anymore. My Chromium has the "Cast" icon, but the extension can't install (it says it's installed, but in Preferences/Extensions it says "no extension installed"). It used to work up until a few weeks ago... – wazoox Dec 10 '16 at 16:52
-
In my case Chrome wasn't able to detect the device. Issuing
iptables -I INPUT -p udp -m udp --dport 32768:61000 -j ACCEPT
solved the problem. – Immanuel Weihnachten Jun 25 '17 at 19:15 -
3All this is no longer necessary as of current Chrome/Chromium versions. – Dan Dascalescu Jun 28 '18 at 00:10
This answer no longer works because the extension has been discontinued; this answer is, however, being left as-is for historical reasons.
It looks as if all you need is the browser Chrome or Chromium and the extension below: https://chrome.google.com/webstore/detail/google-cast/boadgeojelhgndaghljhdicfkmllpafd

- 74,764

- 437
- 4
- 2
-
1google said you need android 4.3, win, iphone or chromebook but I think this extension may work in linux – Rodislav Moldovan Jul 25 '13 at 15:32
-
2I have added it to Chromium - I will try to get hold of a Chromecast, test it and get back to you – azra Jul 25 '13 at 17:09
-
1please share your results here (and if you can please do a test with Chrome also) – Rodislav Moldovan Jul 26 '13 at 08:38
-
4When I try to install the extension on Ubuntu 13.04 and Chrome 26.0.1410.63, the extension's page says, "This application is not supported on this computer. Installation has been disabled." Nobody else is getting that message? – Sam Swift Jul 27 '13 at 17:56
-
1Same extension installs fine on the same machine in Chromium 28.0.1500.71. Hopefully Chrome will be updated soon? – Sam Swift Jul 27 '13 at 18:01
-
I needed a little bit more space than I can share with comment, so this is my answer http://askubuntu.com/a/326799/169426 – outcoldman Jul 31 '13 at 04:32
-
1This will only allow to stream contents within the chrome browser, right? I was expecting that the question is how to stream the full desktop in general... – bluenote10 Apr 24 '14 at 11:55
-
5
-
1As mentioned in a comment in another answer, this was discontinued because the functionality was added to Chrome. Here are instructions on using it. – ryanjdillon Aug 14 '17 at 11:56
pulseaudio-dlna
This project is in active development. From version >= 0.4.6 Chromecast is supported in addition to DLNA.
From Ubuntu >=16.10 pulseaudio-dlna is in the Universe repository.
For older versions the ppa ppa:qos/pulseaudio-dlna needs to be added first:
sudo apt-add-repository ppa:qos/pulseaudio-dlna
sudo apt-get update
We can then install pulseaudio-dlna it with:
sudo apt-get install pulseaudio-dlna
It then can be run from a terminal or script with
pulseaudio-dlna [options]
It will add all DLNA and Chromecast client(s) available in the local network as an audio output device to select from the sound settings menu.
We can then stream the audio from any media player (or browser) to our Chromecast client.
For all options see the project's documentation at GIT.
-
-
second step should be
sudo apt-get update
, something obvious for most of us, but maybe some users face it ;-) – wikier Dec 07 '15 at 13:35 -
-
Nice, working out of the box, although stuttering a bit from time to time... thanks, +1 – Rmano Feb 20 '16 at 17:30
-
Package pulseaudio-dlna is not available, but is referred to by another package. (Ubuntu 20.4) What to do then? – Thomas Oct 25 '20 at 20:51
Since this question was asked 2 years ago, it may be worth mentioning that after Feb 2016, on Xubuntu 15.10, it was as easy as:
- Install Chrome or Chromium for Linux
- Install the Google Cast browser extension from within Chrome
Cast the tab you want. Easy as that.
EDIT: Now the feature is built in:

- 15,657

- 1,201
-
4
-
5
-
2built in to what? I'm on a fresh install of 17.04, install chromium, extensions imported from my account. Can't see the chrome cast device :( – Madivad May 15 '17 at 11:19
-
I'm running 16.04, fresh chrome and chromium, firewall stopped, no option to cast. – jorfus Oct 01 '18 at 17:53
-
Chrome 81 in Ubuntu 19.10 has Cast menu item and lists the "[TV] Samsung 7 Series (50)" item, but non-YouTube tabs say "Source not supported". – Cees Timmerman May 01 '20 at 15:03
I'm running Ubuntu 14.04 on my PC & Android 4.3 on my Phone.
First you need to plug the Chromecast in and change the TV source to that HDMI port.
Next install the Phone app from here on play store
Then use the Phone app to connect the Chromecast to your wifi and then it will update and reboot.
After that, go to your Ubuntu PC and open Chromium and install this app from the Chrome web store The Chrome-cast device is now listed. It's that simple.
For video file playback : Go to File > Open File locate the video and open. The Chromium browser has a media player built in. Then you can stream it. Remember to go "full screen" (press F11) :) That's it.
Here are the codecs that work in Chromium : http://www.chromium.org/audio-video
There are other projects like VLC or XBMC that are working on Chromecast compatability, so it won't be long until we can stream everything. If you use Steam you can install VLC or XBMC and stream from one Steam box to another already.
-
Can we add subs to this build in player? Vlc chromecast suppor only in windos for now. – Vasil Valchev Dec 21 '16 at 17:59
-
I have not yet bought or tried Chromecast-2. If VLC do not support Chromecast for now, can 3D- HSBS movies be played through Bino, or SMPlayer to cast on TV? – bluepearlsky Jan 02 '18 at 18:26
I just got my chromecast device. It can stream YouTube and tabs from Chrome. Because Netflix is not available on Ubuntu you cannot stream movies from Ubuntu. Tab streaming gives you a lot of cool features. I already tried: streaming photos from Flickr, streaming videos from Vimeo, streaming music from SoundCloud or Google Music (I connected it to Receiver, so experience is awesome).
I did not see any issues with music streaming, but in video you can see some dropped frames (but not really, I watched some imdb.com trailers and overall it was fine).
I could not make Chrome with Chromecast play avi files from my local PC. It allows to stream it, but I see black screen on TV (I guess this is not supported).
And I did not do anything special to install Chromecast plugin on Chrome, it just works.

- 141
- 4
-
It only works if you have your firewall turned off :-( Can others confirm? – NullVoxPopuli Aug 17 '13 at 18:04
-
Does this work to cast 3D HSBS movies through players like Bino or SMPlayer? If yes, then only I would buy the Chromecast-2. – bluepearlsky Jan 02 '18 at 18:31
This was tested using Ubuntu 18.04+
There are several ways of sharing and streaming using either Chromecast or Chromecasr Ultras:
- Using Google Chrome with the Videostream App)
- Using SMPlayer or VLC, both of which have the option to Stream to Chromecast
- Using Youtube (In Google Chrome):
This helps a lot when you are managing multiple rooms, kids, NetFlix accounts and more. Do note that if Chromecast is not detected, 99% of the time is the network configuration. You can find a lot of helpful advice at the Chromecast Help Page or going to the Troubleshooting Guide.
You can also share your desktop by using the Cast option in Google Chrome:
And after selecting any of the Chromecasts you would see something like this:
- 211,503
mkchromecast
sudo apt install mkchromecast
mkchromecast --video -i "~/Videos/Example.mkv"
Reference
- Official FAQ
- How To Cast Video from Ubuntu to a Chromecast - OMG! Ubuntu!
- Issue on 16.04 Need
python3-pychromecast
.

- 15,657
Chromium Version 70.0.3538.77 (Official Build) Built on Ubuntu, running on Ubuntu 18.04 (64-bit)
https://support.google.com/chromecast/answer/3228332?co=GENIE.Platform%3DDesktop&hl=en

- 6,788
You need Google Cast server app on the Ubuntu based PC or your NAS.
Chromecast device is new...
The question is: "Does this app exist yet?" It is a new opportunity for Linux developers.
More info on the Google developers page
- 70,465

- 1,927
-
5Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Eliah Kagan Jul 29 '13 at 21:40
-
I tried to install http://mkchromecast.com/ on my 14.04.3 LTS system, but it did not work. Report on Package Installer :"Status : Error: Dependency is not satisfiable: python3-pychromecast." – bluepearlsky Jan 02 '18 at 18:46
I just recently managed to get my chromecast working with Chrome in Ubuntu, quite simply, I added the device with my mobile phone, and it magically appeared in Chrome in Ubuntu.
- 70,465

- 41
- 1
- 1
- 4
Simply click the Chrome Tools menu in the top right corner of your Chrome browser window. Then click Cast… More detail from google support

- 175
With firewalld I had just to open a port range in your current zone:
firewall-cmd --get-active-zones
work
interfaces: wlp0s20f3
In this case the zone is work.
firewall-cmd --permanent --zone=work --add-port=32768-61000/udp
firewall-cmd --reload
After this, chromecast worked without problem.

- 151