189 lines
6.9 KiB
Diff
189 lines
6.9 KiB
Diff
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
|
|
|