Compare commits

...

No commits in common. "c9-beta" and "c10s" have entirely different histories.

20 changed files with 2186 additions and 1505 deletions

17
.gitignore vendored
View File

@ -1 +1,16 @@
SOURCES/gnome-kiosk-40.0.tar.xz
/gnome-kiosk-40.alpha.tar.xz
/gnome-kiosk-40.0.tar.xz
/gnome-kiosk-41.beta.tar.xz
/gnome-kiosk-41.0.tar.xz
/gnome-kiosk-42.alpha.tar.xz
/gnome-kiosk-42.0.tar.xz
/gnome-kiosk-43.0.tar.xz
/gnome-kiosk-44.beta.tar.xz
/gnome-kiosk-44.rc.tar.xz
/gnome-kiosk-44.0.tar.xz
/gnome-kiosk-45.rc.tar.xz
/gnome-kiosk-45.0.tar.xz
/gnome-kiosk-46.0.tar.xz
/gnome-kiosk-47.alpha.tar.xz
/gnome-kiosk-47.rc.tar.xz
/gnome-kiosk-47.0.tar.xz

View File

@ -1 +0,0 @@
7299ed3df18e96a6258a22e88b6418dc578ac8bb SOURCES/gnome-kiosk-40.0.tar.xz

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,99 @@
From 67cb8748dbc8c237d7b7486c7cec9e7902dcb51f Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Mon, 7 Oct 2024 18:09:32 +0200
Subject: [PATCH] kiosk-app: Do not add the window in
kiosk_app_new_for_window()
When a window has no matching application (like, when there is no
corresponding desktop file), a KioskApp is created for the window and
the window would be added to the newly-created KioskApp.
However, by doing so, we add the window before the calling window
tracker had a change to setup the state notify handler.
As a result, the window tracker is never notified of the state change
and the KioskApp is never added to the list of running applications in
the KioskAppState.
Too bad, since the introspection iterates on the running applications to
report the windows.
To avoid the issue, simply do not add the window so soon in
kiosk_app_new_for_window(), it will be added in time in track_window()
and the notifications will be correctly triggered.
Fixes: commit 50ae635dc - kiosk-app: Add a new KioskApp class
---
compositor/kiosk-app.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/compositor/kiosk-app.c b/compositor/kiosk-app.c
index acc9d9e..5b19e4e 100644
--- a/compositor/kiosk-app.c
+++ b/compositor/kiosk-app.c
@@ -441,62 +441,60 @@ kiosk_app_remove_window (KioskApp *app,
if (!meta_window_is_skip_taskbar (window))
app->running_state->number_of_interesting_windows--;
kiosk_app_sync_running_state (app);
if (app->running_state->windows == NULL)
g_clear_pointer (&app->running_state, unref_running_state);
g_signal_handlers_disconnect_by_func (window,
G_CALLBACK (kiosk_app_on_user_time_changed),
app);
g_signal_handlers_disconnect_by_func (window,
G_CALLBACK (kiosk_app_on_skip_taskbar_changed),
app);
g_object_unref (window);
g_signal_emit (app, kiosk_app_signals[WINDOWS_CHANGED], 0);
}
KioskApp *
kiosk_app_new_for_window (KioskCompositor *compositor,
MetaWindow *window)
{
KioskApp *app;
app = g_object_new (KIOSK_TYPE_APP, "compositor", compositor, NULL);
app->window_id_string = g_strdup_printf ("window:%d",
meta_window_get_stable_sequence (window));
- kiosk_app_add_window (app, window);
-
return app;
}
KioskApp *
kiosk_app_new (KioskCompositor *compositor,
GDesktopAppInfo *info)
{
KioskApp *app;
app = g_object_new (KIOSK_TYPE_APP,
"compositor", compositor, "app-info", info, NULL);
return app;
}
const char *
kiosk_app_get_sandbox_id (KioskApp *app)
{
KioskAppWindowIter iter;
MetaWindow *window;
kiosk_app_window_iter_init (&iter, app);
while (kiosk_app_window_iter_next (&iter, &window)) {
const char *sandbox_id = meta_window_get_sandboxed_app_id (window);
if (sandbox_id)
return sandbox_id;
}
return NULL;
--
2.46.0

View File

@ -0,0 +1,56 @@
From 9497651214baaae6dabe7cc1971a1799633983a6 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Fri, 22 Nov 2024 17:04:09 +0100
Subject: [PATCH] kiosk-script: Copy and run the script from XDG_RUNTIME_DIR
Some setup may enforce the noexec flag on the HOME directories.
That prevents any executable placed in the HOME directory from running,
including the GNOME Kiosk script session.
To work around such an issue, copy and execute the script from the
XDG_RUNTIME_DIR instead.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
---
kiosk-script/gnome-kiosk-script | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/kiosk-script/gnome-kiosk-script b/kiosk-script/gnome-kiosk-script
index e45438d..c4ab176 100755
--- a/kiosk-script/gnome-kiosk-script
+++ b/kiosk-script/gnome-kiosk-script
@@ -1,8 +1,10 @@
#!/usr/bin/sh
-if [ ! -e ~/.local/bin/gnome-kiosk-script ]; then
- mkdir -p ~/.local/bin ~/.config
- cat > ~/.local/bin/gnome-kiosk-script <<- "EOF"
+EXECDIR=~/.local/bin
+
+if [ ! -e $EXECDIR/gnome-kiosk-script ]; then
+ mkdir -p $EXECDIR ~/.config
+ cat > $EXECDIR/gnome-kiosk-script <<- "EOF"
#!/bin/sh
# This script is located in ~/.local/bin.
# It's provided as an example script to show how
@@ -16,8 +18,14 @@ if [ ! -e ~/.local/bin/gnome-kiosk-script ]; then
exec "$0" "$@"
EOF
- chmod +x ~/.local/bin/gnome-kiosk-script
+ chmod +x $EXECDIR/gnome-kiosk-script
touch ~/.config/gnome-initial-setup-done
fi
-exec ~/.local/bin/gnome-kiosk-script "$@"
+# Copy and run the script from the XDG_RUNTIME_DIR directory if that exists
+if [ -d $XDG_RUNTIME_DIR ]; then
+ cp $EXECDIR/gnome-kiosk-script $XDG_RUNTIME_DIR/
+ EXECDIR=$XDG_RUNTIME_DIR
+fi
+
+exec $EXECDIR/gnome-kiosk-script "$@"
--
2.47.1

View File

@ -0,0 +1,29 @@
From fb932adc99bb0b73567674ff905782a642b9b12e Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Thu, 12 Dec 2024 14:05:04 +0100
Subject: [PATCH] search-app: Use firefox from flatpak
Firefox is being installed through flatpak these days, adjust the search
appliance to use flatpak instead of invoking firefox directly.
https://issues.redhat.com/browse/RHEL-36521
---
search-app/org.gnome.Kiosk.SearchApp.desktop.in.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/search-app/org.gnome.Kiosk.SearchApp.desktop.in.in b/search-app/org.gnome.Kiosk.SearchApp.desktop.in.in
index 360e6df..4416353 100644
--- a/search-app/org.gnome.Kiosk.SearchApp.desktop.in.in
+++ b/search-app/org.gnome.Kiosk.SearchApp.desktop.in.in
@@ -2,7 +2,7 @@
Type=Application
Name=Search Appliance
Comment=Sample Search Appliance Application for GNOME Kiosk
-Exec=@bindir@/firefox --kiosk --private-window --new-instance https://www.google.com
+Exec=@bindir@/flatpak run --command=firefox --file-forwarding org.mozilla.firefox --kiosk --private-window --new-instance https://www.google.com
Categories=GNOME;GTK;Core;
OnlyShowIn=GNOME;
NoDisplay=true
--
2.47.1

View File

@ -0,0 +1,892 @@
From 0ab97a3be415e7cc3937d68fd66a421f96f45417 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Fri, 24 Jan 2025 09:41:04 +0100
Subject: [PATCH 2/2] compositor: Add Shell Screenshot support
Add support for the org.gnome.Shell.Screenshot DBus API which is
required by the desktop portals.
Not all of the org.gnome.Shell.Screenshot API is implemented though,
only the non-interactive part which require no UI interaction are
currently available. Also missing is the pick-color API.
To have access to the Shell screenshot API from all other clients,
gnome-kiosk needs to be started in unsafe mode (using the command line
option "--unsafe-mode").
Part-of: <https://gitlab.gnome.org/GNOME/gnome-kiosk/-/merge_requests/61>
(cherry picked from commit 5338c8ab454b8cad607e2f696a9a352b375dff0d)
---
compositor/kiosk-compositor.c | 4 +
compositor/kiosk-shell-screenshot-service.c | 599 ++++++++++++++++++
compositor/kiosk-shell-screenshot-service.h | 23 +
.../org.gnome.Shell.Screenshot.xml | 161 +++++
meson.build | 12 +
5 files changed, 799 insertions(+)
create mode 100644 compositor/kiosk-shell-screenshot-service.c
create mode 100644 compositor/kiosk-shell-screenshot-service.h
create mode 100644 dbus-interfaces/org.gnome.Shell.Screenshot.xml
diff --git a/compositor/kiosk-compositor.c b/compositor/kiosk-compositor.c
index d5a2b64..8432a24 100644
--- a/compositor/kiosk-compositor.c
+++ b/compositor/kiosk-compositor.c
@@ -24,6 +24,7 @@
#include "kiosk-app-system.h"
#include "kiosk-window-tracker.h"
#include "kiosk-shell-introspect-service.h"
+#include "kiosk-shell-screenshot-service.h"
#include "org.gnome.DisplayManager.Manager.h"
@@ -46,6 +47,7 @@ struct _KioskCompositor
KioskAppSystem *app_system;
KioskWindowTracker *tracker;
KioskShellIntrospectService *introspect_service;
+ KioskShellScreenshotService *screenshot_service;
};
enum
@@ -250,6 +252,8 @@ kiosk_compositor_start (MetaPlugin *plugin)
self->tracker = kiosk_window_tracker_new (self, self->app_system);
self->introspect_service = kiosk_shell_introspect_service_new (self);
kiosk_shell_introspect_service_start (self->introspect_service, &error);
+ self->screenshot_service = kiosk_shell_screenshot_service_new (self);
+ kiosk_shell_screenshot_service_start (self->screenshot_service, &error);
if (error != NULL) {
g_debug ("KioskCompositor: Could not start D-Bus service: %s", error->message);
diff --git a/compositor/kiosk-shell-screenshot-service.c b/compositor/kiosk-shell-screenshot-service.c
new file mode 100644
index 0000000..a961905
--- /dev/null
+++ b/compositor/kiosk-shell-screenshot-service.c
@@ -0,0 +1,599 @@
+#include "config.h"
+#include "kiosk-shell-screenshot-service.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <meta/display.h>
+#include <meta/meta-context.h>
+
+#include "kiosk-compositor.h"
+#include "kiosk-screenshot.h"
+
+#define KIOSK_SHELL_SCREENSHOT_SERVICE_BUS_NAME "org.gnome.Shell.Screenshot"
+#define KIOSK_SHELL_SCREENSHOT_SERVICE_OBJECT_PATH "/org/gnome/Shell/Screenshot"
+
+struct _KioskShellScreenshotService
+{
+ KioskShellScreenshotDBusServiceSkeleton parent;
+
+ /* weak references */
+ KioskCompositor *compositor;
+ MetaDisplay *display;
+ MetaContext *context;
+
+ /* strong references */
+ GCancellable *cancellable;
+ KioskScreenshot *screenshot;
+
+ /* handles */
+ guint bus_id;
+};
+
+struct KioskShellScreenshotCompletion
+{
+ KioskShellScreenshotDBusService *service;
+ GDBusMethodInvocation *invocation;
+
+ gpointer data;
+};
+
+enum
+{
+ PROP_COMPOSITOR = 1,
+ NUMBER_OF_PROPERTIES
+};
+
+static GParamSpec *kiosk_shell_screenshot_service_properties[NUMBER_OF_PROPERTIES] = { NULL, };
+
+static void kiosk_shell_screenshot_dbus_service_interface_init (KioskShellScreenshotDBusServiceIface *interface);
+
+G_DEFINE_TYPE_WITH_CODE (KioskShellScreenshotService,
+ kiosk_shell_screenshot_service,
+ KIOSK_TYPE_SHELL_SCREENSHOT_DBUS_SERVICE_SKELETON,
+ G_IMPLEMENT_INTERFACE (KIOSK_TYPE_SHELL_SCREENSHOT_DBUS_SERVICE,
+ kiosk_shell_screenshot_dbus_service_interface_init));
+
+static void kiosk_shell_screenshot_service_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *param_spec);
+
+static void kiosk_shell_screenshot_service_constructed (GObject *object);
+static void kiosk_shell_screenshot_service_dispose (GObject *object);
+
+static void
+kiosk_shell_screenshot_service_class_init (KioskShellScreenshotServiceClass *shell_service_class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (shell_service_class);
+
+ object_class->constructed = kiosk_shell_screenshot_service_constructed;
+ object_class->set_property = kiosk_shell_screenshot_service_set_property;
+ object_class->dispose = kiosk_shell_screenshot_service_dispose;
+
+ kiosk_shell_screenshot_service_properties[PROP_COMPOSITOR] =
+ g_param_spec_object ("compositor",
+ NULL,
+ NULL,
+ KIOSK_TYPE_COMPOSITOR,
+ G_PARAM_CONSTRUCT_ONLY
+ | G_PARAM_WRITABLE
+ | G_PARAM_STATIC_NAME);
+ g_object_class_install_properties (object_class,
+ NUMBER_OF_PROPERTIES,
+ kiosk_shell_screenshot_service_properties);
+}
+
+static void
+kiosk_shell_screenshot_service_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *param_spec)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+
+ switch (property_id) {
+ case PROP_COMPOSITOR:
+ g_set_weak_pointer (&self->compositor, g_value_get_object (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, param_spec);
+ break;
+ }
+}
+
+static void
+kiosk_shell_screenshot_service_dispose (GObject *object)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+
+ kiosk_shell_screenshot_service_stop (self);
+
+ g_clear_object (&self->screenshot);
+ g_clear_weak_pointer (&self->context);
+ g_clear_weak_pointer (&self->display);
+ g_clear_weak_pointer (&self->compositor);
+
+ G_OBJECT_CLASS (kiosk_shell_screenshot_service_parent_class)->dispose (object);
+}
+
+static void
+kiosk_shell_screenshot_service_constructed (GObject *object)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+
+ self->screenshot = kiosk_screenshot_new (self->compositor);
+
+ g_set_weak_pointer (&self->display, meta_plugin_get_display (META_PLUGIN (self->compositor)));
+ g_set_weak_pointer (&self->context, meta_display_get_context (self->display));
+
+ G_OBJECT_CLASS (kiosk_shell_screenshot_service_parent_class)->constructed (object);
+}
+
+static gboolean
+kiosk_shell_screenshot_check_access (KioskShellScreenshotService *self,
+ const char *client_unique_name)
+{
+ GValue value = G_VALUE_INIT;
+ gboolean unsafe_mode;
+
+ g_object_get_property (G_OBJECT (self->context), "unsafe-mode", &value);
+ unsafe_mode = g_value_get_boolean (&value);
+ g_debug ("KioskShellScreenshotService: unsafe-mode is %s",
+ unsafe_mode ? "TRUE" : "FALSE");
+
+ return unsafe_mode;
+}
+
+static void
+completion_dispose (struct KioskShellScreenshotCompletion *completion)
+{
+ g_object_unref (completion->service);
+ g_object_unref (completion->invocation);
+ g_free (completion->data);
+
+ g_free (completion);
+}
+
+static struct KioskShellScreenshotCompletion *
+completion_new (KioskShellScreenshotDBusService *service,
+ GDBusMethodInvocation *invocation,
+ const char *filename)
+{
+ struct KioskShellScreenshotCompletion *completion;
+
+ completion = g_new0 (struct KioskShellScreenshotCompletion, 1);
+ completion->service = g_object_ref (service);
+ completion->invocation = g_object_ref (invocation);
+ completion->data = g_strdup (filename);
+
+ return completion;
+}
+
+static gboolean
+kiosk_shell_screenshot_service_handle_flash_area (KioskShellScreenshotDBusService *object,
+ GDBusMethodInvocation *invocation,
+ gint arg_x,
+ gint arg_y,
+ gint arg_width,
+ gint arg_height)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+ const char *client_unique_name = g_dbus_method_invocation_get_sender (invocation);
+
+ g_debug ("KioskShellScreenshotService: Handling FlashArea(x=%i, y=%i, w=%i, h=%i) from %s",
+ arg_x, arg_y, arg_width, arg_height, client_unique_name);
+
+ if (!kiosk_shell_screenshot_check_access (self, client_unique_name)) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Permission denied");
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_NOT_SUPPORTED,
+ "FlashArea is not supported");
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+}
+
+static gboolean
+kiosk_shell_screenshot_service_handle_interactive_screenshot (KioskShellScreenshotDBusService *object,
+ GDBusMethodInvocation *invocation)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+ const char *client_unique_name = g_dbus_method_invocation_get_sender (invocation);
+
+ g_debug ("KioskShellScreenshotService: Handling InteractiveScreenshot() from %s",
+ client_unique_name);
+
+ if (!kiosk_shell_screenshot_check_access (self, client_unique_name)) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Permission denied");
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_NOT_SUPPORTED,
+ "InteractiveScreenshot is not supported");
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+}
+
+static void
+screenshot_ready_callback (GObject *source_object,
+ GAsyncResult *result,
+ gpointer data)
+{
+ struct KioskShellScreenshotCompletion *completion = data;
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (completion->service);
+ g_autoptr (GError) error = NULL;
+ gboolean success = TRUE;
+
+ kiosk_screenshot_screenshot_finish (self->screenshot,
+ result,
+ NULL,
+ &error);
+
+ if (error) {
+ g_warning ("Screenshot failed: %s", error->message);
+ success = FALSE;
+ }
+
+ kiosk_shell_screenshot_dbus_service_complete_screenshot (completion->service,
+ completion->invocation,
+ success,
+ completion->data);
+
+ completion_dispose (completion);
+}
+
+static gboolean
+kiosk_shell_screenshot_service_handle_screenshot (KioskShellScreenshotDBusService *object,
+ GDBusMethodInvocation *invocation,
+ gboolean arg_include_cursor,
+ gboolean arg_flash,
+ const gchar *arg_filename)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+ const char *client_unique_name = g_dbus_method_invocation_get_sender (invocation);
+ struct KioskShellScreenshotCompletion *completion;
+ g_autoptr (GFile) file = NULL;
+ g_autoptr (GFileOutputStream) stream = NULL;
+ g_autoptr (GError) error = NULL;
+ g_autoptr (GAsyncResult) result = NULL;
+
+ g_debug ("KioskShellScreenshotService: Handling Screenshot(cursor=%i, flash=%i, file='%s') from %s",
+ arg_include_cursor, arg_flash, arg_filename, client_unique_name);
+
+ if (!kiosk_shell_screenshot_check_access (self, client_unique_name)) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Permission denied");
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ file = g_file_new_for_path (arg_filename);
+ stream = g_file_create (file, G_FILE_CREATE_NONE, NULL, &error);
+ if (error) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_FAILED,
+ "Error creating file: %s",
+ error->message);
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ completion = completion_new (object, invocation, arg_filename);
+ kiosk_screenshot_screenshot (self->screenshot,
+ arg_include_cursor,
+ G_OUTPUT_STREAM (stream),
+ screenshot_ready_callback,
+ completion);
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+}
+
+static void
+screenshot_area_ready_callback (GObject *source_object,
+ GAsyncResult *result,
+ gpointer data)
+{
+ struct KioskShellScreenshotCompletion *completion = data;
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (completion->service);
+ g_autoptr (GError) error = NULL;
+ gboolean success = TRUE;
+
+ kiosk_screenshot_screenshot_area_finish (self->screenshot,
+ result,
+ NULL,
+ &error);
+
+ if (error) {
+ g_warning ("Screenshot area failed: %s", error->message);
+ success = FALSE;
+ }
+
+ kiosk_shell_screenshot_dbus_service_complete_screenshot_area (completion->service,
+ completion->invocation,
+ success,
+ completion->data);
+
+ completion_dispose (completion);
+}
+
+static gboolean
+kiosk_shell_screenshot_service_handle_screenshot_area (KioskShellScreenshotDBusService *object,
+ GDBusMethodInvocation *invocation,
+ gint arg_x,
+ gint arg_y,
+ gint arg_width,
+ gint arg_height,
+ gboolean arg_flash,
+ const gchar *arg_filename)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+ const char *client_unique_name = g_dbus_method_invocation_get_sender (invocation);
+ struct KioskShellScreenshotCompletion *completion;
+ g_autoptr (GFile) file = NULL;
+ g_autoptr (GFileOutputStream) stream = NULL;
+ g_autoptr (GError) error = NULL;
+ g_autoptr (GAsyncResult) result = NULL;
+
+ g_debug ("KioskShellScreenshotService: Handling ScreenshotArea(x=%i, y=%i, w=%i, h=%i, flash=%i, file='%s') from %s",
+ arg_x, arg_y, arg_width, arg_height, arg_flash, arg_filename, client_unique_name);
+
+ if (!kiosk_shell_screenshot_check_access (self, client_unique_name)) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Permission denied");
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ file = g_file_new_for_path (arg_filename);
+ stream = g_file_create (file, G_FILE_CREATE_NONE, NULL, &error);
+ if (error) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_FAILED,
+ "Error creating file: %s",
+ error->message);
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ completion = completion_new (object, invocation, arg_filename);
+ kiosk_screenshot_screenshot_area (self->screenshot,
+ arg_x,
+ arg_y,
+ arg_width,
+ arg_height,
+ G_OUTPUT_STREAM (stream),
+ screenshot_area_ready_callback,
+ completion);
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+}
+
+static void
+screenshot_window_ready_callback (GObject *source_object,
+ GAsyncResult *result,
+ gpointer data)
+{
+ struct KioskShellScreenshotCompletion *completion = data;
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (completion->service);
+ g_autoptr (GError) error = NULL;
+ gboolean success = TRUE;
+
+ kiosk_screenshot_screenshot_window_finish (self->screenshot,
+ result,
+ NULL,
+ &error);
+
+ if (error) {
+ g_warning ("Screenshot window failed: %s", error->message);
+ success = FALSE;
+ }
+
+ kiosk_shell_screenshot_dbus_service_complete_screenshot_window (completion->service,
+ completion->invocation,
+ success,
+ completion->data);
+
+ completion_dispose (completion);
+}
+
+static gboolean
+kiosk_shell_screenshot_service_handle_screenshot_window (KioskShellScreenshotDBusService *object,
+ GDBusMethodInvocation *invocation,
+ gboolean arg_include_frame,
+ gboolean arg_include_cursor,
+ gboolean arg_flash,
+ const gchar *arg_filename)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+ const char *client_unique_name = g_dbus_method_invocation_get_sender (invocation);
+ struct KioskShellScreenshotCompletion *completion;
+ g_autoptr (GFile) file = NULL;
+ g_autoptr (GFileOutputStream) stream = NULL;
+ g_autoptr (GError) error = NULL;
+ g_autoptr (GAsyncResult) result = NULL;
+
+ g_debug ("KioskShellScreenshotService: Handling ScreenshotWindow(frame=%i, cursor=%i, flash=%i, file='%s') from %s",
+ arg_include_frame, arg_include_cursor, arg_flash, arg_filename, client_unique_name);
+
+ if (!kiosk_shell_screenshot_check_access (self, client_unique_name)) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Permission denied");
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ file = g_file_new_for_path (arg_filename);
+ stream = g_file_create (file, G_FILE_CREATE_NONE, NULL, &error);
+ if (error) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_FAILED,
+ "Error creating file: %s",
+ error->message);
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ completion = completion_new (object, invocation, arg_filename);
+ kiosk_screenshot_screenshot_window (self->screenshot,
+ arg_include_frame,
+ arg_include_cursor,
+ G_OUTPUT_STREAM (stream),
+ screenshot_window_ready_callback,
+ completion);
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+}
+
+static gboolean
+kiosk_shell_screenshot_service_handle_select_area (KioskShellScreenshotDBusService *object,
+ GDBusMethodInvocation *invocation)
+{
+ KioskShellScreenshotService *self = KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+ const char *client_unique_name = g_dbus_method_invocation_get_sender (invocation);
+
+ g_debug ("KioskShellScreenshotService: Handling SelectArea() from %s",
+ client_unique_name);
+
+ if (!kiosk_shell_screenshot_check_access (self, client_unique_name)) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_ACCESS_DENIED,
+ "Permission denied");
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+ }
+
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_NOT_SUPPORTED,
+ "SelectArea is not supported");
+
+ return G_DBUS_METHOD_INVOCATION_HANDLED;
+}
+
+static void
+kiosk_shell_screenshot_dbus_service_interface_init (KioskShellScreenshotDBusServiceIface *interface)
+{
+ interface->handle_flash_area =
+ kiosk_shell_screenshot_service_handle_flash_area;
+ interface->handle_interactive_screenshot =
+ kiosk_shell_screenshot_service_handle_interactive_screenshot;
+ interface->handle_screenshot =
+ kiosk_shell_screenshot_service_handle_screenshot;
+ interface->handle_screenshot_area =
+ kiosk_shell_screenshot_service_handle_screenshot_area;
+ interface->handle_screenshot_window =
+ kiosk_shell_screenshot_service_handle_screenshot_window;
+ interface->handle_select_area =
+ kiosk_shell_screenshot_service_handle_select_area;
+}
+
+static void
+kiosk_shell_screenshot_service_init (KioskShellScreenshotService *self)
+{
+ g_debug ("KioskShellScreenshotService: Initializing");
+}
+
+KioskShellScreenshotService *
+kiosk_shell_screenshot_service_new (KioskCompositor *compositor)
+{
+ GObject *object;
+
+ object = g_object_new (KIOSK_TYPE_SHELL_SCREENSHOT_SERVICE,
+ "compositor", compositor,
+ NULL);
+
+ return KIOSK_SHELL_SCREENSHOT_SERVICE (object);
+}
+
+static void
+on_user_bus_acquired (GDBusConnection *connection,
+ const char *unique_name,
+ KioskShellScreenshotService *self)
+{
+ g_autoptr (GError) error = NULL;
+
+ g_debug ("KioskShellScreenshotService: Connected to user bus");
+
+ g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self),
+ connection,
+ KIOSK_SHELL_SCREENSHOT_SERVICE_OBJECT_PATH,
+ &error);
+
+ if (error != NULL) {
+ g_debug ("KioskShellScreenshotService: Could not export interface skeleton: %s",
+ error->message);
+ g_clear_error (&error);
+ }
+}
+
+static void
+on_bus_name_acquired (GDBusConnection *connection,
+ const char *name,
+ KioskShellScreenshotService *self)
+{
+ if (g_strcmp0 (name, KIOSK_SHELL_SCREENSHOT_SERVICE_BUS_NAME) != 0) {
+ return;
+ }
+
+ g_debug ("KioskShellScreenshotService: Acquired name %s", name);
+}
+
+static void
+on_bus_name_lost (GDBusConnection *connection,
+ const char *name,
+ KioskShellScreenshotService *self)
+{
+ if (g_strcmp0 (name, KIOSK_SHELL_SCREENSHOT_SERVICE_BUS_NAME) != 0) {
+ return;
+ }
+
+ g_debug ("KioskShellScreenshotService: Lost name %s", name);
+}
+
+gboolean
+kiosk_shell_screenshot_service_start (KioskShellScreenshotService *self,
+ GError **error)
+{
+ g_return_val_if_fail (KIOSK_IS_SHELL_SCREENSHOT_SERVICE (self), FALSE);
+
+ g_debug ("KioskShellScreenshotService: Starting");
+ self->bus_id = g_bus_own_name (G_BUS_TYPE_SESSION,
+ KIOSK_SHELL_SCREENSHOT_SERVICE_BUS_NAME,
+ G_BUS_NAME_OWNER_FLAGS_REPLACE,
+ (GBusAcquiredCallback) on_user_bus_acquired,
+ (GBusNameAcquiredCallback) on_bus_name_acquired,
+ (GBusNameVanishedCallback) on_bus_name_lost,
+ self,
+ NULL);
+
+ return TRUE;
+}
+
+void
+kiosk_shell_screenshot_service_stop (KioskShellScreenshotService *self)
+{
+ g_return_if_fail (KIOSK_IS_SHELL_SCREENSHOT_SERVICE (self));
+
+ g_debug ("KioskShellScreenshotService: Stopping");
+
+ g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (self));
+ g_clear_handle_id (&self->bus_id, g_bus_unown_name);
+}
diff --git a/compositor/kiosk-shell-screenshot-service.h b/compositor/kiosk-shell-screenshot-service.h
new file mode 100644
index 0000000..520c319
--- /dev/null
+++ b/compositor/kiosk-shell-screenshot-service.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <glib-object.h>
+
+#include "org.gnome.Shell.Screenshot.h"
+
+typedef struct _KioskCompositor KioskCompositor;
+
+G_BEGIN_DECLS
+
+#define KIOSK_TYPE_SHELL_SCREENSHOT_SERVICE (kiosk_shell_screenshot_service_get_type ())
+
+G_DECLARE_FINAL_TYPE (KioskShellScreenshotService,
+ kiosk_shell_screenshot_service,
+ KIOSK, SHELL_SCREENSHOT_SERVICE,
+ KioskShellScreenshotDBusServiceSkeleton);
+
+KioskShellScreenshotService *kiosk_shell_screenshot_service_new (KioskCompositor *compositor);
+gboolean kiosk_shell_screenshot_service_start (KioskShellScreenshotService *service,
+ GError **error);
+void kiosk_shell_screenshot_service_stop (KioskShellScreenshotService *service);
+
+G_END_DECLS
diff --git a/dbus-interfaces/org.gnome.Shell.Screenshot.xml b/dbus-interfaces/org.gnome.Shell.Screenshot.xml
new file mode 100644
index 0000000..8e16a30
--- /dev/null
+++ b/dbus-interfaces/org.gnome.Shell.Screenshot.xml
@@ -0,0 +1,161 @@
+<!DOCTYPE node PUBLIC
+'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'
+'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>
+<node>
+
+ <!--
+ org.gnome.Shell.Screenshot:
+ @short_description: Screenshot interface
+
+ The interface used to capture pictures of the screen contents.
+ -->
+ <interface name="org.gnome.Shell.Screenshot">
+
+ <!--
+ InteractiveScreenshot:
+ @success: whether the screenshot was captured
+ @uri: the file where the screenshot was saved
+
+ Shows Shell's interactive screenshot dialog, and lets the
+ user take an interactive screenshot, which is then returned
+ in @filename as png image. It returns a boolean indicating
+ whether the operation was successful or not. The URI of the
+ screenshot will be returned in @uri.
+ -->
+ <method name="InteractiveScreenshot">
+ <arg type="b" direction="out" name="success"/>
+ <arg type="s" direction="out" name="uri"/>
+ </method>
+
+ <!--
+ Screenshot:
+ @filename: The filename for the screenshot
+ @include_cursor: Whether to include the cursor image or not
+ @flash: Whether to flash the screen or not
+ @success: whether the screenshot was captured
+ @filename_used: the file where the screenshot was saved
+
+ Takes a screenshot of the whole screen and saves it
+ in @filename as png image, it returns a boolean
+ indicating whether the operation was successful or not.
+ @filename can either be an absolute path or a basename, in
+ which case the screenshot will be saved in the $XDG_PICTURES_DIR
+ or the home directory if it doesn't exist. The filename used
+ to save the screenshot will be returned in @filename_used.
+ -->
+ <method name="Screenshot">
+ <arg type="b" direction="in" name="include_cursor"/>
+ <arg type="b" direction="in" name="flash"/>
+ <arg type="s" direction="in" name="filename"/>
+ <arg type="b" direction="out" name="success"/>
+ <arg type="s" direction="out" name="filename_used"/>
+ </method>
+
+ <!--
+ ScreenshotWindow:
+ @include_frame: Whether to include the frame or not
+ @include_cursor: Whether to include the cursor image or not
+ @flash: Whether to flash the window area or not
+ @filename: The filename for the screenshot
+ @success: whether the screenshot was captured
+ @filename_used: the file where the screenshot was saved
+
+ Takes a screenshot of the focused window (optionally omitting the frame)
+ and saves it in @filename as png image, it returns a boolean
+ indicating whether the operation was successful or not.
+ @filename can either be an absolute path or a basename, in
+ which case the screenshot will be saved in the $XDG_PICTURES_DIR
+ or the home directory if it doesn't exist. The filename used
+ to save the screenshot will be returned in @filename_used.
+ -->
+ <method name="ScreenshotWindow">
+ <arg type="b" direction="in" name="include_frame"/>
+ <arg type="b" direction="in" name="include_cursor"/>
+ <arg type="b" direction="in" name="flash"/>
+ <arg type="s" direction="in" name="filename"/>
+ <arg type="b" direction="out" name="success"/>
+ <arg type="s" direction="out" name="filename_used"/>
+ </method>
+
+ <!--
+ ScreenshotArea:
+ @x: the X coordinate of the area to capture
+ @y: the Y coordinate of the area to capture
+ @width: the width of the area to capture
+ @height: the height of the area to capture
+ @flash: whether to flash the area or not
+ @filename: the filename for the screenshot
+ @success: whether the screenshot was captured
+ @filename_used: the file where the screenshot was saved
+
+ Takes a screenshot of the passed in area and saves it
+ in @filename as png image, it returns a boolean
+ indicating whether the operation was successful or not.
+ @filename can either be an absolute path or a basename, in
+ which case the screenshot will be saved in the $XDG_PICTURES_DIR
+ or the home directory if it doesn't exist. The filename used
+ to save the screenshot will be returned in @filename_used.
+ -->
+ <method name="ScreenshotArea">
+ <arg type="i" direction="in" name="x"/>
+ <arg type="i" direction="in" name="y"/>
+ <arg type="i" direction="in" name="width"/>
+ <arg type="i" direction="in" name="height"/>
+ <arg type="b" direction="in" name="flash"/>
+ <arg type="s" direction="in" name="filename"/>
+ <arg type="b" direction="out" name="success"/>
+ <arg type="s" direction="out" name="filename_used"/>
+ </method>
+
+ <!--
+ PickColor:
+
+ Picks a color and returns the result.
+
+ The @result vardict contains:
+ <variablelist>
+ <varlistentry>
+ <term>color (ddd)</term>
+ <listitem><para>The color, RGB values in the range [0,1].</para></listitem>
+ </varlistentry>
+ </variablelist>
+ -->
+ <method name="PickColor">
+ <arg type="a{sv}" direction="out" name="result"/>
+ </method>
+
+ <!--
+ FlashArea:
+ @x: the X coordinate of the area to flash
+ @y: the Y coordinate of the area to flash
+ @width: the width of the area to flash
+ @height: the height of the area to flash
+
+ Renders a flash spot effect in the specified rectangle of the screen.
+ -->
+ <method name="FlashArea">
+ <arg type="i" direction="in" name="x"/>
+ <arg type="i" direction="in" name="y"/>
+ <arg type="i" direction="in" name="width"/>
+ <arg type="i" direction="in" name="height"/>
+ </method>
+
+ <!--
+ SelectArea:
+ @x: the X coordinate of the selected area
+ @y: the Y coordinate of the selected area
+ @width: the width of the selected area
+ @height: the height of the selected area
+
+ Interactively allows the user to select a rectangular area of
+ the screen, and returns its coordinates.
+ -->
+ <method name="SelectArea">
+ <arg type="i" direction="out" name="x"/>
+ <arg type="i" direction="out" name="y"/>
+ <arg type="i" direction="out" name="width"/>
+ <arg type="i" direction="out" name="height"/>
+ </method>
+
+ </interface>
+</node>
diff --git a/meson.build b/meson.build
index d1efcab..d5941bf 100644
--- a/meson.build
+++ b/meson.build
@@ -116,6 +116,17 @@ sources = gnome.gdbus_codegen(dbus_interface, dbus_interface_file,
)
dbus_interface_sources_map += { dbus_interface: sources }
+dbus_interface = 'org.gnome.Shell.Screenshot'
+dbus_interface_file = join_paths('dbus-interfaces', dbus_interface + '.xml')
+sources = gnome.gdbus_codegen(dbus_interface, dbus_interface_file,
+ namespace: 'Kiosk',
+ interface_prefix: 'org.gnome',
+ annotations: [
+ [ dbus_interface, 'org.gtk.GDBus.C.Name', 'ShellScreenshotDBusService' ]
+ ]
+)
+dbus_interface_sources_map += { dbus_interface: sources }
+
compositor_dependencies = []
compositor_dependencies += c_compiler.find_library('m')
compositor_dependencies += dependency('gio-2.0')
@@ -154,6 +165,7 @@ compositor_sources += 'compositor/kiosk-input-source-group.c'
compositor_sources += 'compositor/kiosk-service.c'
compositor_sources += 'compositor/kiosk-shell-service.c'
compositor_sources += 'compositor/kiosk-shell-introspect-service.c'
+compositor_sources += 'compositor/kiosk-shell-screenshot-service.c'
compositor_sources += 'compositor/kiosk-screenshot.c'
if mutter_have_x11
--
2.48.1

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# gnome-kiosk
The gnome-kiosk package

View File

@ -1,89 +0,0 @@
From a57b5436cdce6b09daf968d1ff563b0b2e233daa Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 6 Oct 2022 11:01:20 -0400
Subject: [PATCH] compositor: Be more permissive about what's considered
fullscreen
GNOME Kiosk will automatically fullscreen the application started
for it, but sometimes that application will start another app.
The second app should not be automatically fullscreened.
Some apps go fullscreen without actually going fullscreen though.
They just go monitor sized.
This commit makes sure those apps count as fullscreen too.
---
compositor/kiosk-compositor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compositor/kiosk-compositor.c b/compositor/kiosk-compositor.c
index 2db58ed..c611bb9 100644
--- a/compositor/kiosk-compositor.c
+++ b/compositor/kiosk-compositor.c
@@ -282,61 +282,61 @@ kiosk_compositor_size_change (MetaPlugin *plugin,
static gboolean
kiosk_compositor_wants_window_fullscreen (KioskCompositor *self,
MetaWindow *window)
{
MetaWindowType window_type;
g_autoptr (GList) windows = NULL;
GList *node;
if (!meta_window_allows_resize (window)) {
g_debug ("KioskCompositor: Window does not allow resizes");
return FALSE;
}
if (meta_window_is_override_redirect (window)) {
g_debug ("KioskCompositor: Window is override redirect");
return FALSE;
}
window_type = meta_window_get_window_type (window);
if (window_type != META_WINDOW_NORMAL) {
g_debug ("KioskCompositor: Window is not normal");
return FALSE;
}
windows = meta_display_get_tab_list (self->display, META_TAB_LIST_NORMAL_ALL, NULL);
for (node = windows; node != NULL; node = node->next) {
MetaWindow *existing_window = node->data;
- if (meta_window_is_fullscreen (existing_window)) {
+ if (meta_window_is_monitor_sized (existing_window)) {
return FALSE;
}
}
return TRUE;
}
static gboolean
kiosk_compositor_wants_window_above (KioskCompositor *self,
MetaWindow *window)
{
if (meta_window_is_screen_sized (window)) {
return FALSE;
}
if (meta_window_is_monitor_sized (window)) {
return FALSE;
}
return TRUE;
}
static void
on_faded_in (KioskCompositor *self,
ClutterTransition *transition)
{
MetaWindowActor *actor = g_object_get_data (G_OBJECT (transition), "actor");
meta_plugin_map_completed (META_PLUGIN (self), actor);
}
--
2.35.1

View File

@ -1,239 +0,0 @@
From 28a560fdc1a8571d0e1d34da5cb57f43d2fe1a54 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 11 Aug 2021 14:47:05 -0400
Subject: [PATCH 1/6] compositor: Ignore some of the builtin keybindings
Mutter on wayland currently has a bug where it crashes if the run dialog
keybinding is pressed. No one notices the bug for gnome-shell, since
gnome-shell overrides mutters run dialog keybinding.
This commit makes GNOME Kiosk also override the keybinding to avoid the
crash. At the same time it neuters a few other builtin keybindings that
aren't so useful to GNOME Kiosk.
---
compositor/kiosk-compositor.c | 90 +++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/compositor/kiosk-compositor.c b/compositor/kiosk-compositor.c
index 43329c7..2db58ed 100644
--- a/compositor/kiosk-compositor.c
+++ b/compositor/kiosk-compositor.c
@@ -1,42 +1,43 @@
#include "config.h"
#include "kiosk-compositor.h"
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <clutter/clutter.h>
#include <clutter/x11/clutter-x11.h>
#include <meta/common.h>
#include <meta/display.h>
+#include <meta/keybindings.h>
#include <meta/main.h>
#include <meta/util.h>
#include <meta/meta-window-group.h>
#include <systemd/sd-daemon.h>
#include "kiosk-backgrounds.h"
#include "kiosk-input-sources-manager.h"
#include "kiosk-service.h"
#include "org.gnome.DisplayManager.Manager.h"
struct _KioskCompositor
{
MetaPlugin parent;
/* weak references */
MetaDisplay *display;
ClutterBackend *backend;
ClutterActor *stage;
/* strong references */
GCancellable *cancellable;
KioskBackgrounds *backgrounds;
KioskInputSourcesManager *input_sources_manager;
KioskService *service;
};
enum {
X_SERVER_EVENT,
@@ -103,82 +104,171 @@ register_with_display_manager (KioskCompositor *self)
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{ss}"));
gdm_manager_call_register_display_sync (display_manager,
g_variant_builder_end (&builder),
self->cancellable,
&error);
if (error != NULL) {
g_debug ("KioskCompositor: Could not register with display manager: %s",
error->message);
return;
}
}
static void
register_with_systemd (KioskCompositor *self)
{
sd_notify (TRUE, "READY=1");
}
static void
register_session (KioskCompositor *self)
{
meta_register_with_session ();
register_with_display_manager (self);
register_with_systemd (self);
}
+static void
+on_builtin_keybinding_triggered (MetaDisplay *display,
+ MetaWindow *window,
+ ClutterKeyEvent *event,
+ MetaKeyBinding *binding,
+ KioskCompositor *self)
+{
+ g_debug ("KioskCompositor: Ignoring '%s' request",
+ meta_key_binding_get_name (binding));
+}
+
+static void
+neuter_builtin_keybindings (KioskCompositor *self)
+{
+ const char *builtin_keybindings[] = {
+ "switch-to-workspace-1",
+ "switch-to-workspace-2",
+ "switch-to-workspace-3",
+ "switch-to-workspace-4",
+ "switch-to-workspace-5",
+ "switch-to-workspace-6",
+ "switch-to-workspace-7",
+ "switch-to-workspace-8",
+ "switch-to-workspace-9",
+ "switch-to-workspace-10",
+ "switch-to-workspace-11",
+ "switch-to-workspace-12",
+ "switch-to-workspace-left",
+ "switch-to-workspace-right",
+ "switch-to-workspace-up",
+ "switch-to-workspace-down",
+ "switch-to-workspace-last",
+ "panel-main-menu",
+ "panel-run-dialog",
+ "set-spew-mark",
+ "switch-monitor",
+ "rotate-monitor",
+ "switch-to-session-1",
+ "switch-to-session-2",
+ "switch-to-session-3",
+ "switch-to-session-4",
+ "switch-to-session-5",
+ "switch-to-session-6",
+ "switch-to-session-7",
+ "switch-to-session-8",
+ "switch-to-session-9",
+ "switch-to-session-10",
+ "switch-to-session-11",
+ "switch-to-session-12",
+ "restore-shortcuts",
+ "activate-window-menu",
+ "toggle-above",
+ "toggle-shaded",
+ "minimize",
+ "toggle-on-all-workspaces",
+ "move-to-workspace-1",
+ "move-to-workspace-2",
+ "move-to-workspace-3",
+ "move-to-workspace-4",
+ "move-to-workspace-5",
+ "move-to-workspace-6",
+ "move-to-workspace-7",
+ "move-to-workspace-8",
+ "move-to-workspace-9",
+ "move-to-workspace-10",
+ "move-to-workspace-11",
+ "move-to-workspace-12",
+ "move-to-workspace-last",
+ "move-to-workspace-left",
+ "move-to-workspace-right",
+ "move-to-workspace-up",
+ "move-to-workspace-down",
+ NULL
+ };
+ size_t i;
+
+ g_debug ("KioskCompositor: Neutering builtin keybindings");
+
+ for (i = 0; builtin_keybindings[i] != NULL; i++) {
+ meta_keybindings_set_custom_handler (builtin_keybindings[i],
+ (MetaKeyHandlerFunc)
+ on_builtin_keybinding_triggered,
+ self,
+ NULL);
+ }
+}
+
static void
kiosk_compositor_start (MetaPlugin *plugin)
{
KioskCompositor *self = KIOSK_COMPOSITOR (plugin);
g_autoptr (GError) error = NULL;
g_set_weak_pointer (&self->display, meta_plugin_get_display (META_PLUGIN (self)));
g_set_weak_pointer (&self->backend, clutter_get_default_backend ());
g_set_weak_pointer (&self->stage, meta_get_stage_for_display (self->display));
clutter_actor_show (self->stage);
self->cancellable = g_cancellable_new ();
self->service = kiosk_service_new (self);
kiosk_service_start (self->service, &error);
if (error != NULL) {
g_debug ("KioskCompositor: Could not start D-Bus service: %s", error->message);
g_clear_error (&error);
}
+ neuter_builtin_keybindings (self);
+
self->backgrounds = kiosk_backgrounds_new (self);
self->input_sources_manager = kiosk_input_sources_manager_new (self);
register_session (self);
}
static void
kiosk_compositor_minimize (MetaPlugin *plugin,
MetaWindowActor *actor)
{
meta_plugin_minimize_completed (plugin, actor);
}
static void
kiosk_compositor_unminimize (MetaPlugin *plugin,
MetaWindowActor *actor)
{
meta_plugin_unminimize_completed (plugin, actor);
}
static void
kiosk_compositor_size_changed (MetaPlugin *plugin,
MetaWindowActor *actor)
{
g_assert (META_PLUGIN_CLASS (kiosk_compositor_parent_class)->size_changed == NULL);
}
static void
kiosk_compositor_size_change (MetaPlugin *plugin,
MetaWindowActor *actor,
--
2.31.1

View File

@ -1,429 +0,0 @@
From 00aa37d927c3fd24769bd5c68a8a1ddc9acfb7bd Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 6 Aug 2021 17:51:14 -0400
Subject: [PATCH 1/2] compositor: Support systemd --user sessions
This commit adds unit files for supporting starting org.gnome.Kiosk
from systemd --user.
---
compositor/data/org.gnome.Kiosk.desktop.in.in | 1 +
.../data/systemd/org.gnome.Kiosk.target | 10 ++++++++
.../org.gnome.Kiosk@wayland.service.in | 20 ++++++++++++++++
.../systemd/org.gnome.Kiosk@x11.service.in | 20 ++++++++++++++++
compositor/kiosk-compositor.c | 10 ++++++++
meson.build | 24 +++++++++++++++++++
6 files changed, 85 insertions(+)
create mode 100644 compositor/data/systemd/org.gnome.Kiosk.target
create mode 100644 compositor/data/systemd/org.gnome.Kiosk@wayland.service.in
create mode 100644 compositor/data/systemd/org.gnome.Kiosk@x11.service.in
diff --git a/compositor/data/org.gnome.Kiosk.desktop.in.in b/compositor/data/org.gnome.Kiosk.desktop.in.in
index bb603c8..cdbbe6a 100644
--- a/compositor/data/org.gnome.Kiosk.desktop.in.in
+++ b/compositor/data/org.gnome.Kiosk.desktop.in.in
@@ -1,12 +1,13 @@
[Desktop Entry]
Type=Application
Name=GNOME Kiosk
Comment=Compositor for Kiosk and Single Application deployments
Exec=@bindir@/gnome-kiosk
Categories=GNOME;GTK;Core;System;
OnlyShowIn=GNOME;
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer
X-GNOME-Provides=panel;windowmanager;
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=false
+X-GNOME-HiddenUnderSystemd=true
diff --git a/compositor/data/systemd/org.gnome.Kiosk.target b/compositor/data/systemd/org.gnome.Kiosk.target
new file mode 100644
index 0000000..eb92b4a
--- /dev/null
+++ b/compositor/data/systemd/org.gnome.Kiosk.target
@@ -0,0 +1,10 @@
+[Unit]
+Description=GNOME Kiosk
+DefaultDependencies=no
+
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
+
+Wants=org.gnome.Kiosk@wayland.service
+Wants=org.gnome.Kiosk@x11.service
diff --git a/compositor/data/systemd/org.gnome.Kiosk@wayland.service.in b/compositor/data/systemd/org.gnome.Kiosk@wayland.service.in
new file mode 100644
index 0000000..19cd4a0
--- /dev/null
+++ b/compositor/data/systemd/org.gnome.Kiosk@wayland.service.in
@@ -0,0 +1,20 @@
+[Unit]
+Description=GNOME Kiosk on Wayland
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
+CollectMode=inactive-or-failed
+RefuseManualStart=on
+RefuseManualStop=on
+After=gnome-session-manager.target
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
+ConditionEnvironment=XDG_SESSION_TYPE=%I
+
+[Service]
+Slice=session.slice
+Type=notify
+ExecStart=/usr/bin/gnome-kiosk
+ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY'
+Restart=no
+TimeoutStopSec=5
diff --git a/compositor/data/systemd/org.gnome.Kiosk@x11.service.in b/compositor/data/systemd/org.gnome.Kiosk@x11.service.in
new file mode 100644
index 0000000..291baaa
--- /dev/null
+++ b/compositor/data/systemd/org.gnome.Kiosk@x11.service.in
@@ -0,0 +1,20 @@
+[Unit]
+Description=GNOME Kiosk on X11
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+CollectMode=inactive-or-failed
+RefuseManualStart=on
+RefuseManualStop=on
+After=gnome-session-manager.target
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
+ConditionEnvironment=XDG_SESSION_TYPE=%I
+
+[Service]
+Slice=session.slice
+Type=notify
+ExecStart=/usr/bin/gnome-kiosk
+Restart=always
+RestartSec=0ms
+TimeoutStopSec=5
diff --git a/compositor/kiosk-compositor.c b/compositor/kiosk-compositor.c
index 6753a87..43329c7 100644
--- a/compositor/kiosk-compositor.c
+++ b/compositor/kiosk-compositor.c
@@ -1,46 +1,48 @@
#include "config.h"
#include "kiosk-compositor.h"
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <clutter/clutter.h>
#include <clutter/x11/clutter-x11.h>
#include <meta/common.h>
#include <meta/display.h>
#include <meta/main.h>
#include <meta/util.h>
#include <meta/meta-window-group.h>
+#include <systemd/sd-daemon.h>
+
#include "kiosk-backgrounds.h"
#include "kiosk-input-sources-manager.h"
#include "kiosk-service.h"
#include "org.gnome.DisplayManager.Manager.h"
struct _KioskCompositor
{
MetaPlugin parent;
/* weak references */
MetaDisplay *display;
ClutterBackend *backend;
ClutterActor *stage;
/* strong references */
GCancellable *cancellable;
KioskBackgrounds *backgrounds;
KioskInputSourcesManager *input_sources_manager;
KioskService *service;
};
enum {
X_SERVER_EVENT,
NUMBER_OF_SIGNALS
};
static guint signals [NUMBER_OF_SIGNALS] = { 0, };
G_DEFINE_TYPE (KioskCompositor, kiosk_compositor, META_TYPE_PLUGIN)
@@ -85,66 +87,74 @@ register_with_display_manager (KioskCompositor *self)
}
display_manager = gdm_manager_proxy_new_sync (system_bus,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
"org.gnome.DisplayManager",
"/org/gnome/DisplayManager/Manager",
self->cancellable,
&error);
if (error != NULL) {
g_debug ("KioskCompositor: Could not contact display manager: %s",
error->message);
return;
}
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{ss}"));
gdm_manager_call_register_display_sync (display_manager,
g_variant_builder_end (&builder),
self->cancellable,
&error);
if (error != NULL) {
g_debug ("KioskCompositor: Could not register with display manager: %s",
error->message);
return;
}
}
+static void
+register_with_systemd (KioskCompositor *self)
+{
+ sd_notify (TRUE, "READY=1");
+}
+
static void
register_session (KioskCompositor *self)
{
meta_register_with_session ();
register_with_display_manager (self);
+
+ register_with_systemd (self);
}
static void
kiosk_compositor_start (MetaPlugin *plugin)
{
KioskCompositor *self = KIOSK_COMPOSITOR (plugin);
g_autoptr (GError) error = NULL;
g_set_weak_pointer (&self->display, meta_plugin_get_display (META_PLUGIN (self)));
g_set_weak_pointer (&self->backend, clutter_get_default_backend ());
g_set_weak_pointer (&self->stage, meta_get_stage_for_display (self->display));
clutter_actor_show (self->stage);
self->cancellable = g_cancellable_new ();
self->service = kiosk_service_new (self);
kiosk_service_start (self->service, &error);
if (error != NULL) {
g_debug ("KioskCompositor: Could not start D-Bus service: %s", error->message);
g_clear_error (&error);
}
self->backgrounds = kiosk_backgrounds_new (self);
self->input_sources_manager = kiosk_input_sources_manager_new (self);
register_session (self);
}
diff --git a/meson.build b/meson.build
index 0766f8d..c2988ad 100644
--- a/meson.build
+++ b/meson.build
@@ -9,60 +9,64 @@ c_compiler = meson.get_compiler('c')
gnome = import('gnome')
i18n = import('i18n')
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
bindir = join_paths(prefix, get_option('bindir'))
localedir = join_paths(datadir, 'locale')
desktop_data_dir = join_paths(datadir, 'applications')
session_dir = join_paths(datadir, 'gnome-session', 'sessions')
xsessions_dir = join_paths(datadir, 'xsessions')
po_dir = join_paths(meson.current_source_dir(), 'po')
config_data = configuration_data()
config_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
config_data.set_quoted('VERSION', meson.project_version())
config_data.set_quoted('LOCALEDIR', localedir)
config_h = configure_file(
input: 'config.h.meson',
output: 'config.h',
configuration: config_data
)
meson.add_install_script ('meson/postinstall.py')
mutter_dependency = dependency('libmutter-8')
mutter_libdir = mutter_dependency.get_pkgconfig_variable('typelibdir')
+systemd_user_unit_dir = dependency('systemd').get_pkgconfig_variable('systemduserunitdir',
+ define_variable: ['prefix', prefix])
+systemd_dependency = dependency('libsystemd')
+
dbus_proxies = []
dbus_proxies += {
'prefix': 'org.gnome.DisplayManager',
'namespace': 'Gdm',
'interface': 'Manager',
}
dbus_proxies += {
'prefix': 'org.freedesktop',
'namespace': 'Sd',
'interface': 'locale1',
}
dbus_proxies += {
'prefix': 'org.gnome',
'namespace': 'Gsm',
'interface': 'SessionManager',
}
dbus_interface_sources_map = {}
foreach dbus_proxy : dbus_proxies
dbus_interface = dbus_proxy['prefix'] + '.' + dbus_proxy['interface']
dbus_interface_file = join_paths('dbus-interfaces', dbus_interface + '.xml')
sources = gnome.gdbus_codegen(dbus_interface, dbus_interface_file,
namespace: dbus_proxy['namespace'],
interface_prefix: dbus_proxy['prefix'],
)
dbus_interface_sources_map += { dbus_interface: sources }
endforeach
@@ -75,103 +79,123 @@ sources = gnome.gdbus_codegen(dbus_interface, dbus_interface_file,
annotations: [
[ dbus_interface, 'org.gtk.GDBus.C.Name', 'Service' ],
[ dbus_interface + '.InputSources', 'org.gtk.GDBus.C.Name', 'InputSourcesManager' ],
[ dbus_interface + '.InputSources.InputSource', 'org.gtk.GDBus.C.Name', 'InputSource' ],
]
)
dbus_interface_sources_map += { dbus_interface: sources }
dbus_interface = 'org.gnome.Shell'
dbus_interface_file = join_paths('dbus-interfaces', dbus_interface + '.xml')
sources = gnome.gdbus_codegen(dbus_interface, dbus_interface_file,
namespace: 'Kiosk',
interface_prefix: 'org.gnome',
annotations: [
[ dbus_interface, 'org.gtk.GDBus.C.Name', 'ShellDBusService' ]
]
)
dbus_interface_sources_map += { dbus_interface: sources }
compositor_dependencies = []
compositor_dependencies += c_compiler.find_library('m')
compositor_dependencies += dependency('gio-2.0')
compositor_dependencies += dependency('glib-2.0')
compositor_dependencies += dependency('gnome-desktop-3.0')
compositor_dependencies += dependency('gobject-2.0')
compositor_dependencies += dependency('ibus-1.0')
compositor_dependencies += dependency('mutter-cogl-8')
compositor_dependencies += dependency('mutter-cogl-pango-8')
compositor_dependencies += dependency('mutter-clutter-8')
compositor_dependencies += mutter_dependency
+compositor_dependencies += systemd_dependency
compositor_sources = []
compositor_sources += 'compositor/kiosk-backgrounds.c'
compositor_sources += 'compositor/kiosk-compositor.c'
compositor_sources += 'compositor/kiosk-dbus-utils.c'
compositor_sources += 'compositor/kiosk-gobject-utils.c'
compositor_sources += 'compositor/kiosk-input-sources-manager.c'
compositor_sources += 'compositor/kiosk-input-engine-manager.c'
compositor_sources += 'compositor/kiosk-input-source-group.c'
compositor_sources += 'compositor/kiosk-service.c'
compositor_sources += 'compositor/kiosk-shell-service.c'
compositor_sources += 'compositor/kiosk-x-keyboard-manager.c'
compositor_sources += 'compositor/main.c'
foreach dbus_interface, sources: dbus_interface_sources_map
compositor_sources += sources
endforeach
executable('gnome-kiosk', compositor_sources,
dependencies: compositor_dependencies,
build_rpath: mutter_libdir,
install_rpath: mutter_libdir,
install: true
)
desktop_config_data = configuration_data()
desktop_config_data.set('bindir', bindir)
desktop_file = configure_file(
input: 'compositor/data/org.gnome.Kiosk.desktop.in.in',
output: 'org.gnome.Kiosk.desktop.in',
configuration: desktop_config_data
)
i18n.merge_file('desktop',
input: desktop_file,
output: 'org.gnome.Kiosk.desktop',
po_dir: po_dir,
install: true,
install_dir: desktop_data_dir,
type: 'desktop'
)
+systemd_service_config_data = configuration_data()
+systemd_service_config_data.set('bindir', bindir)
+
+systemd_service_files = []
+systemd_service_files += 'compositor/data/systemd/org.gnome.Kiosk@wayland.service.in'
+systemd_service_files += 'compositor/data/systemd/org.gnome.Kiosk@x11.service.in'
+
+foreach service_file : systemd_service_files
+ configure_file(
+ input: service_file,
+ output: '@BASENAME@',
+ configuration: systemd_service_config_data,
+ install_dir: systemd_user_unit_dir
+ )
+endforeach
+
+install_data('compositor/data/systemd/org.gnome.Kiosk.target',
+ install_dir: systemd_user_unit_dir)
+
session_config_data = configuration_data()
session_config_data.set('required_components', 'org.gnome.Kiosk;org.gnome.Kiosk.SearchApp;')
session_file = configure_file(
input: 'search-app/org.gnome.Kiosk.SearchApp.session.desktop.in.in',
output: 'org.gnome.Kiosk.SearchApp.session.desktop.in',
configuration: session_config_data
)
subdir('input-selector')
i18n.merge_file('desktop',
input: session_file,
output: 'org.gnome.Kiosk.SearchApp.session',
po_dir: po_dir,
install: true,
install_dir: session_dir,
type: 'desktop'
)
i18n.merge_file('desktop',
input: 'search-app/org.gnome.Kiosk.SearchApp.Session.desktop.in',
output: 'org.gnome.Kiosk.SearchApp.Session.desktop',
po_dir: po_dir,
install: true,
install_dir: xsessions_dir,
type: 'desktop'
)
search_app_desktop_file = configure_file(
--
2.31.1

View File

@ -1,309 +0,0 @@
From db768718666563f5ad9658ba4cc07987122b4e89 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 9 Aug 2021 10:30:36 -0400
Subject: [PATCH 2/2] Add a script for simplifying kiosk setup
This commit adds a new session "Kiosk Script Session" to the login
screen that starts a shell script that starts a gedit window that opens
the shell script.
It should make it easy to customize the session to use a bespoke
application from within the session itself.
---
.../org.gnome.Kiosk.Script.desktop.in.in | 4 ++
kiosk-script/gnome-kiosk-script | 23 +++++++
.../gnome-session/gnome-kiosk-script.session | 3 +
.../systemd/org.gnome.Kiosk.Script.service.in | 8 +++
kiosk-script/systemd/session.conf | 3 +
.../gnome-kiosk-script-wayland.desktop.in | 9 +++
.../gnome-kiosk-script-xorg.desktop.in | 9 +++
meson.build | 61 ++++++++++++++++++-
8 files changed, 118 insertions(+), 2 deletions(-)
create mode 100644 kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in
create mode 100755 kiosk-script/gnome-kiosk-script
create mode 100644 kiosk-script/gnome-session/gnome-kiosk-script.session
create mode 100644 kiosk-script/systemd/org.gnome.Kiosk.Script.service.in
create mode 100644 kiosk-script/systemd/session.conf
create mode 100644 kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in
create mode 100644 kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in
diff --git a/kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in b/kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in
new file mode 100644
index 0000000..dd562b2
--- /dev/null
+++ b/kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in
@@ -0,0 +1,4 @@
+[Desktop Entry]
+Name=Kiosk Script
+Type=Application
+Exec=gnome-kiosk-script
diff --git a/kiosk-script/gnome-kiosk-script b/kiosk-script/gnome-kiosk-script
new file mode 100755
index 0000000..b595cd8
--- /dev/null
+++ b/kiosk-script/gnome-kiosk-script
@@ -0,0 +1,23 @@
+#!/usr/bin/sh
+
+if [ ! -e ~/.local/bin/gnome-kiosk-script ]; then
+ mkdir -p ~/.local/bin ~/.config
+ cat > ~/.local/bin/gnome-kiosk-script <<- "EOF"
+ #!/bin/sh
+ # This script is located in ~/.local/bin.
+ # It's provided as an example script to show how
+ # the kiosk session works. At the moment, the script
+ # just starts a text editor open to itself, but it
+ # should get customized to instead start a full screen
+ # application designed for the kiosk deployment.
+ gedit ~/.local/bin/gnome-kiosk-script
+
+ sleep 1.0
+ exec "$0" "$@"
+EOF
+
+ chmod +x ~/.local/bin/gnome-kiosk-script
+ touch ~/.config/gnome-initial-setup-done
+fi
+
+exec ~/.local/bin/gnome-kiosk-script "$@"
diff --git a/kiosk-script/gnome-session/gnome-kiosk-script.session b/kiosk-script/gnome-session/gnome-kiosk-script.session
new file mode 100644
index 0000000..3b2cc7b
--- /dev/null
+++ b/kiosk-script/gnome-session/gnome-kiosk-script.session
@@ -0,0 +1,3 @@
+[GNOME Session]
+Name=Kiosk
+RequiredComponents=org.gnome.Kiosk;org.gnome.Kiosk.Script;
diff --git a/kiosk-script/systemd/org.gnome.Kiosk.Script.service.in b/kiosk-script/systemd/org.gnome.Kiosk.Script.service.in
new file mode 100644
index 0000000..8194f1c
--- /dev/null
+++ b/kiosk-script/systemd/org.gnome.Kiosk.Script.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Kiosk script
+BindsTo=gnome-session.target
+After=gnome-session.target
+
+[Service]
+ExecStart=@bindir@/gnome-kiosk-script
+Restart=always
diff --git a/kiosk-script/systemd/session.conf b/kiosk-script/systemd/session.conf
new file mode 100644
index 0000000..a948efb
--- /dev/null
+++ b/kiosk-script/systemd/session.conf
@@ -0,0 +1,3 @@
+[Unit]
+Requires=org.gnome.Kiosk.target
+Requires=org.gnome.Kiosk.Script.service
diff --git a/kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in b/kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in
new file mode 100644
index 0000000..05e8dea
--- /dev/null
+++ b/kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Kiosk Script Session (Wayland Display Server)
+Comment=This session logs you into the sessoin started by ~/.local/bin/gnome-kiosk-script
+Exec=gnome-session --session gnome-kiosk-script
+TryExec=gnome-session
+Type=Application
+DesktopNames=GNOME-Kiosk;GNOME;
+X-GDM-SessionRegisters=true
+
diff --git a/kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in b/kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in
new file mode 100644
index 0000000..11dc0cf
--- /dev/null
+++ b/kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Kiosk Script Session (X11 Display Server)
+Comment=This session logs you into the sessoin started by ~/.local/bin/gnome-kiosk-script
+Exec=gnome-session --session gnome-kiosk-script
+TryExec=gnome-session
+Type=Application
+DesktopNames=GNOME-Kiosk;GNOME;
+X-GDM-SessionRegisters=true
+
diff --git a/meson.build b/meson.build
index c2988ad..1f5a756 100644
--- a/meson.build
+++ b/meson.build
@@ -1,49 +1,50 @@
project('gnome-kiosk', 'c',
version: '40.0'
)
add_project_arguments('-D_GNU_SOURCE',
language: 'c'
)
c_compiler = meson.get_compiler('c')
gnome = import('gnome')
i18n = import('i18n')
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
bindir = join_paths(prefix, get_option('bindir'))
localedir = join_paths(datadir, 'locale')
desktop_data_dir = join_paths(datadir, 'applications')
session_dir = join_paths(datadir, 'gnome-session', 'sessions')
xsessions_dir = join_paths(datadir, 'xsessions')
+wayland_sessions_dir = join_paths(datadir, 'wayland-sessions')
po_dir = join_paths(meson.current_source_dir(), 'po')
config_data = configuration_data()
config_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
config_data.set_quoted('VERSION', meson.project_version())
config_data.set_quoted('LOCALEDIR', localedir)
config_h = configure_file(
input: 'config.h.meson',
output: 'config.h',
configuration: config_data
)
meson.add_install_script ('meson/postinstall.py')
mutter_dependency = dependency('libmutter-8')
mutter_libdir = mutter_dependency.get_pkgconfig_variable('typelibdir')
systemd_user_unit_dir = dependency('systemd').get_pkgconfig_variable('systemduserunitdir',
define_variable: ['prefix', prefix])
systemd_dependency = dependency('libsystemd')
dbus_proxies = []
dbus_proxies += {
'prefix': 'org.gnome.DisplayManager',
'namespace': 'Gdm',
'interface': 'Manager',
}
@@ -139,62 +140,118 @@ desktop_file = configure_file(
input: 'compositor/data/org.gnome.Kiosk.desktop.in.in',
output: 'org.gnome.Kiosk.desktop.in',
configuration: desktop_config_data
)
i18n.merge_file('desktop',
input: desktop_file,
output: 'org.gnome.Kiosk.desktop',
po_dir: po_dir,
install: true,
install_dir: desktop_data_dir,
type: 'desktop'
)
systemd_service_config_data = configuration_data()
systemd_service_config_data.set('bindir', bindir)
systemd_service_files = []
systemd_service_files += 'compositor/data/systemd/org.gnome.Kiosk@wayland.service.in'
systemd_service_files += 'compositor/data/systemd/org.gnome.Kiosk@x11.service.in'
foreach service_file : systemd_service_files
configure_file(
input: service_file,
output: '@BASENAME@',
configuration: systemd_service_config_data,
install_dir: systemd_user_unit_dir
)
endforeach
-install_data('compositor/data/systemd/org.gnome.Kiosk.target',
- install_dir: systemd_user_unit_dir)
+install_data(
+ 'compositor/data/systemd/org.gnome.Kiosk.target',
+ install_dir: systemd_user_unit_dir
+)
+
+install_data('kiosk-script/gnome-kiosk-script',
+ install_dir: bindir,
+ install_mode: 'rwxr-xr-x'
+)
+
+desktop_file = configure_file(
+ input: 'kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in',
+ output: 'org.gnome.Kiosk.Script.desktop.in',
+ configuration: desktop_config_data
+)
+
+i18n.merge_file('desktop',
+ input: desktop_file,
+ output: 'org.gnome.Kiosk.Script.desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: desktop_data_dir,
+ type: 'desktop'
+)
+
+configure_file(
+ input: 'kiosk-script/systemd/org.gnome.Kiosk.Script.service.in',
+ output: '@BASENAME@',
+ configuration: systemd_service_config_data,
+ install_dir: systemd_user_unit_dir
+)
+
+kiosk_script_systemd_target_dir = join_paths(systemd_user_unit_dir, 'gnome-session@gnome-kiosk-script.target.d')
+install_data('kiosk-script/systemd/session.conf',
+ install_dir: kiosk_script_systemd_target_dir
+)
+
+install_data('kiosk-script/gnome-session/gnome-kiosk-script.session',
+ install_dir: session_dir,
+)
+
+i18n.merge_file('desktop',
+ input: 'kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in',
+ output: '@BASENAME@',
+ po_dir: po_dir,
+ install: true,
+ install_dir: xsessions_dir,
+ type: 'desktop'
+)
+
+i18n.merge_file('desktop',
+ input: 'kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in',
+ output: '@BASENAME@',
+ po_dir: po_dir,
+ install: true,
+ install_dir: wayland_sessions_dir,
+ type: 'desktop'
+)
session_config_data = configuration_data()
session_config_data.set('required_components', 'org.gnome.Kiosk;org.gnome.Kiosk.SearchApp;')
session_file = configure_file(
input: 'search-app/org.gnome.Kiosk.SearchApp.session.desktop.in.in',
output: 'org.gnome.Kiosk.SearchApp.session.desktop.in',
configuration: session_config_data
)
subdir('input-selector')
i18n.merge_file('desktop',
input: session_file,
output: 'org.gnome.Kiosk.SearchApp.session',
po_dir: po_dir,
install: true,
install_dir: session_dir,
type: 'desktop'
)
i18n.merge_file('desktop',
input: 'search-app/org.gnome.Kiosk.SearchApp.Session.desktop.in',
output: 'org.gnome.Kiosk.SearchApp.Session.desktop',
po_dir: po_dir,
install: true,
install_dir: xsessions_dir,
type: 'desktop'
)
--
2.31.1

View File

@ -1,31 +0,0 @@
From dccfdfa0852cba4b2ccd7d0daa8f9c779af4cb16 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 11 Aug 2021 14:51:22 -0400
Subject: [PATCH 2/6] kiosk-script: Make sure desktop file for script is hidden
under systemd
At the moment the kiosk-script session supports both systemd --user
sessions and old school gonme-session-only sessions. Unfortunately,
the desktop file for the Script application is missing the magic line
to make it get ignored when systemd --user is used.
That leads to the script getting started twice
This commit adds the magic line.
---
kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in b/kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in
index dd562b2..981dbc9 100644
--- a/kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in
+++ b/kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in
@@ -1,4 +1,5 @@
[Desktop Entry]
Name=Kiosk Script
Type=Application
Exec=gnome-kiosk-script
+X-GNOME-HiddenUnderSystemd=true
--
2.31.1

View File

@ -1,62 +0,0 @@
From 0a9f3dc7cd45bda1fae2e17ab5ef17b1187327a2 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 11 Aug 2021 15:00:20 -0400
Subject: [PATCH 3/6] kiosk-script: Install session file with fallback in mind
---
meson/postinstall.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meson/postinstall.py b/meson/postinstall.py
index 537fb3f..ace3927 100755
--- a/meson/postinstall.py
+++ b/meson/postinstall.py
@@ -1,38 +1,44 @@
#!/usr/bin/env python3
import os
import shutil
import subprocess
import sys
destdir = os.environ.get('DESTDIR', '/')
prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = os.path.join(destdir + prefix, 'share')
+xsessions_dir = os.path.join(datadir, 'xsessions')
wayland_sessions_dir = os.path.join(datadir, 'wayland-sessions')
if not os.path.exists(wayland_sessions_dir):
os.makedirs(wayland_sessions_dir)
-source_file = os.path.join(datadir, 'xsessions', 'org.gnome.Kiosk.SearchApp.Session.desktop')
+source_file = os.path.join(xsessions_dir, 'org.gnome.Kiosk.SearchApp.Session.desktop')
destination_file = os.path.join(wayland_sessions_dir, 'org.gnome.Kiosk.SearchApp.Session.desktop')
shutil.copyfile(source_file, destination_file)
+source_file = os.path.join(xsessions_dir, 'gnome-kiosk-script-xorg.desktop')
+destination_file = os.path.join(xsessions_dir, 'gnome-kiosk-script.desktop')
+source_file = os.path.join(wayland_sessions_dir, 'gnome-kiosk-script-wayland.desktop')
+destination_file = os.path.join(wayland_sessions_dir, 'gnome-kiosk-script.desktop')
+
# Packaging tools define DESTDIR and this isn't needed for them
if 'DESTDIR' not in os.environ:
print('Updating icon cache...')
icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
if not os.path.exists(icon_cache_dir):
os.makedirs(icon_cache_dir)
subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
print('Updating desktop database...')
desktop_database_dir = os.path.join(datadir, 'applications')
if not os.path.exists(desktop_database_dir):
os.makedirs(desktop_database_dir)
subprocess.call(['update-desktop-database', '-q', desktop_database_dir])
print('Compiling GSettings schemas...')
schemas_dir = os.path.join(datadir, 'glib-2.0', 'schemas')
if not os.path.exists(schemas_dir):
os.makedirs(schemas_dir)
subprocess.call(['glib-compile-schemas', schemas_dir])
--
2.31.1

View File

@ -1,188 +0,0 @@
From 2bd27ae9e08d6848ab14cde0a8bf81827df7a98b Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 11 Aug 2021 15:03:38 -0400
Subject: [PATCH 4/6] kiosk-script: Give xsession and wayland-session file the
same name
In order for fallback logic to work properly, the two session names
need to be the same.
This commit fixes that.
---
.../gnome-kiosk-script.desktop.in} | 2 +-
.../gnome-kiosk-script-wayland.desktop.in | 9 ---------
meson.build | 12 ++----------
meson/postinstall.py | 5 ++---
4 files changed, 5 insertions(+), 23 deletions(-)
rename kiosk-script/{xsessions/gnome-kiosk-script-xorg.desktop.in => sessions/gnome-kiosk-script.desktop.in} (84%)
delete mode 100644 kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in
diff --git a/kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in b/kiosk-script/sessions/gnome-kiosk-script.desktop.in
similarity index 84%
rename from kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in
rename to kiosk-script/sessions/gnome-kiosk-script.desktop.in
index 11dc0cf..36f810f 100644
--- a/kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in
+++ b/kiosk-script/sessions/gnome-kiosk-script.desktop.in
@@ -1,9 +1,9 @@
[Desktop Entry]
-Name=Kiosk Script Session (X11 Display Server)
+Name=Kiosk Script Session
Comment=This session logs you into the sessoin started by ~/.local/bin/gnome-kiosk-script
Exec=gnome-session --session gnome-kiosk-script
TryExec=gnome-session
Type=Application
DesktopNames=GNOME-Kiosk;GNOME;
X-GDM-SessionRegisters=true
diff --git a/kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in b/kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in
deleted file mode 100644
index 05e8dea..0000000
--- a/kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=Kiosk Script Session (Wayland Display Server)
-Comment=This session logs you into the sessoin started by ~/.local/bin/gnome-kiosk-script
-Exec=gnome-session --session gnome-kiosk-script
-TryExec=gnome-session
-Type=Application
-DesktopNames=GNOME-Kiosk;GNOME;
-X-GDM-SessionRegisters=true
-
diff --git a/meson.build b/meson.build
index 1f5a756..0faf9fe 100644
--- a/meson.build
+++ b/meson.build
@@ -181,75 +181,67 @@ desktop_file = configure_file(
input: 'kiosk-script/desktop/org.gnome.Kiosk.Script.desktop.in.in',
output: 'org.gnome.Kiosk.Script.desktop.in',
configuration: desktop_config_data
)
i18n.merge_file('desktop',
input: desktop_file,
output: 'org.gnome.Kiosk.Script.desktop',
po_dir: po_dir,
install: true,
install_dir: desktop_data_dir,
type: 'desktop'
)
configure_file(
input: 'kiosk-script/systemd/org.gnome.Kiosk.Script.service.in',
output: '@BASENAME@',
configuration: systemd_service_config_data,
install_dir: systemd_user_unit_dir
)
kiosk_script_systemd_target_dir = join_paths(systemd_user_unit_dir, 'gnome-session@gnome-kiosk-script.target.d')
install_data('kiosk-script/systemd/session.conf',
install_dir: kiosk_script_systemd_target_dir
)
install_data('kiosk-script/gnome-session/gnome-kiosk-script.session',
install_dir: session_dir,
)
-i18n.merge_file('desktop',
- input: 'kiosk-script/xsessions/gnome-kiosk-script-xorg.desktop.in',
- output: '@BASENAME@',
- po_dir: po_dir,
- install: true,
- install_dir: xsessions_dir,
- type: 'desktop'
-)
i18n.merge_file('desktop',
- input: 'kiosk-script/wayland-sessions/gnome-kiosk-script-wayland.desktop.in',
+ input: 'kiosk-script/sessions/gnome-kiosk-script.desktop.in',
output: '@BASENAME@',
po_dir: po_dir,
install: true,
- install_dir: wayland_sessions_dir,
+ install_dir: xsessions_dir,
type: 'desktop'
)
session_config_data = configuration_data()
session_config_data.set('required_components', 'org.gnome.Kiosk;org.gnome.Kiosk.SearchApp;')
session_file = configure_file(
input: 'search-app/org.gnome.Kiosk.SearchApp.session.desktop.in.in',
output: 'org.gnome.Kiosk.SearchApp.session.desktop.in',
configuration: session_config_data
)
subdir('input-selector')
i18n.merge_file('desktop',
input: session_file,
output: 'org.gnome.Kiosk.SearchApp.session',
po_dir: po_dir,
install: true,
install_dir: session_dir,
type: 'desktop'
)
i18n.merge_file('desktop',
input: 'search-app/org.gnome.Kiosk.SearchApp.Session.desktop.in',
output: 'org.gnome.Kiosk.SearchApp.Session.desktop',
po_dir: po_dir,
install: true,
install_dir: xsessions_dir,
type: 'desktop'
diff --git a/meson/postinstall.py b/meson/postinstall.py
index ace3927..430ae6c 100755
--- a/meson/postinstall.py
+++ b/meson/postinstall.py
@@ -1,44 +1,43 @@
#!/usr/bin/env python3
import os
import shutil
import subprocess
import sys
destdir = os.environ.get('DESTDIR', '/')
prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = os.path.join(destdir + prefix, 'share')
xsessions_dir = os.path.join(datadir, 'xsessions')
wayland_sessions_dir = os.path.join(datadir, 'wayland-sessions')
if not os.path.exists(wayland_sessions_dir):
os.makedirs(wayland_sessions_dir)
source_file = os.path.join(xsessions_dir, 'org.gnome.Kiosk.SearchApp.Session.desktop')
destination_file = os.path.join(wayland_sessions_dir, 'org.gnome.Kiosk.SearchApp.Session.desktop')
shutil.copyfile(source_file, destination_file)
-source_file = os.path.join(xsessions_dir, 'gnome-kiosk-script-xorg.desktop')
-destination_file = os.path.join(xsessions_dir, 'gnome-kiosk-script.desktop')
-source_file = os.path.join(wayland_sessions_dir, 'gnome-kiosk-script-wayland.desktop')
+source_file = os.path.join(xsessions_dir, 'gnome-kiosk-script.desktop')
destination_file = os.path.join(wayland_sessions_dir, 'gnome-kiosk-script.desktop')
+shutil.copyfile(source_file, destination_file)
# Packaging tools define DESTDIR and this isn't needed for them
if 'DESTDIR' not in os.environ:
print('Updating icon cache...')
icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
if not os.path.exists(icon_cache_dir):
os.makedirs(icon_cache_dir)
subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
print('Updating desktop database...')
desktop_database_dir = os.path.join(datadir, 'applications')
if not os.path.exists(desktop_database_dir):
os.makedirs(desktop_database_dir)
subprocess.call(['update-desktop-database', '-q', desktop_database_dir])
print('Compiling GSettings schemas...')
schemas_dir = os.path.join(datadir, 'glib-2.0', 'schemas')
if not os.path.exists(schemas_dir):
os.makedirs(schemas_dir)
subprocess.call(['glib-compile-schemas', schemas_dir])
--
2.31.1

View File

@ -1,46 +0,0 @@
From eeb5eb5688fd55fad3bb7e07c250cdd1f580b5ca Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 11 Aug 2021 15:05:22 -0400
Subject: [PATCH 5/6] kiosk-script: Add a hint about using firefox to the kiosk
script
Many kiosk deployments are going to use a web browser, so it makes
sense to give a hint about how to do that.
This commit suggests firefox --kiosk in the script comment
---
kiosk-script/gnome-kiosk-script | 1 +
1 file changed, 1 insertion(+)
diff --git a/kiosk-script/gnome-kiosk-script b/kiosk-script/gnome-kiosk-script
index b595cd8..989af41 100755
--- a/kiosk-script/gnome-kiosk-script
+++ b/kiosk-script/gnome-kiosk-script
@@ -1,23 +1,24 @@
#!/usr/bin/sh
if [ ! -e ~/.local/bin/gnome-kiosk-script ]; then
mkdir -p ~/.local/bin ~/.config
cat > ~/.local/bin/gnome-kiosk-script <<- "EOF"
#!/bin/sh
# This script is located in ~/.local/bin.
# It's provided as an example script to show how
# the kiosk session works. At the moment, the script
# just starts a text editor open to itself, but it
# should get customized to instead start a full screen
# application designed for the kiosk deployment.
+ # e.g., firefox --kiosk https://www.google.com
gedit ~/.local/bin/gnome-kiosk-script
sleep 1.0
exec "$0" "$@"
EOF
chmod +x ~/.local/bin/gnome-kiosk-script
touch ~/.config/gnome-initial-setup-done
fi
exec ~/.local/bin/gnome-kiosk-script "$@"
--
2.31.1

View File

@ -1,28 +0,0 @@
From 3e9a6ea82edc0bbd57c0d3088186c30823b956ec Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 11 Aug 2021 15:06:42 -0400
Subject: [PATCH 6/6] kiosk-script: Send SIGHUP to script at shutdown time
Since the kiosk script is a shell script, it ignores SIGTERM.
We should send it a hang up signal first to make it comply.
---
kiosk-script/systemd/org.gnome.Kiosk.Script.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/kiosk-script/systemd/org.gnome.Kiosk.Script.service.in b/kiosk-script/systemd/org.gnome.Kiosk.Script.service.in
index 8194f1c..e4da546 100644
--- a/kiosk-script/systemd/org.gnome.Kiosk.Script.service.in
+++ b/kiosk-script/systemd/org.gnome.Kiosk.Script.service.in
@@ -1,8 +1,9 @@
[Unit]
Description=Kiosk script
BindsTo=gnome-session.target
After=gnome-session.target
[Service]
ExecStart=@bindir@/gnome-kiosk-script
Restart=always
+SendSIGHUP=true
--
2.31.1

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}

View File

@ -2,54 +2,53 @@
%global major_version %(echo -n %{tarball_version} | sed 's/[.].*//')
%global gettext_version 0.19.6
%global gnome_desktop_version 40~rc
%global gnome_desktop_version 44.0
%global glib2_version 2.68.0
%global gtk4_version 3.24.27
%global mutter_version 40.0
%global mutter_version 47~alpha
%global gsettings_desktop_schemas_version 40~rc
%global ibus_version 1.5.24
%global gnome_settings_daemon_version 40~rc
Name: gnome-kiosk
Version: 40.0
Release: 5%{?dist}
Version: 47.0
Release: %{autorelease}
Summary: Window management and application launching for GNOME
License: GPLv2+
URL: https://gitlab.gnome.org/halfline/gnome-kiosk
License: GPL-2.0-or-later
URL: https://gitlab.gnome.org/GNOME/gnome-kiosk
Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{tarball_version}.tar.xz
Provides: firstboot(windowmanager) = %{name}
BuildRequires: dconf
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: gettext >= %{gettext_version}
BuildRequires: git
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gobject-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gnome-desktop-3.0) >= %{gnome_desktop_version}
BuildRequires: pkgconfig(gtk4) >= %{gtk4_version}
BuildRequires: pkgconfig(ibus-1.0) >= %{ibus_version}
BuildRequires: pkgconfig(libmutter-8) >= %{mutter_version}
BuildRequires: mesa-libEGL-devel
BuildRequires: mesa-libGL-devel
BuildRequires: meson
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gobject-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gnome-desktop-4) >= %{gnome_desktop_version}
BuildRequires: pkgconfig(gtk4) >= %{gtk4_version}
BuildRequires: pkgconfig(ibus-1.0) >= %{ibus_version}
BuildRequires: pkgconfig(libmutter-15) >= %{mutter_version}
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
Requires: gnome-settings-daemon%{?_isa} >= %{gnome_settings_daemon_version}
Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version}
Patch10001: 0001-compositor-Support-systemd-user-sessions.patch
Patch10002: 0002-Add-a-script-for-simplifying-kiosk-setup.patch
Patch20001: 0001-compositor-Ignore-some-of-the-builtin-keybindings.patch
Patch20002: 0002-kiosk-script-Make-sure-desktop-file-for-script-is-hi.patch
Patch20003: 0003-kiosk-script-Install-session-file-with-fallback-in-m.patch
Patch20004: 0004-kiosk-script-Give-xsession-and-wayland-session-file-.patch
Patch20005: 0005-kiosk-script-Add-a-hint-about-using-firefox-to-the-k.patch
Patch20006: 0006-kiosk-script-Send-SIGHUP-to-script-at-shutdown-time.patch
Patch30001: 0001-compositor-Be-more-permissive-about-what-s-considere.patch
Patch0: 0001-kiosk-app-Do-not-add-the-window-in-kiosk_app_new_for.patch
# https://issues.redhat.com/browse/RHEL-36521
Patch1: 0001-search-app-Use-firefox-from-flatpak.patch
# https://issues.redhat.com/browse/RHEL-71757
Patch2: 0001-kiosk-script-Copy-and-run-the-script-from-XDG_RUNTIM.patch
# https://issues.redhat.com/browse/RHEL-62420
Patch3: 0001-compositor-Add-screenshot-utilities.patch
Patch4: 0002-compositor-Add-Shell-Screenshot-support.patch
%description
GNOME Kiosk provides a desktop enviroment suitable for fixed purpose, or
@ -57,10 +56,10 @@ single application deployments like wall displays and point-of-sale systems.
%package search-appliance
Summary: Example search application application that uses GNOME Kiosk
License: GPLv2+
Requires: %{name} = %{version}-%{release}
Requires: firefox
Recommends: firefox
Requires: gnome-session
Requires: flatpak
BuildArch: noarch
%description search-appliance
@ -68,7 +67,6 @@ This package provides a full screen firefox window pointed to google.
%package script-session
Summary: Basic session used for running kiosk application from shell script
License: GPLv2+
Requires: %{name} = %{version}-%{release}
Recommends: gedit
Requires: gnome-session
@ -93,71 +91,29 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Kiosk.Searc
%files
%license COPYING
%doc README.md
%doc NEWS README.md
%{_bindir}/gnome-kiosk
%{_datadir}/applications/org.gnome.Kiosk.desktop
%{_datadir}/dconf/profile/gnomekiosk
%{_datadir}/gnome-kiosk/gnomekiosk.dconf.compiled
%{_userunitdir}/org.gnome.Kiosk.target
%{_userunitdir}/org.gnome.Kiosk@wayland.service
%{_userunitdir}/org.gnome.Kiosk@x11.service
%files -n gnome-kiosk-script-session
%{_bindir}/gnome-kiosk-script
%{_userunitdir}/gnome-session@gnome-kiosk-script.target.d/session.conf
%{_userunitdir}/org.gnome.Kiosk.Script.service
%{_datadir}/applications/org.gnome.Kiosk.Script.desktop
%{_datadir}/gnome-session/sessions/gnome-kiosk-script.session
%{_datadir}/wayland-sessions/gnome-kiosk-script.desktop
%{_datadir}/xsessions/gnome-kiosk-script.desktop
%files -n gnome-kiosk-search-appliance
%{_datadir}/applications/org.gnome.Kiosk.SearchApp.desktop
%{_datadir}/gnome-session/sessions/org.gnome.Kiosk.SearchApp.session
%{_datadir}/xsessions/org.gnome.Kiosk.SearchApp.Session.desktop
%{_datadir}/wayland-sessions/org.gnome.Kiosk.SearchApp.Session.desktop
%files -n gnome-kiosk-script-session
%{_bindir}/gnome-kiosk-script
%{_userunitdir}/gnome-session@gnome-kiosk-script.target.d/session.conf
%{_userunitdir}/org.gnome.Kiosk.Script.service
%{_datadir}/applications/org.gnome.Kiosk.Script.desktop
%{_datadir}/gnome-session/sessions/gnome-kiosk-script.session
%{_datadir}/wayland-sessions/gnome-kiosk-script-wayland.desktop
%{_datadir}/xsessions/gnome-kiosk-script-xorg.desktop
%changelog
* Wed Nov 09 2022 Ray Strode <rstrode@redhat.com> - 40.0-5
- Detect anaconda as the kiosk app better
Resolves: #1999060
* Wed Aug 11 2021 Ray Strode <rstrode@redhat.com> - 40.0-4
- Fix crash when hitting alt-f2
- Various fixes to the script-session
Related: #1965338
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 40.0-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Aug 06 2021 Ray Strode <rstrode@redhat.com> - 40.0-2
- Support systemd --user sessions
- Add script-session subpackage
Related: #1965338
* Mon May 17 2021 Ray Strode <rstrode@redhat.com> - 40.0-1
- Update to 40.0
Related: #1950042
* Tue Apr 27 2021 Ray Strode <rstrode@redhat.com> - 40~alpha-7
- Fix desktop file
Resolves: #1954285
* Fri Apr 23 2021 Ray Strode <rstrode@redhat.com> - 40~alpha-6
- Add vprovides so initial-setup can use this
* Wed Apr 21 2021 Ray Strode <rstrode@redhat.com> - 40~alpha-5
- Fix keyboard layouts getting out of sync in anaconda
* Tue Apr 20 2021 Ray Strode <rstrode@redhat.com> - 40~alpha-4
- Fix infinite loop
* Mon Apr 19 2021 Ray Strode <rstrode@redhat.com> - 40~alpha-3
- Fix crash
* Sun Apr 18 2021 Ray Strode <rstrode@redhat.com> - 40~alpha-2
- Work with 3rd party keyboard layout selectors
- Be less aggressive about fullscreening windows
* Mon Apr 12 2021 Ray Strode <rstrode@redhat.com> - 40~alpha-1
- Initial import
%autochangelog

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (gnome-kiosk-47.0.tar.xz) = 497b7e3500d4afc38f9d57a4a40c2ea2ad834365989893d71742ce02c1e67cd7976bf884d02248b269a2141ca865845beac97e130bfe1032dbebaa95cfe52e4f