2025-10-26 09:38:46 +00:00
2025-10-26 09:33:17 +00:00
2025-10-26 09:38:46 +00:00

Virtual Smart TV

Apps

Steam

Requirements:

  • Flatkpak

Install:

flatpak install flathub com.valvesoftware.Steam

Run:

flatpak run com.valvesoftware.Steam

Desktop app:

  • ~/.local/share/applications/steam.desktop
[Desktop Entry]
Type=Application
Name=Steam
Exec=flatpak run --command=steam com.valvesoftware.Steam --steamos
Icon=steam
Type=Application
Categories=Game;virtual-smart-tv;

Greenlight

Requirements:

  • Flatkpak

Install:

flatpak install flathub io.github.unknownskl.greenlight

Run:

flatpak run io.github.unknownskl.greenlight

Desktop app:

  • ~/.local/share/applications/greenlight.desktop
[Desktop Entry]
Type=Application
Name=GreenLight
Exec=flatpak run io.github.unknownskl.greenlight &
Icon=/home/mf/.local/share/waydroid/data/icons/com.android.vending.png

youtube tv

  • ~/scripts/start-youtube.sh
#
#!/bin/bash
chromium --kiosk "https://www.youtube.com/tv?disable_polymer=true&vq=hd1080&persist_quality=true" \
  --user-agent="Mozilla/5.0 (Linux; Android 10; SHIELD Android TV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36" \
  --noerrdialogs --disable-infobars --disable-session-crashed-bubble \
  --autoplay-policy=no-user-gesture-required --start-fullscreen &
  • /.local/share/applications/youtube.desktop
[Desktop Entry]
Type=Application
Name=YouTube
Exec=/home/mf/scripts/start-youtube.sh &
Icon=/home/mf/.local/share/waydroid/data/icons/com.android.vending.png

gamepass

  • ~/scripts/start-gamepass.sh
#!/bin/bash
edge start msedge --profile-directory="GamePass" --app=https://www.xbox.com/play --start-fullscreen
  • /.local/share/applications/gamepass.desktop
[Desktop Entry]
Type=Application
Name=YouTube
Exec=/home/mf/scripts/start-gamepass.sh &
Icon=/home/mf/.local/share/waydroid/data/icons/com.android.vending.png

System

OS: proxmox pve (Debian Based)

Kde Plasma

Install:

sudo sudo apt install kde-plasma

Flatkpak

Install:

sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

pixp

Install:

sudo apt install pipx pip
sudo mkdir -p /opt/virtual-smart-tv/pipx
sudo mkdir -p /opt/virtual-smart-tv/pipx/venvs
sudo mkdir -p /opt/virtual-smart-tv/pipx/bin
sudo chmod -R 755 /opt/pipx
# /etc/environment
PIPX_HOME="/opt/virtual-smart-tv/pipx/venvs"
PIPX_BIN_DIR="/opt/virtual-smart-tv/pipx/bin"
# /etc/profile.d/pipx.sh
export PIPX_HOME="/opt/virtual-smart-tv/pipx/venvs"
export PIPX_BIN_DIR="/opt/virtual-smart-tv/pipx/bin"
export PATH="$PIPX_BIN_DIR:$PATH"
sudo chmod +x /etc/profile.d/pipx.sh

G20S PRO - Remote Control

keys remaps

  • button - home - KEY_HOME - Present Windows (Current Desktop)
  • button - light - KEY_COMPOSE -> KEY_LEFTMETA -> Andromeda launcher
  • button - back - KEY_BACK -> KEY_ESC : So navigation on youtube and other apps is possible

On kde settings-> keyboard -> shortcuts KWin -> Present Windows (Current Desktop) - set remote control key - Home

Setup

evtest

sudo apt instal evtest
#check remote control events
sudo evtest

evdevremapkeys

Install:

sudo env PIPX_HOME=/opt/virtual-smart-tv/pipx/venvs \
         PIPX_BIN_DIR=/opt/virtual-smart-tv/pipx/bin \
         pipx install evdevremapkeys
sudo /opt/virtual-smart-tv/pipx/bin/evdevremapkeys  --list-devices | grep G20S

/opt/virtual-smart-tv/evdevremapkeys.config:

devices:
  - input_phys: "b4:8c:9d:4f:e8:98" # set value from sudo $(which evdevremapkeys)  --list-devices | grep G20S
    output_name: "G20S PRO Remapped"
    remappings:
      KEY_BACK:
        - KEY_ESC
      KEY_COMPOSE:
        - KEY_LEFTMETA

Test Configuration:

sudo /opt/virtual-smart-tv/pipx/bin/evdevremapkeys --config /opt/virtual-smart-tv/evdevremapkeys.config

Register as service:

# /etc/systemd/system/g20s-bluetooth-keys-remap.service
[Unit]
Description=Remap G20S buttons

[Service]
Environment="PIPX_HOME=/opt/virtual-smart-tv/pipx/venvs" 
Environment="PIPX_BIN_DIR=/opt/virtual-smart-tv/pipx/bin" 
ExecStart=/opt/virtual-smart-tv/pipx/bin/evdevremapkeys --config /opt/virtual-smart-tv/evdevremapkeys.config

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable g20s-bluetooth-keys-remap
sudo systemctl start g20s-bluetooth-keys-remap
sudo systemctl status g20s-bluetooth-keys-remap

HID definition - Patch and Rebind

Thanks for: https://github.com/stanford-scs/hid-g20s, for the real solution.

sudo apt install dkms 
sudo apt install evtest
#sudo apt install dkms linux-headers-$(uname -r)
sudo apt install proxmox-headers-$(uname -r)
git clone https://github.com/stanford-scs/hid-g20s.git
cd hid-g20s
sudo ./install.sh
# should show the device and basic remote functions should be working

cat /proc/bus/input/devices | grep G20S
#N: Name="G20S PRO"
sudo lsmod | grep g20s
# hid_g20s               12288  0
# hid                   253952  5 usbhid,hid_apple,hid_g20s,hid_generic,uhid
sudo dmesg | grep g20s
sudo lsmod | grep g20s
sudo evtest | grep G20S
sudo dkms status
# hid-g20s/1.0, 6.14.11-4-pve, x86_64: installed (Original modules exist)

Module loads on boot:*

echo "hid-g20s" | sudo tee /etc/modules-load.d/hid-g20s.conf
sudo systemctl restart bluetooth

Problem requires restart bluetooth after first connection to control for work (for example after reboot). Even service on boot not working correctly. For now create desktop shortcut so i can run after reboot.

  • /usr/local/bin/g20s-bluetooth-rebind.sh
#!/bin/bash

REMOTE_MAC="00:00:00:00:00:00"  # Replace with your remote's MAC

echo "starting..."

# Wait until the remote is connected
until bluetoothctl info "$REMOTE_MAC" | grep -q "Connected: yes"; do
  echo "Waiting for connection..."
  sleep 2
done


echo "Connected! sleep so restart happen only after full connection"
sleep 30

echo "Restarting Bluethooth"
# Restart Bluetooth to trigger HID rebind
systemctl restart bluetooth
chmod +x /usr/local/bin/g20s-bluetooth-rebind.sh
# /etc/systemd/system/g20s-bluetooth-rebind.service
[Unit]
Description=Restart Bluetooth after G20S remote connects

[Service]
Type=oneshot
ExecStart=/usr/local/bin/g20s-bluetooth-rebind.sh


[Install]
WantedBy=multi-user.target
Description
No description provided
Readme MIT 46 KiB