How to Emulate Google Chromecast on Windows, Mac and Linux Desktop

Chromecast Desktop

Google’s latest hardware offering, Chromecast was an instant hit as it promised a better way of beaming/ controlling  multimedia content from your mobile phone on to a TV than the current choices we have right now. Now when a popular company like Google is trying to solve an age old problem that haunted Android, with a less expensive ($35) hardware, we should expect it to run out of stock. That is what exactly happened to Chromecast as it ran out of stock on all popular online stores including Google’s own Play store. Now if you have already pre-ordered a Chromecast or is in queue, here is something for you impatient folks, ready to play with few command lines.

Github user (dz0ny) has developed a Python package called Leapcast that can emulate the Chromecast hardware in Chromium environment running on your Mac, Windows and Linux. In order to achieve this hack on your computer all you have to do is carefully follow the steps below.

To start with here is what you are going to do in a nutshell. Bet it on Windows, Mac or Linux, you need to make sure Chrome browser and Python is installed and working. We then install git and command line tools to clone Github repository on to your computer. Run Python setup file to install virtual Chromecast environment and finally you need to run the command line with flags to successfully run Leapcast every time before you cast. That’s it you can now start casting from your Android and iOS devices to desktop.

Chromecast Android Icon

Note that Leapcast is still in testing phase and is expected to be updated frequently. Right now it supports YouTube and Google Play casting from Android phones, tables and iOS devices.

Note: Before starting, make sure Chrome browser is installed and your internet connection is working.

Steps to emulate Google Chromecast hardware in Chrome browser:

On Mac OS X:

 

1) Open the Terminal app via Launchpad.

2) Make sure you have Python installed on your Mac and it’s working. Type the command ‘python’ in Terminal prompt and you should see a similar screen with the version displayed.

Python Mac Terminal

3) Download and install Github for Mac from here. Once after you finish installing, head over to the Github preferences from the Mac taskbar and click ‘Install Command Line Tools‘.

Github Mac Command Line

-OR-

Run the following command line to install Homebrew package manager and then install git on your Mac via command line.

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew install git

4) Now clone the entire Leapcast Github repo on to your Mac by carefully entering the following command line Terminal prompt and hit enter.

git clone https://github.com/dz0ny/leapcast.git

5) Move to the ‘leapcast‘ folder installed on your Mac by enterting,

cd ./leapcast

6) Now to install the Leapcast package,

python setup.py develop

7) Run the following command with flags to run Leapcast and start casting from your mobile device,

leapcast --name MyMac --chrome /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

 

On Linux (Ubuntu/ Debian):

 

1) Open the Terminal app and make sure Python is working (same as Step 2 for Mac OS)

2) Install git by typing,

 sudo apt-get install git

3) Clone Leapcast Github to your Linux machine by punching in,

git clone https://github.com/dz0ny/leapcast.git

4) Move to Leapcast folder

cd ./leapcast

5) Now to run the setup file and install Leapcast,

python setup.py develop

6) Run Leapcast by executing the following command line in Terminal prompt,

leapcast --name MyLinux --chrome /usr/bin/google-chrome --fullscreen

 

On Windows 7/ 8:

 

1) Download and install 32 bit version of Python for Windows.

Install Python

2) Note that Python version 2.7 will be installed at C:\Python27\. Now you need to add this Python directory to the PATH variable so that you can simply call Python from the Windows command prompt by typing the keyword ‘python’. Run this in command prompt,

[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")

3) Now to download and install a third-party Python software known as Distribute, which extends the packaging and installation facilities. Download Python-Distribute python file from here and save it in root of  C:\. Run the following in command prompt window,

python c:\distribute_setup.py

4) Also install Pip, a tool for installing and managing Python packages.

easy_install pip

5) Download and install Twisted (networking framework written in Python) for Windows from here.

6) Download and install Github for Windows. Click to open the ‘Git Shell‘ PowerShell shortcut icon on your desktop and enter the following command to clone Leapcast repo to your computer.

git clone https://github.com/dz0ny/leapcast.git

Clone Git Windows

7) Move into Leapcast folder,

cd leapcast

8 ) Run setup file and intall Leapcast,

pip install .

9) Every time you want to emulate Chromecast on Windows 8, run Leapcast by typing,

leapcast --name MyWindows --chrome 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' --fullscreen

The above command line is Windows 8 specific and if you are on Windows 7 PC make sure you make changes to Chrome file location.

via: Hackaday

Source: Github

Comments

  1. I am from Russia and practically noob/ but i still trying to do this, some of steps i ended

  2. I am running this on ubuntu but never chrome window appears

    MediaServer-TV:~/leapcast$ sudo leapcast –name MediaPlayerTV –chrome /usr/bin/google-chrome –fullscreen
    INFO:root:Starting SSDP server
    INFO:root:Starting LEAP server
    INFO:root:Loading Config-JSON from Google-Server
    INFO:urllib3.connectionpool:Starting new HTTPS connection (1): clients3.google.com
    INFO:root:Parsing Config-JSON
    INFO:root:Added YouTube app
    INFO:root:Added ChromeCast app
    INFO:root:Added PlayMovies app
    INFO:root:Added GoogleSantaTracker app
    INFO:root:Added GoogleMusic app
    INFO:root:Added 00000000-0000-0000-0000-000000000000 app
    INFO:root:Added Netflix app
    INFO:root:Added 18a8aeaa-8e3d-4c24-b05d-da68394a3476_1 app
    INFO:root:Added aa35235e-a960-4402-a87e-807ae8b2ac79 app
    INFO:root:Added edaded98-5119-4c8a-afc1-de722da03562 app
    INFO:root:Added HBO_App app
    INFO:root:Added Hulu_Plus app
    INFO:root:Added Pandora_App app
    INFO:root:Added 06ee44ee-e7e3-4249-83b6-f5d0b6f07f34 app
    INFO:root:Added 06ee44ee-e7e3-4249-83b6-f5d0b6f07f34_1 app
    INFO:root:Added Post_TV_App app
    INFO:root:Added Revision3_App app
    INFO:root:Added Songza_App app
    INFO:root:Added a7f3283b-8034-4506-83e8-4e79ab1ad794_2 app
    INFO:root:Added 2be788b9-b7e0-4743-9069-ea876d97ac20 app
    INFO:root:Added 1812335e-441c-4e1e-a61a-312ca1ead90e app
    INFO:root:Added GoogleCastSampleApp app
    INFO:root:Added GoogleCastPlayer app
    INFO:root:Added Fling app
    INFO:root:Added TicTacToe app

  3. All of the install steps seemed to work for me, but when I run the final command I see ‘INFO:root:StartingSSDP server, LEAP server, ChromeCast app, YouTube app, PlayMovies app, GoogleMusic app, GoogleCastSampleApp app, GoogleCastPlayer app, Fling app, TicTacToe app’ but nothing else happens after this. No new window, and nothing showing up on my devices as a cast device. Any thoughts on this? Win 7 x64

  4. I tried this but when i went to run the setup it goes until it says error: /usr/local/bin/leapcast: Permission denied

    • nevermind i navigated to the usr/local folder than changed the bin permissions folder permissions to read and write

      • Hi Josh, Can you please clarify what you did? When I run leapcast the server seems to be running fine, but then when I try to cast a chrome tab it says OSError: [Errno 13] Permission denied. Is this what you got?

  5. Not working for Linux. I get an error that says:

    Traceback (most recent call last):
    File “setup.py”, line 5, in
    from setuptools import setup, find_packages
    ImportError: No module named setuptools

  6. I got stuck on step 5:
    python setup.py develop

    Error message:
    Traceback (most recent call last):
    File “setup.py”, line 5, in
    from setuptools import setup, find_packages
    ImportError: No module named setuptools

    I found a solution and it works like a charm:
    sudo apt-get install git
    sudo apt-get install python-pip

    git clone https://github.com/dz0ny/leapcast.git

    cd ./leapcast

    pip install .

    leapcast –name MyLinux –chrome /usr/bin/google-chrome –fullscreen

    ——————–

    I’m running Ubuntu GNOME 13.04

  7. Shane Menshik says:

    Just a few modifications for the Windows 7/8 section! There are some errors in the original post.. Here is what needs to be changed / added.

    Step 1 Changes:

    Change download path for Python to:

    http://python.org/ftp/python/2.7.5/python-2.7.5.msi

    The one in the original instructions is 3.3

    Step 2 additional instructions:

    (Need to use powershell in order to get the command provided to work)

    From Command Prompt

    type: powershell

    then the original command will work

    type exit or close the command prompt window (Close this command prompt window so we can open a new one in the next step with the path variable changes)

    Step 3 addition –
    open command prompt again so new path variable is working

    • Shane Menshik says:

      One more update – on Windows 7 – the launch command needed to be adjusted on my machine – chrome is actually installed in my user directory.

      leapcast –name MyWindows –chrome “C:\Users\%username%\AppData\Local\Google\Chrome\Application\chrome.exe” –fullscreen

      • Thanks for the heads up, appreciate that. Fixed the download link. It worked for me when running these commands from cmd.exe and PowerShell. Yup, I tried this on a Windows 8 machine, hence that file location. Thanks again.

Leave a Reply

How to Emulate Google Chromecast on Windows, Mac and Linux Desktop

time to read: 3 min