ALT Linux Distributions development
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@altlinux.org>
To: devel-distro@lists.altlinux.org
Subject: [devel-distro] [PATCH 1/2] live: add use/live/runapp
Date: Sun, 11 Sep 2022 20:33:58 +0300
Message-ID: <20220911173359.32561-2-mike@altlinux.org> (raw)
In-Reply-To: <20220911173359.32561-1-mike@altlinux.org>

Add the possibility to directly configure the desktop app
for livecd kiosk mode to start.

This should have been done as soon as livecd-runapp
hit the streets -- livecd-{0ad,fgfs} definitely must go
as adding a line into config is trivially done near
the only place that requires them (conf.d/live.mk).

TODO: might be more generally useful for vm/* too,
      take this out into a separate feature then.
---
 features.in/live/README                         |  5 +++++
 features.in/live/config.mk                      |  5 +++++
 features.in/live/live/image-scripts.d/50-runapp | 16 ++++++++++++++++
 3 files changed, 26 insertions(+)
 create mode 100755 features.in/live/live/image-scripts.d/50-runapp

diff --git a/features.in/live/README b/features.in/live/README
index 72975f5c9..58302a182 100644
--- a/features.in/live/README
+++ b/features.in/live/README
@@ -19,3 +19,8 @@
 ** перечисляет префиксы каталогов драйвров ядра для удаления
 ** значение: пусто (по умолчанию) или список через пробел
 ** см. config.mk
+
+* LIVE_RUNAPP_BINARY
+** указывает имя программы для запуска в режиме киоска
+** значение: пусто (по умолчанию) или путь (из $PATH или полный)
+** см. тж. пакеты livecd-0ad, livecd-fgfs и сам livecd-runapp
diff --git a/features.in/live/config.mk b/features.in/live/config.mk
index e6d762285..59e65b9eb 100644
--- a/features.in/live/config.mk
+++ b/features.in/live/config.mk
@@ -99,6 +99,11 @@ else
 use/live/suspend: use/live; @:
 endif
 
+# for kiosks
+use/live/runapp: use/live;
+	@$(call add,LIVE_PACKAGES,livecd-runapp)
+	@$(call xport,LIVE_RUNAPP_BINARY)
+
 # deny network/local drive access for security reasons
 use/live/privacy: use/services use/memclean use/deflogin \
 	use/stage2/ata use/stage2/drm use/stage2/hid \
diff --git a/features.in/live/live/image-scripts.d/50-runapp b/features.in/live/live/image-scripts.d/50-runapp
new file mode 100755
index 000000000..3da410108
--- /dev/null
+++ b/features.in/live/live/image-scripts.d/50-runapp
@@ -0,0 +1,16 @@
+#!/bin/sh -efu
+# see also live-0ad
+
+CONFIG=/etc/sysconfig/livecd-runapp
+
+if [ -s "$CONFIG" ]; then
+	echo "$CONFIG exists, not overriding (from $(rpm -qf "$CONFIG"))"
+	exit 0
+fi
+
+mkdir -p "$(dirname "$CONFIG")"
+cat >> "$CONFIG" << _EOF_
+# mkimage-profiles live 50-runapp hook
+BINARY=$GLOBAL_LIVE_RUNAPP_BINARY
+_EOF_
+:
-- 
2.33.3



  reply	other threads:[~2022-09-11 17:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-11 17:33 [devel-distro] [PATCH 0/2] live-blender.iso и отсюда use/live/runapp Michael Shigorin
2022-09-11 17:33 ` Michael Shigorin [this message]
2022-09-12 16:09   ` [devel-distro] [PATCH 1/2] live: add use/live/runapp Антон Мидюков
2022-09-12 16:21     ` Michael Shigorin
2022-09-12 18:17       ` Антон Мидюков
2022-09-12 18:39         ` Michael Shigorin
2022-09-11 17:33 ` [devel-distro] [PATCH 2/2] live.mk: initial distro/live-blender Michael Shigorin
2022-09-12 16:07   ` Антон Мидюков
2022-09-12 16:17     ` Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220911173359.32561-2-mike@altlinux.org \
    --to=mike@altlinux.org \
    --cc=devel-distro@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Distributions development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-distro/0 devel-distro/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-distro devel-distro/ http://lore.altlinux.org/devel-distro \
		devel-distro@lists.altlinux.org devel-distro@lists.altlinux.ru devel-distro@lists.altlinux.com
	public-inbox-index devel-distro

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-distro


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git