gnome-classic: Define a gnome-session session
For one, this is simply more correct: the gnome-classic session is a different session from the default gnome session. So let's define it as such For two, this enables us to directly tell gnome-shell which shell mode to use, rather than passing it through an environment variable. In other words, this enables us to integrate with https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3960
This commit is contained in:
+7
-1
@@ -15,7 +15,13 @@ SPDX-FileCopyrightText = [
|
||||
SPDX-License-Identifier = "CC-BY-SA-4.0"
|
||||
|
||||
[[annotations]]
|
||||
path = ["**.json.in", "**.desktop.in", "**.gschema.override"]
|
||||
path = [
|
||||
"**.json.in",
|
||||
"**.desktop.in",
|
||||
"**.gschema.override",
|
||||
"**.session",
|
||||
"**.session.conf",
|
||||
]
|
||||
SPDX-FileCopyrightText = "Florian Müllner <fmuellner@gnome.org>"
|
||||
SPDX-License-Identifier = "GPL-2.0-or-later"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=GNOME Classic
|
||||
Comment=This session logs you into GNOME Classic
|
||||
Exec=env GNOME_SHELL_SESSION_MODE=classic gnome-session
|
||||
Exec=gnome-session --session gnome-classic
|
||||
TryExec=gnome-session
|
||||
Type=Application
|
||||
DesktopNames=GNOME-Classic;GNOME;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
[GNOME Session]
|
||||
Name=GNOME Classic
|
||||
@@ -0,0 +1,3 @@
|
||||
[Unit]
|
||||
Requires=gnome-session-services.target
|
||||
Requires=org.gnome.Shell@classic.service
|
||||
@@ -31,3 +31,13 @@ configure_file(
|
||||
|
||||
classic_override = '00_org.gnome.shell.extensions.classic.gschema.override'
|
||||
install_data(classic_override, install_dir: schemadir)
|
||||
|
||||
install_data(
|
||||
'gnome-classic.session',
|
||||
install_dir: sessiondir,
|
||||
)
|
||||
|
||||
install_data(
|
||||
'gnome-classic.session.conf',
|
||||
install_dir: systemd_userunitdir / 'gnome-session@gnome-classic.target.d',
|
||||
)
|
||||
@@ -25,6 +25,13 @@ schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
|
||||
sessiondir = join_paths(datadir, 'gnome-session', 'sessions')
|
||||
wlsessiondir = join_paths(datadir, 'wayland-sessions')
|
||||
|
||||
systemd_dep = dependency('systemd', required: false)
|
||||
systemd_userunitdir = systemd_dep.get_variable(
|
||||
pkgconfig: 'systemduserunitdir',
|
||||
pkgconfig_define: ['prefix', get_option('prefix')],
|
||||
default_value: get_option('prefix') / 'lib' / 'systemd' / 'user',
|
||||
)
|
||||
|
||||
ver_arr = meson.project_version().split('.')
|
||||
shell_version = ver_arr[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user