Various fixes to the script-session
- Fix crash when hitting alt-f2 Related: #1965338
This commit is contained in:
parent
7a1746cb8d
commit
b1862a7eb6
239
0001-compositor-Ignore-some-of-the-builtin-keybindings.patch
Normal file
239
0001-compositor-Ignore-some-of-the-builtin-keybindings.patch
Normal file
@ -0,0 +1,239 @@
|
||||
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
|
||||
|
@ -0,0 +1,31 @@
|
||||
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
|
||||
|
@ -0,0 +1,62 @@
|
||||
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
|
||||
|
188
0004-kiosk-script-Give-xsession-and-wayland-session-file-.patch
Normal file
188
0004-kiosk-script-Give-xsession-and-wayland-session-file-.patch
Normal file
@ -0,0 +1,188 @@
|
||||
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
|
||||
|
@ -0,0 +1,46 @@
|
||||
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
|
||||
|
@ -0,0 +1,28 @@
|
||||
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
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
Name: gnome-kiosk
|
||||
Version: 40.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Window management and application launching for GNOME
|
||||
|
||||
License: GPLv2+
|
||||
@ -42,6 +42,13 @@ Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas
|
||||
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
|
||||
|
||||
%description
|
||||
GNOME Kiosk provides a desktop enviroment suitable for fixed purpose, or
|
||||
single application deployments like wall displays and point-of-sale systems.
|
||||
@ -97,8 +104,8 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Kiosk.Searc
|
||||
%{_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
|
||||
%{_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
|
||||
@ -107,6 +114,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Kiosk.Searc
|
||||
%{_datadir}/wayland-sessions/org.gnome.Kiosk.SearchApp.Session.desktop
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user