Skip to content

Installation Guide

Ndriçim Lahu edited this page Sep 29, 2024 · 6 revisions

Methods of installing Moonlight app on Tizen TV

Installation using Tizen Studio

The following method works for everyone, but is more recommended for users with newer Samsung TVs running Tizen OS starting from model year 2024 (Tizen 8.0) or later.

Installing the Samsung TV SDK

Samsung TV SDK is a set of tools for developing applications for Samsung TV, using Tizen. To work with Samsung TV SDK, you need to install Tizen Studio IDE, Samsung TV Extensions and Samsung Certificate Extension on your system.

Note

If you have already installed Samsung TV SDK on your Windows PC system, then you can skip the below steps.

  1. Download and run the Tizen Studio installer.
  2. In the Installer:
    • Accept the software license statement by clicking the Accept button.
    • Set the SDK and data location (leave as default) and click the Install button to start installing the required packages and tools in the specified directory.
    • After the installation is complete, open the Package Manager by checking the Launch the Package Manager box before clicking the Finish button.
  3. In the Package Manager:
    • Select the Extension SDK tab and find TV Extensions-X.X and Samsung Certificate Extension which are the required extensions.
    • Click the Install button for both extensions and accept the software license statement by clicking the Accept button.
    • After the extensions have been successfully installed, close the Package Manager by clicking the X button at the top of the window.
  4. If you want to continue with other steps, then launch the Tizen Studio by checking the Launch the Tizen Studio box before clicking the OK button.
  5. You may be prompted to select a directory as the workspace (leave as default) and launch the Tizen Studio by checking the Use this as the default and do not ask again box before clicking the Launch button.

If you need more details, check the Installing TV SDK guide by Samsung.

Importing the Moonlight app into Tizen Studio

If you have already installed Tizen Studio and the required extensions, you can continue to import the existing Tizen project into Tizen Studio by selecting the root directory or uploading an archive file.

  1. In the Tizen Studio menu:
    • Go to the File tab and select Import to open the import wizard.
  2. In the Import window:
    • Open Tizen and select Tizen Project as import source and click the Next button.
  3. Under Select Directory / File section:
    • Select the Archive file option to import the project from the archive file and click the Browse button.
    • Find the downloaded file Moonlight.wgt (e.g. which you can get from the Release tab) and click the Next button.
  4. Under Select Project section:
    • Select a Tizen TV profile tv-samsung and version X.X from the Profile and Version drop-down menus for the Moonlight project.
    • Then select the check box for the Moonlight project to prepare it for import and click the Finish button.
  5. Now the selected Moonlight project has been imported into your workspace.

If you need more details, check the Importing Web Applications guide by Samsung.

Enabling Developer Mode and Connecting the TV to the Device Manager

After you have imported the Moonlight project, then you need to enable the Developer mode and connect your Samsung TV to your computer using Device Manager which is a tool within Tizen Studio. So this allows you to run and install the application on a TV device for development.

  1. Enable the Developer mode on your Samsung TV:
    • Go to the Apps panel and press 12345 on the remote, then a dialog should popup.
    • Set Developer mode to On, then enter your computer's IP address in the Host PC IP field.
    • Restart the TV by holding the power button, then go to the Apps panel.
    • Depending on your model, a DEVELOP MODE will appear in the Apps panel at the top of the screen.
  2. Get the TV IP Address on your Samsung TV:
    • Go to the Settings panel, then go to the General section.
    • Select the Network menu, then select Network Status and click the IP Settings button.
    • Now you can get the IP address from the IP Address field.
  3. In the Tizen Studio menu:
    • Go to the Tools tab and select Device Manager to open the device manager.
  4. In the Device Manager window:
    • Select Remote Device Manager and click + to add a TV device.
    • Under the Add Device window, enter Samsung TV in the Name field and enter the IP address of your Samsung TV in the IP field.
    • Then it is recommended to leave the Port field untouched and click the Add button.
    • Under the Remote Device Manager window, select the TV from the list and switch the connection to On and click the Close button.
  5. Once you have successfully connected the TV with Device Manager, close Device Manager by clicking the X button at the top of the window.

If you need more details, check the TV Device guide by Samsung.

Creating and Signing the Certificate Profile

After completing the previous steps, you need to create and sign the certificate profile in order to run the application on your Samsung TV. This step is essential for signing the application for development and distribution.

Note

Before proceeding further with creating and signing the certificate profile, you must have already imported the Moonlight app, enabled developer mode, and connected your target TV device.

  1. In the Tizen Studio menu:
    • Go to the Tools tab and select Certificate Manager to open the certificate wizard.
    • You may be prompted to select a profile file for import, so you should click the Cancel button in the Migration for Certificate Profile dialog.
  2. In the Certificate Manager window:
    • Click + in the Certificate Profile and select Samsung as certificate profile type.
  3. Under Device Type section:
    • Select TV as the device type and click the Next button.
  4. Under Certificate Profile section:
    • Enter Moonlight in the Create a new certificate profile field and click the Next button.
  5. Under Author Certificate section:
    • Select Create a new author certificate option and click the Next button.
    • Enter Moonlight in the Author name field and Mgs12345 in both Password fields.
    • Ensure the Apply the same password for the distributor certificate box is checked before clicking the Next button.
    • You will be asked to sign in with your Samsung Account, so you need to click the OK button.
    • After successful login, you can close the browser window and continue to the Certificate Manager window.
    • Then you need to define a certificate backup path for your certificate file in the Backup path field (e.g. C:\Users\USERNAME\Documents\Tizen Certificate Backup) and click the Next button.
  6. Under Distributor Certificate section:
    • Select Create a new distributor certificate and click the Next button.
    • Set the privilege level to Public and leave the Password fields untouched.
    • Select the Add individual DUIDs option, then the Device ID (DUID) for the target device will be added automatically, because you have already connected the TV with Device Manager, so you need to continue by clicking the Next button.
    • After completing the distributor certificate, you can close the certificate profile creation wizard by clicking the Finish button.
    • A new dialog will appear with the message telling you that your new certificate profile has been successfully created and set as active, so you need to click the OK button.
  7. After you have successfully added and signed the Moonlight certificate profile, close the Certificate Manager by clicking the Close button.

If you need more details, check the Creating Certificates guide by Samsung.

Installing the Moonlight app on TV using Tizen Studio

If you have completed all the previous steps, then you can install the Moonlight app on the target device. This step is important to install and launch the application on the connected device.

Note

Before proceeding further with the installation of the Moonlight app, you must have already completed the previous steps, as well as created and signed your certificate profile.

  1. Ensure you have enabled Developer mode and the TV is already connected using Device Manager before proceeding further.
  2. In the Project Explorer view:
    • Click on the Moonlight project, then open the config.xml file and rename the Icon field from ./icons/icon128.png to icon.png as the icon source.
    • Next you need to right-click on the Moonlight project, then go to Run As and select Tizen Web Application as the launch mode.
  3. The installation process will start after a few seconds, so you should wait until it is finished. After that, close Tizen Studio by going to File tab and select Exit option.
  4. Now the Moonlight app will automatically open on the target device and can be found under Recent Apps on your Samsung TV.

If you need more details, check the Launching Applications on the TV guide by Samsung.

Installation using Docker image

The following method is recommended for users with older Samsung TVs running Tizen OS starting from model year 2020 (Tizen 5.5) to 2023 (Tizen 7.0).

Installing the Windows Subsystem for Linux (WSL 2)

WSL 2 is the default distro type when installing a Linux distribution and uses virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). This step is essential for running Docker Desktop because it enables executing Linux containers on Windows PC through the native WSL 2 Linux kernel.

Note

If you have already installed WSL 2 on your Windows PC system, then you can skip the below steps.

  1. Open the Start menu, type Windows Features in the search bar, and click Turn Windows features on or off from the search results, and the Windows Features window will open:
    • Find the Windows Subsystem for Linux and Virtual Machine Platform features and enable both by checking the boxes.
    • After enabling the required features, click the OK button and restart your system.
  2. Open the Start menu, type Windows PowerShell in the search bar, and right-click Windows PowerShell from the search results and select Run as administrator.
    • You may be prompted by User Account Control (UAC), so you need to click Yes to allow it to run with administrative privileges.
  3. In the Windows PowerShell window:
    • Enter command dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart to enable Windows Subsystem for Linux feature, then restart your system.
    • After that, enter command dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart to enable Virtual Machine Platform feature, then restart your system again.
  4. Now you need to download the latest WSL 2 Linux kernel update package here:
    • Double-click on wsl_update_x64.msi to run the installer, then you will be prompted for elevated permissions, where you must select Yes to approve this installation.
    • Once the installation is complete, proceed to the next step by running Windows PowerShell with administrative privileges.
    • After that, enter the command wsl --set-default-version 2 to set WSL 2 as the default version when installing a new Linux distribution.
  5. Alternatively, you can download WSL 2 from the Microsoft Store which has more frequent updates using the command wsl.exe --install, then you can update the WSL 2 package using the following command wsl.exe --update under the Windows PowerShell window, but still the first option is more recommended.
  6. You have successfully installed WSL 2 and now you can install your favorite Linux distribution.

If you need more details, check the Manual installation steps of WSL guide by Microsoft.

Installing the Docker Desktop

Docker Desktop is an easy-to-install application for your Mac, Windows or Linux environment that enables you to build and share containerized applications and microservices. This step is important to build or use the pre-built Docker image to install the application on the connected device.

Note

Before proceeding further with installing Docker Desktop as your preferred Linux distribution, you should already have WSL 2 installed on your Windows PC.

  1. Download and run the Docker Desktop installer.
  2. In the Installer:
    • Under Configuration section, select the Use WSL 2 instead of Hyper-V and Add shortcut to desktop options.
    • Click the OK button and follow the instructions in the installation wizard to authorize the installer and continue.
    • When the installation is complete, click the Close and restart button to complete the installation process by closing the installer and restarting the system.
  3. Open Docker Desktop, then a new window will appear as Docker Subscription Service Agreement", then you need to click the Accept` button to continue.
  4. Now Docker Desktop will start normally and then you can skip creating an account to use Docker as it is optional.
  5. Open Docker Desktop, then a new window will display the Docker Subscription Service Agreement, then you need to click the Accept button to continue opening Docker Desktop.

If you need more details, check the Install Docker Desktop on Windows guide by Docker.

Installing the Moonlight app on TV using Docker image

If you have completed all the previous steps, then you can install the Moonlight app on the target device. This step is important to install the application using the pre-built Docker image and launch it on the connected device.

Note

Before proceeding further with the installation of the Moonlight app, you must already have WSL 2 and Docker Desktop installed on your Windows PC.

  1. Enable the Developer mode on your Samsung TV:
    • Go to the Apps panel and press 12345 on the remote, then a dialog should popup.
    • Set Developer mode to On, then enter your computer's IP address in the Host PC IP field.
    • Restart the TV by holding the power button, then go to the Apps panel.
    • Depending on your model, a DEVELOP MODE will appear in the Apps panel at the top of the screen.
  2. Get the TV IP Address on your Samsung TV:
    • Go to the Settings panel, then go to the General section.
    • Select the Network menu, then select Network Status and click the IP Settings button.
    • Now you can get the IP address from the IP Address field.
  3. Now, you need to run Docker Desktop and make sure to close any resource intensive applications.
  4. Open Windows PowerShell or a similar terminal depending on your OS, then enter the following command to pull the pre-built Docker image:
    docker pull ghcr.io/ndriqimlahu/moonlight-tizen:master
    
    • This operation may take a while, please be patient.
  5. After that, in Windows PowerShell, enter the following command to run and enter the container:
    docker run -it --rm ghcr.io/ndriqimlahu/moonlight-tizen:master
    
  6. After that, in Windows PowerShell, follow the steps below to install the application on your TV:
    • Enter the following command to connect to your Samsung TV over SDB (Smart Development Bridge):
    sdb connect YOUR_TV_IP
    

    Note: Replace YOUR_TV_IP with IP Address of your TV.

    • Next, enter the following command to confirm that you are connected, then take note of the Device ID:
    sdb devices
    

    Note: Just to clarify Device ID will be the last column, something like UE55AU7172UXXH.

    • Next, enter the following command to install the package:
    tizen install -n Moonlight.wgt -t YOUR_DEVICE_ID
    

    Note: Replace YOUR_DEVICE_ID with Device ID of your TV.

    • Next, enter the following command to exit the container:
    exit
    

    Note: Moonlight should now be available under Recent Apps on your Samsung TV.

  7. Finally, in Windows PowerShell, enter the following command to remove the Docker image, as it is no longer needed:
    docker image rm ghcr.io/ndriqimlahu/moonlight-tizen:master
    

    Note: At the end you can enter the exit command to close the Windows PowerShell window.

  8. (Optional) Disable the Developer mode on your Samsung TV:
    • Go to the Apps panel and press 12345 on the remote, then a dialog should popup.
    • Set Developer mode to Off and then click the OK button to close the dialog.
    • Restart the TV by holding the power button, then go to the Apps panel.
    • Depending on your model, a DEVELOP MODE will disappear from the Apps panel at the top of the screen.