2025-10-27 20:34:45 +00:00
2025-10-26 09:33:17 +00:00

Virtual Smart TV

Apps

Steam

Requirements:

  • Flatpak

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

Greenlight

Requirements:

  • Flatpak

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
Categories=Game;smart-tv;

Microsoft Edge

Install:

apt install software-properties-common apt-transport-https ca-certificates curl -y
curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg > /dev/null
echo 'deb [signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list
apt update -y
apt install microsoft-edge-stable -y

Run:

microsoft-edge-stable

youtube tv

Added as an edge app to https://youtbe.com/tv. added --start-fullscreen argument. Requires edge plugin "youtube tv on pc". Plugin only works correcly if other instance of edge is running for example for gamepass.

gamepass

Added as an edge app to https://www.xbox.com/play

lms player

sudo apt install squeezelite
squeezelite -o hw:0 -s lms.lan
#TV user
mkdir -p ~/.config/systemd/user
Create the unit file ~/.config/systemd/user/squeezelite.service:

[Unit]
Description=Squeezelite Player
After=network.target sound.target

[Service]
ExecStart=/usr/bin/squeezelite  -o hw:0 -s lms.lan -n office
Restart=always

[Install]
WantedBy=default.target
systemctl --user daemon-reload
systemctl --user enable --now squeezelite.service
systemctl --user status squeezelite.service

System

OS: proxmox pve (Debian Based)

Create user

useradd -Ag tv

Kde Plasma

Install:

apt install kde-plasma-desktop -y

Disable Sleep states

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

flatpak

Install:

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

pixp

Install:

sudo apt install pipx pip -y
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

AAC audio & APX

Replace pulseaudio with pipewire.

sudo apt install pipewire-audio-client-libraries libspa-0.2-bluetooth
systemctl --user enable --now pipewire pipewire-pulse
sudo apt install libfdk-aac2 libfdk-aac-dev
sudo apt install bluez
systemctl --user restart pipewire pipewire-pulse
systemctl restart bluetooth

System Patches

If your logs are flooded with repeated messages like: drkonqi-coredump-launcher.socket was skipped because of an unmet condition check

drkonqi-coredump-launcher.socket was skipped because of an unmet condition check (ConditionUser=!@system)

https://bugs.kde.org/show_bug.cgi?id=502960

systemctl --user daemon-reload
systemctl daemon-reload

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

apt install evtest -y
#check remote control events
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_name: "G20S PRO"
    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.

For now:

  • i have to execute this after each kernel update;
  • And automatic setup from original repo not working;

Instructions based on original repo readme:

apt install dkms 
apt install proxmox-headers-$(uname -r)
git clone https://github.com/stanford-scs/hid-g20s.git
cd hid-g20s
sudo mkdir -p /usr/src/hid-g20s-1.0
sudo cp hid-g20s.c Makefile dkms.conf /usr/src/hid-g20s-1.0/
sudo cp 99-hid-g20s.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo dkms add -m hid-g20s -v 1.0
sudo dkms build -m hid-g20s -v 1.0
sudo dkms install -m hid-g20s -v 1.0
sudo modprobe hid-g20s

Confirm everything is ok:

sudo lsmod | grep g20s
# ou put
# hid_g20s               12288  0
# hid                   253952  5 usbhid,hid_apple,hid_g20s,hid_generic,uhid
sudo dmesg | grep g20s
sudo lsmod | grep g20s
sudo dkms status
# hid-g20s/1.0, 6.14.11-4-pve, x86_64: installed (Original modules exist)

# check if is applied
sudo modinfo hid_g20s | grep description
# description:    G20S Bluetooth Remote H6969ID driver with fixed descriptor and key remapping

*Module loads on boot:**
echo "hid-g20s" | sudo tee /etc/modules-load.d/hid-g20s.conf
#/etc/udev/rules.d/99-hid-g20s.rules
# Automatically load hid-g20s driver for G20S Bluetooth Remote
# This rule triggers when the G20S device is detected and loads the custom driver

SUBSYSTEM=="hid", ATTRS{modalias}=="hid:b0005g0001v00001D5Ap0000C081", \
  RUN+="/sbin/modprobe hid-g20s"

# Alternative rule that matches on vendor/product ID
SUBSYSTEM=="bluetooth", ATTR{product}=="0xc081", ATTR{vendor}=="0x1d5a", \
  RUN+="/sbin/modprobe hid-g20s"

#ACTION=="add", SUBSYSTEM=="hid", ATTRS{name}=="G20S", RUN+="/sbin/modprobe -r hid_g20s; /sbin/modprobe hid_g20s"

Problem - requires restart bluetooth - after first connection for remote control to work (for example after reboot).
Remote Control must be in connected bluethooth state.

  • /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 "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=Bluetooth rebind after SDDM greeter appears
After=display-manager.service
Requires=display-manager.service
ConditionPathExists=!/run/g20s-bluetooth-rebind.done

[Service]
Type=oneshot
ExecStart=/usr/local/bin/g20s-bluetooth-rebind.sh
ExecStartPost=/bin/touch /g20s-bluetooth-rebind.done
RemainAfterExit=yes

[Install]
WantedBy=graphical.target

sudo systemctl daemon-reload
sudo systemctl enable g20s-bluetooth-rebind
sudo systemctl start g20s-bluetooth-rebind
sudo systemctl status g20s-bluetooth-rebind
Description
No description provided
Readme MIT 46 KiB