Skip to content

Commit

Permalink
added x server options
Browse files Browse the repository at this point in the history
  • Loading branch information
LaneaLucy committed Jan 24, 2024
1 parent 709c243 commit 199d86d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions xserver/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config

Check warning on line 1 in xserver/config.yaml

View workflow job for this annotation

GitHub Actions / Lint add-on xserver

'full_access' consider using other options instead, like 'devices'

Check warning on line 1 in xserver/config.yaml

View workflow job for this annotation

GitHub Actions / Lint add-on xserver

'map' contains the 'config' folder, which has been replaced by 'homeassistant_config'. See: https://developers.home-assistant.io/blog/2023/11/06/public-addon-config
name: xserver
version: "0.1.17"
version: "0.1.18"
slug: xserver
description: X Server
url: "https://github.com/LaneaLucy/haos-addons/tree/main/xserver"
Expand All @@ -23,12 +23,14 @@ map:
options:
system_packages: []
python_packages: []
command: "firefox-esr --kiosk http://localhost:8123/"
xinit_command: "firefox-esr --kiosk http://localhost:8123/"
x_options: "-nolisten tcp"
schema:
system_packages:
- str
python_packages:
- str
command: str
xinit_command: str
x_options: str

image: ghcr.io/lanealucy/haos-addon-xserver-{arch}
10 changes: 6 additions & 4 deletions xserver/rootfs/etc/s6-overlay/s6-rc.d/xserver/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
bashio::log.info "Starting X Server..."

# Run X Server
if [[ "$(bashio::config 'command')" == "" ]] ; then
/usr/bin/X :0 -nolisten tcp vt1
if [[ "$(bashio::config 'xinit_command')" == "" ]] ; then
bashio::log.info "X command: /usr/bin/X :0 $(bashio::config 'x_options')"
/usr/bin/X :0 $(bashio::config 'x_options')
else
echo "$(bashio::config 'command')" > /usr/bin/xinit-command.sh
echo "$(bashio::config 'xinit_command')" > /usr/bin/xinit-command.sh
chmod +x /usr/bin/xinit-command.sh
/usr/bin/xinit /usr/bin/xinit-command.sh -- :0
bashio::log.info "xinit command: /usr/bin/xinit /usr/bin/xinit-command.sh -- :0 $(bashio::config 'x_options')"
/usr/bin/xinit /usr/bin/xinit-command.sh -- :0 $(bashio::config 'x_options')
fi

0 comments on commit 199d86d

Please sign in to comment.