From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Branch: master
added couple of demo XWindow apps
Signed-off-by: Waldemar Kozaczuk <
jwkoz...@gmail.com>
---
diff --git a/Xapps/.gitignore b/Xapps/.gitignore
--- a/Xapps/.gitignore
+++ b/Xapps/.gitignore
@@ -0,0 +1 @@
+usr.manifest
diff --git a/Xapps/Makefile b/Xapps/Makefile
--- a/Xapps/Makefile
+++ b/Xapps/Makefile
@@ -0,0 +1,22 @@
+.PHONY: module clean
+
+SRC = $(shell readlink -f ../..)
+
+xauthority_path := $(shell echo $$XAUTHORITY)
+
+xclock_path := $(shell which xclock)
+xeyes_path := $(shell which xeyes)
+xlogo_path := $(shell which xlogo)
+xcalc_path := $(shell which xcalc)
+
+module:
+ cp usr.manifest.skel usr.manifest
+ echo '/.Xauthority: $(xauthority_path)' >> usr.manifest
+ $(SRC)/scripts/manifest_from_host.sh $(xclock_path) >> usr.manifest
+ echo '/xclock: $(xclock_path)' >> usr.manifest
+ echo '/xeyes: $(xeyes_path)' >> usr.manifest
+ echo '/xlogo: $(xlogo_path)' >> usr.manifest
+ echo '/xcalc: $(xcalc_path)' >> usr.manifest
+
+clean:
+ rm usr.manifest
diff --git a/Xapps/README.md b/Xapps/README.md
--- a/Xapps/README.md
+++ b/Xapps/README.md
@@ -0,0 +1,7 @@
+Couple of XWindow apps like xclock, etc to demonstrate it works on OSv.
+
+Please make sure that XWindows manager on your host is configured to accept TCP
+based communication (should see '-listen tcp' when listing Xorg process).
+
+It also needs to be able to accept cookie based authentication (aka xauth).
+Please see
https://zweije.home.xs4all.nl/xauth-6.html for details.
diff --git a/Xapps/module.py b/Xapps/module.py
--- a/Xapps/module.py
+++ b/Xapps/module.py
@@ -0,0 +1,10 @@
+from osv.modules import api
+
+api.require('fonts')
+
+common_prefix = '--env=XAUTHORITY=/.Xauthority --env=DISPLAY=192.168.122.1:0.0'
+
+default = api.run(cmdline='%s /xclock -digital -fg red -bg black -update 1 -face "Arial Black-25:bold"' % common_prefix)
+logo = api.run(cmdline='%s /xlogo' % common_prefix)
+calc = api.run(cmdline='%s /xcalc' % common_prefix)
+eyes = api.run(cmdline='%s /xeyes' % common_prefix)
diff --git a/Xapps/usr.manifest.skel b/Xapps/usr.manifest.skel
--- a/Xapps/usr.manifest.skel
+++ b/Xapps/usr.manifest.skel
@@ -0,0 +1,9 @@
+#
+# Copyright (C) 2020 Waldemar Kozaczuk
+#
+# This work is open source software, licensed under the terms of the
+# BSD license as described in the LICENSE file in the top-level directory.
+#
+
+[manifest]
+/usr/share/X11/locale/**: /usr/share/X11/locale/**