Linux Applications

How to Stream from Linux to Your TV

Knowing how to stream from your computer to your TV comes in handy when you want to stream your media – pictures, video, music, or videogames – on the big screen, rather than on your small computer or laptop screen.Luckily, you can stream your media from Linux to your TV! In this article, we will teach you how to do exactly that.

HDMI Cable

This is one of the easiest ways to stream from Linux to a TV. Most smart and non-smart TV sets come with HDMI, or High-Definition Multimedia Interface, ports. With these cables, you can easily stream from your Linux OS to your TV.

These HDMI cables vary in length. Typically, they are of 2-3m in length. They do not cost much, and are very straightforward to install and use.

To link your Linux OS to your TV using an HDMI cable, follow these steps:

  1. Connect HDMI to both TV and your laptop.
  2. Press the Input list option on your TV remote.
  3. Choose the HDMI option.

Note: It could be any one of the HDMI 1, HDMI 2, or HDMI 3 selections, depending on the port number into which you plugged the HDMI cable.

Chromecast

Google Chromecast is a device that can be plugged into any TV. After you have configured the device, it allows you to cast media from your phone or computer to the TV screen. Chromecast is a small and portable tool which allows you to stream media or cast your entire desktop screen on a TV.

If Chromecast is not available in your local market, consider buying alternatives, such as the Xiaomi Mi Box S, which comes with built-in Chromecast.

Ways to use Chromecast are discussed below:

Chromecast using Google Chrome

Step 1: Open Google Chrome and click on the 3 dots in the top right corner.

Step 2: Select the “Cast…” option.

Step 3: From the “Cast…” tab, select which device to which you wish to cast your screen. By clicking the “Sources” option, you can decide whether you want to cast the current tab, your entire desktop, or a file to the device.

After following these steps, your screen or file will be cast to the connected device.

Chromecast Using VLC media player

VLC media player is one of the most popular media players in the market. VLC media player is open-source and you can use this program to play your audio and video files.

If you are playing a file on this program and you wish to cast it to your TV screen, that will not be a problem. This is because the VLC media player supports Chromecast. You can cast your file to the TV in a few easy steps.

Step 1: Open the file in VLC media player that you wish to cast to your TV screen.

Step 2: Click “Playback.”

Step 3: Click “Renderer” and select the device to which you wish to cast your file.

Chromecast Using Terminal

You can use your terminal to cast your files to a TV. You may cast local files or YouTube videos.

Step 1: Open your terminal

Step 2: Install mkchromecast. I already have this installed, and you can install it using the following terminal command:

$ sudo apt install mkchromecast

Step 3: Enter the below command to see a list of available networks. In the top right corner, you will be able to see a new Chromecast icon. Click the icon and select your TV.

$ mkchromecast -t

If you are unable to see any devices, select the “Search for Media Streaming Devices” option.

Step 4: To cast media to the selected device, use the following commands:

For local files:

$ mkchromecast --video -i /home/videos/cast.mp4

You may replace “/home/videos/cast.mp4” with the path of your own local video file.

For YouTube videos:

$ mkchromecast -ylink” –video

Instead of “link,” paste the video URL you wish to cast to the device.

Screen Share Using Ubuntu’s ‘Media Sharing’

Using Media Sharing, you may view the files located on your desktop on a smart TV.

In previous versions, to share your screen to a TV, you had to use third-party tools – but no longer. As of Ubuntu 19.10, Ubuntu comes with a built-in feature that allows you to share your files.

To do this, follow these steps:

Step 1: Open settings.

Step 2: Scroll down and click “Sharing.”

Step 3: Click the slider in the top right corner to enable sharing.

Step 4: Click “Media Sharing.” Click the slider to turn it on. Select the network through which you intend to share the media.

You Music, Videos, and Pictures folders are shared by default. You may remove a directory by pressing the cross icon and add a directory by pressing the plus icon and then choosing the directory of your choice.

Conclusion

There are several methods through which you can stream your Linux desktop on your TV or some other device. Some of these methods require external hardware, while others do not. Some methods require a third-party tool to stream your desktop to the TV if you have not yet updated past Ubuntu 19.10.

Chromecast comes with several features, but is not available in every country. The HDMI cable method is a simple and better option compared to other methods, but it requires you to always be within a 2-3 metre range of the television, which can be a hassle when your TV and computer are not in the same room.

That leaves us with the media share option that came with the Ubuntu 19.10 update. If you have not upgraded already, all you need to do is upgrade your Ubuntu to reap these benefits without having to purchase additional hardware.

About the author

Zeeman Memon

Hi there! I'm a Software Engineer who loves to write about tech. You can reach out to me on LinkedIn.