Stream Music from Linux to Google Home

If anyone has a Google Hub device of some sort, they know how handy they can be for getting information when you ask a question. But there is another use that most people may not be aware of doing. Streaming music, not only to one speaker, to many.

Personally, I have six Google Home Devices. Five are speakers and one is a display/speaker.

NOTE: I also have my ceiling fan, lamp, printer and a black light hooked to Google Home. The printer is plugged into an ‘outdoor heavy-duty’ extension cord that is controlled by Google Home. When I tell Google to turn on the printer, the plug powers on and the printer starts. I can power on the printer from any room.


The program we will use is the ‘mkchromecast’ app. To install the app in Ubuntu, use the following command:


sudo apt install mkchromecast

Once you’ve installed the app, the Linux system needs to be connected to the same Wi-Fi network as the Google Home Speaker to which you want to play music.

The ‘mkchromecast’ icon should appear in your task area (near your clock), as shown in Figure 1.

FIgure 1.jpg


If you right-click on the icon, you should see an option for ‘Preferences’. Figure 2 shows the default settings which should work fine for casting music.

Figure 2.jpg



We should be able to cast to a Google device in a short while. There are only a few items to change to allow the streaming to start.

Right-click on the ‘mkchromecast’ icon and select the top option ‘Search for Media Streaming Devices’. The app may take 10-30 seconds to scan for available devices on the network. Once the scan completes, a list of devices should appear, giving you the option to choose one. The names displayed are taken from the names given them from the Home app. See Figure 3 for an example of the pop-up menu.

Figure 3.jpg


Choose one of the Home Devices listed and then play a song using any audio player, such as VLC. Once you select a Google device, you should after a bit hear a tone from the speaker showing that it is being accessed remotely.

You will not hear any music from the Google speaker yet, it should play from your default system speakers. To switch to the chosen Google speaker, you need to type ‘pavucontrol’ from a prompt to start the ‘Volume Control’ app. Under the ‘Playback’ tab, you should see the app you chose to play music. Choose the box that lists the default speaker and change it to ‘Mkchromecast’. Set the volume accordingly for the output. It may take up to 10 seconds before the music starts.

Any system sound will come out of the Google Speaker at this point. Any program that you play any sound or music from will be cast to the Google Speaker.

Set up a long playlist and you are set for a while. If you right-click ‘mkchromecast’ and select ‘Volume’, you can adjust the volume on the Google Speaker itself.

Multiple Speakers

The best thing about casting to a Google Speaker is to cast to multiple speakers. From your Google Home app, most likely on your phone or tablet, open ‘Home’.

Tap on the plus sign (+) on the top left of the screen.

On the next screen, select ‘Create Speaker Group’. A list of speakers will be shown. Select all the speakers that you want to add to the new group. The group is what you’ll be selecting from the list in ‘mkchromecast’ to play the music. Select ‘Next’ and give the Group a name and tap ‘Save’.

Now, when you right-click on the ‘mkchromecast’ icon and select ‘Search for Media Streaming Devices’, the new group should appear. Select the Group after it appears. When you cast music, all the speakers in the group should start playing music.


The ability to stream music to your Google Speakers is a great ability to have for a home sound system. To stream a music list normally, you need to subscribe to Pandora, Spotify, YouTube, etc. The ‘mkchromecast’ program lets you have full control over your music without costing you a monthly fee.

Keep this option in mind for when you have a party. Grab a few Google Speakers when they go on sale and set them up in every room to allow you to stream music everywhere.

Posted by Linux Admin