summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:49:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:49:37 +0000
commit35504d91654321ff2b378229ff13150f53d5aad2 (patch)
treecb85edefc751b37c8423d78c5e5888f42cc01e4b /data
parentInitial commit. (diff)
downloadgnome-session-35504d91654321ff2b378229ff13150f53d5aad2.tar.xz
gnome-session-35504d91654321ff2b378229ff13150f53d5aad2.zip
Adding upstream version 43.0.upstream/43.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'data')
-rw-r--r--data/gnome-custom-session.desktop.in.in5
-rw-r--r--data/gnome-dummy.session.desktop.in.in2
-rw-r--r--data/gnome-launched-override.scope.conf6
-rw-r--r--data/gnome-session-failed.service.in19
-rw-r--r--data/gnome-session-failed.target12
-rw-r--r--data/gnome-session-initialized.target19
-rw-r--r--data/gnome-session-manager.target12
-rw-r--r--data/gnome-session-manager@.service.in19
-rw-r--r--data/gnome-session-monitor.service.in15
-rw-r--r--data/gnome-session-pre.target14
-rw-r--r--data/gnome-session-restart-dbus.service.in11
-rw-r--r--data/gnome-session-shutdown.target33
-rw-r--r--data/gnome-session-signal-init.service.in8
-rw-r--r--data/gnome-session-wayland.target13
-rw-r--r--data/gnome-session-wayland@.target20
-rw-r--r--data/gnome-session-x11-services-ready.target8
-rw-r--r--data/gnome-session-x11-services.target11
-rw-r--r--data/gnome-session-x11.target16
-rw-r--r--data/gnome-session-x11@.target22
-rw-r--r--data/gnome-session.convert3
-rw-r--r--data/gnome-session.target15
-rw-r--r--data/gnome-session@.target16
-rw-r--r--data/gnome-wayland.desktop.in.in8
-rw-r--r--data/gnome-xorg.desktop.in.in8
-rw-r--r--data/gnome.desktop.in.in8
-rw-r--r--data/gnome.session.conf.in5
-rw-r--r--data/gnome.session.desktop.in.in4
-rw-r--r--data/hardware-compatibility32
-rw-r--r--data/meson.build197
-rw-r--r--data/org.gnome.SessionManager.gschema.xml.in24
-rw-r--r--data/session-selector.ui195
31 files changed, 780 insertions, 0 deletions
diff --git a/data/gnome-custom-session.desktop.in.in b/data/gnome-custom-session.desktop.in.in
new file mode 100644
index 0000000..5fadaa0
--- /dev/null
+++ b/data/gnome-custom-session.desktop.in.in
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Name=Custom
+Comment=This entry lets you select a saved session
+Exec=@bindir@/gnome-session-custom-session
+TryExec=@bindir@/gnome-session-custom-session
diff --git a/data/gnome-dummy.session.desktop.in.in b/data/gnome-dummy.session.desktop.in.in
new file mode 100644
index 0000000..1052346
--- /dev/null
+++ b/data/gnome-dummy.session.desktop.in.in
@@ -0,0 +1,2 @@
+[GNOME Session]
+Name=GNOME dummy
diff --git a/data/gnome-launched-override.scope.conf b/data/gnome-launched-override.scope.conf
new file mode 100644
index 0000000..810bf23
--- /dev/null
+++ b/data/gnome-launched-override.scope.conf
@@ -0,0 +1,6 @@
+[Unit]
+CollectMode=inactive-or-failed
+PartOf=graphical-session.target
+
+[Scope]
+TimeoutStopSec=5s
diff --git a/data/gnome-session-failed.service.in b/data/gnome-session-failed.service.in
new file mode 100644
index 0000000..4e22ab7
--- /dev/null
+++ b/data/gnome-session-failed.service.in
@@ -0,0 +1,19 @@
+[Unit]
+Description=GNOME Session Failed lockdown screen (user)
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
+CollectMode=inactive-or-failed
+
+PartOf=gnome-session-failed.target
+
+# We could do this, but it requires an intermediate target for OnFailure
+# handling, so gnome-session-failed checks RUNNING_UNDER_GDM itself
+#Conflicts=gnome-session@gnome-login.target
+# or in the case of GDM and then not passing --allow-logout
+#Requisite=gnome-session@gnome-login.target
+
+[Service]
+Type=simple
+ExecStart=@libexecdir@/gnome-session-failed --allow-logout
+# The fail whale doesn't trigger a shutdown itself, so do it here
+ExecStopPost=-@libexecdir@/gnome-session-ctl --shutdown
diff --git a/data/gnome-session-failed.target b/data/gnome-session-failed.target
new file mode 100644
index 0000000..3ad2eb1
--- /dev/null
+++ b/data/gnome-session-failed.target
@@ -0,0 +1,12 @@
+[Unit]
+Description=GNOME Session Failed
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
+
+# We need an initialized session
+Requisite=gnome-session-initialized.target
+BindsTo=gnome-session-initialized.target
+After=gnome-session-initialized.target
+
+BindsTo=gnome-session-failed.service
+After=gnome-session-failed.service
diff --git a/data/gnome-session-initialized.target b/data/gnome-session-initialized.target
new file mode 100644
index 0000000..3ef2ecf
--- /dev/null
+++ b/data/gnome-session-initialized.target
@@ -0,0 +1,19 @@
+[Unit]
+Description=GNOME Session is initialized
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
+DefaultDependencies=no
+RefuseManualStart=yes
+RefuseManualStop=yes
+
+Requires=gnome-session-pre.target
+After=gnome-session-pre.target
+
+Requisite=gnome-session.target
+PartOf=gnome-session.target
+Before=gnome-session.target
+
+# Signal gnome-session that we reached the initialized target and
+# that it may start applications.
+Requires=gnome-session-signal-init.service
+Before=gnome-session-signal-init.service
diff --git a/data/gnome-session-manager.target b/data/gnome-session-manager.target
new file mode 100644
index 0000000..a9d2053
--- /dev/null
+++ b/data/gnome-session-manager.target
@@ -0,0 +1,12 @@
+[Unit]
+Description=GNOME Session Manager is ready
+DefaultDependencies=no
+RefuseManualStart=yes
+RefuseManualStop=yes
+
+Requisite=gnome-session-pre.target
+After=gnome-session-pre.target
+
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
diff --git a/data/gnome-session-manager@.service.in b/data/gnome-session-manager@.service.in
new file mode 100644
index 0000000..b06dbeb
--- /dev/null
+++ b/data/gnome-session-manager@.service.in
@@ -0,0 +1,19 @@
+[Unit]
+Description=GNOME Session Manager (session: %i)
+RefuseManualStart=yes
+RefuseManualStop=yes
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
+CollectMode=inactive-or-failed
+
+Requisite=gnome-session-pre.target
+After=gnome-session-pre.target
+
+Requires=gnome-session-manager.target
+PartOf=gnome-session-manager.target
+Before=gnome-session-manager.target
+
+[Service]
+Type=notify
+ExecStart=@libexecdir@/gnome-session-binary --systemd-service --session=%i
+ExecStopPost=-@libexecdir@/gnome-session-ctl --shutdown
diff --git a/data/gnome-session-monitor.service.in b/data/gnome-session-monitor.service.in
new file mode 100644
index 0000000..5e5edb7
--- /dev/null
+++ b/data/gnome-session-monitor.service.in
@@ -0,0 +1,15 @@
+[Unit]
+Description=Monitor Session leader for GNOME Session
+CollectMode=inactive-or-failed
+
+# All services started after gnome-session-pre.target need to be torn down
+# before the session finish can be signalled back to the display manager.
+PartOf=gnome-session-pre.target
+Before=gnome-session-pre.target
+
+# No After, as we want this to start up immediately
+
+[Service]
+Type=notify
+ExecStart=@libexecdir@/gnome-session-ctl --monitor
+TimeoutStopSec=5
diff --git a/data/gnome-session-pre.target b/data/gnome-session-pre.target
new file mode 100644
index 0000000..b6cad85
--- /dev/null
+++ b/data/gnome-session-pre.target
@@ -0,0 +1,14 @@
+[Unit]
+Description=Tasks to be run before GNOME Session starts
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
+DefaultDependencies=no
+RefuseManualStart=yes
+RefuseManualStop=yes
+
+Requires=graphical-session-pre.target
+After=graphical-session-pre.target
+
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
diff --git a/data/gnome-session-restart-dbus.service.in b/data/gnome-session-restart-dbus.service.in
new file mode 100644
index 0000000..6389c32
--- /dev/null
+++ b/data/gnome-session-restart-dbus.service.in
@@ -0,0 +1,11 @@
+[Unit]
+Description=Restart DBus after GNOME Session shutdown
+
+# Allow exit.target to start even if this unit is started with replace-irreversibly.
+# For this to work, we also need to be in the root slice.
+DefaultDependencies=no
+
+[Service]
+Type=notify
+ExecStart=@libexecdir@/gnome-session-ctl --restart-dbus
+Slice=-.slice
diff --git a/data/gnome-session-shutdown.target b/data/gnome-session-shutdown.target
new file mode 100644
index 0000000..2c3d196
--- /dev/null
+++ b/data/gnome-session-shutdown.target
@@ -0,0 +1,33 @@
+[Unit]
+Description=Shutdown running GNOME Session
+
+# Allow exit.target to start even if this unit is started with replace-irreversibly.
+# All (weak) dependencies need to do the same. Services also need to ensure they
+# are in the root slice by setting Slice=-.slice.
+DefaultDependencies=no
+
+Conflicts=graphical-session.target graphical-session-pre.target
+After=graphical-session.target graphical-session-pre.target
+
+# Add explicit conflicts/after lines for gnome-session targets, technically
+# this should not be needed, but is an extra safety measure.
+Conflicts=gnome-session.target gnome-session-manager.target
+After=gnome-session.target gnome-session-manager.target
+
+Conflicts=gnome-session-pre.target gnome-session-initialized.target gnome-session-failed.target
+After=gnome-session-pre.target gnome-session-initialized.target gnome-session-failed.target
+
+# We need to make sure this unit is stopped; primarily so that the tree of
+# units that we created is completely cleaned.
+# Note that this can also be improved by reversing the conflicts above and
+# not listing them in the shutdown unit.
+StopWhenUnneeded=true
+
+# We trigger a restart of DBus after reaching the shutdown target this
+# is a workaround so that DBus services that do not connect to the
+# display server are shut down after log-out.
+# This should be removed when the relevant services add a
+# PartOf=graphical-session.target
+# Historic bug: https://bugzilla.gnome.org/show_bug.cgi?id=764029
+Wants=gnome-session-restart-dbus.service
+Before=gnome-session-restart-dbus.service
diff --git a/data/gnome-session-signal-init.service.in b/data/gnome-session-signal-init.service.in
new file mode 100644
index 0000000..e3d2c46
--- /dev/null
+++ b/data/gnome-session-signal-init.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Signal initialization done to GNOME Session Manager
+
+PartOf=gnome-session.target
+
+[Service]
+Type=oneshot
+ExecStart=@libexecdir@/gnome-session-ctl --signal-init
diff --git a/data/gnome-session-wayland.target b/data/gnome-session-wayland.target
new file mode 100644
index 0000000..6552b4d
--- /dev/null
+++ b/data/gnome-session-wayland.target
@@ -0,0 +1,13 @@
+[Unit]
+Description=GNOME Wayland Session
+# On wayland all is lost, do a shutdown
+OnFailure=gnome-session-shutdown.target
+OnFailureJobMode=replace-irreversibly
+# Avoid default After/Before rules
+DefaultDependencies=no
+
+Before=gnome-session.target
+
+PartOf=graphical-session.target
+RefuseManualStart=yes
+RefuseManualStop=yes
diff --git a/data/gnome-session-wayland@.target b/data/gnome-session-wayland@.target
new file mode 100644
index 0000000..ba2a918
--- /dev/null
+++ b/data/gnome-session-wayland@.target
@@ -0,0 +1,20 @@
+[Unit]
+Description=GNOME Wayland Session (session: %i)
+DefaultDependencies=no
+# Start happens explicitly
+RefuseManualStart=no
+# Stop happens by starting gnome-session-shutdown.target
+RefuseManualStop=yes
+
+Conflicts=shutdown.target gnome-session-shutdown.target
+PartOf=graphical-session.target
+
+# As this is the main entry point, pull in the other toplevel gnome-session targets
+Requires=gnome-session@.target
+After=gnome-session@.target
+
+Requires=gnome-session-wayland.target
+After=gnome-session-wayland.target
+
+Requires=gnome-session.target
+After=gnome-session.target
diff --git a/data/gnome-session-x11-services-ready.target b/data/gnome-session-x11-services-ready.target
new file mode 100644
index 0000000..371e173
--- /dev/null
+++ b/data/gnome-session-x11-services-ready.target
@@ -0,0 +1,8 @@
+[Unit]
+Description=GNOME session X11 services
+DefaultDependencies=no
+
+BindsTo=gnome-session-x11-services.target
+After=gnome-session-x11-services.target
+
+Before=gnome-session.target
diff --git a/data/gnome-session-x11-services.target b/data/gnome-session-x11-services.target
new file mode 100644
index 0000000..5c63db5
--- /dev/null
+++ b/data/gnome-session-x11-services.target
@@ -0,0 +1,11 @@
+[Unit]
+Description=GNOME session X11 services
+DefaultDependencies=no
+
+Requisite=gnome-session-initialized.target
+After=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+
+Requisite=gnome-session-x11-services-ready.target
+Before=gnome-session-x11-services-ready.target
+PartOf=gnome-session-x11-services-ready.target
diff --git a/data/gnome-session-x11.target b/data/gnome-session-x11.target
new file mode 100644
index 0000000..e13cc9e
--- /dev/null
+++ b/data/gnome-session-x11.target
@@ -0,0 +1,16 @@
+[Unit]
+Description=GNOME X11 Session
+# On X11, try to show the fail screen
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+# Avoid default After/Before rules
+DefaultDependencies=no
+
+Before=gnome-session.target
+
+PartOf=graphical-session.target
+RefuseManualStart=yes
+RefuseManualStop=yes
+
+# Pull in all X11-specific services the session might depend on
+Requires=gnome-session-x11-services.target
diff --git a/data/gnome-session-x11@.target b/data/gnome-session-x11@.target
new file mode 100644
index 0000000..ce5879b
--- /dev/null
+++ b/data/gnome-session-x11@.target
@@ -0,0 +1,22 @@
+[Unit]
+Description=GNOME X11 Session (session: %i)
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+DefaultDependencies=no
+# Start happens explicitly
+RefuseManualStart=no
+# Stop happens by starting gnome-session-shutdown.target
+#RefuseManualStop=yes
+
+Conflicts=shutdown.target gnome-session-shutdown.target
+PartOf=graphical-session.target
+
+# As this is the main entry point, pull in the other toplevel gnome-session targets
+BindsTo=gnome-session@.target
+After=gnome-session@.target
+
+BindsTo=gnome-session-x11.target
+After=gnome-session-x11.target
+
+BindsTo=gnome-session.target
+After=gnome-session.target
diff --git a/data/gnome-session.convert b/data/gnome-session.convert
new file mode 100644
index 0000000..fd4dfab
--- /dev/null
+++ b/data/gnome-session.convert
@@ -0,0 +1,3 @@
+[org.gnome.SessionManager]
+auto-save-session = /apps/gnome-session/options/auto_save_session
+logout-prompt = /apps/gnome-session/options/logout_prompt
diff --git a/data/gnome-session.target b/data/gnome-session.target
new file mode 100644
index 0000000..ea30555
--- /dev/null
+++ b/data/gnome-session.target
@@ -0,0 +1,15 @@
+[Unit]
+Description=GNOME Session
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+DefaultDependencies=no
+RefuseManualStart=yes
+RefuseManualStop=yes
+
+BindsTo=graphical-session.target
+Before=graphical-session.target
+
+# gnome-session-monitor.service will quit with the session leader process
+# gnome-session.target pulls in graphical-session.target
+BindsTo=gnome-session-monitor.service
+After=gnome-session-monitor.service
diff --git a/data/gnome-session@.target b/data/gnome-session@.target
new file mode 100644
index 0000000..536d9c0
--- /dev/null
+++ b/data/gnome-session@.target
@@ -0,0 +1,16 @@
+[Unit]
+Description=GNOME Session (session: %i)
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+DefaultDependencies=no
+RefuseManualStart=yes
+RefuseManualStop=yes
+
+Requires=gnome-session-initialized.target
+After=gnome-session-initialized.target
+
+Requisite=gnome-session.target
+PartOf=gnome-session.target
+Before=gnome-session.target
+
+Requires=gnome-session-manager@.service
diff --git a/data/gnome-wayland.desktop.in.in b/data/gnome-wayland.desktop.in.in
new file mode 100644
index 0000000..b48eecd
--- /dev/null
+++ b/data/gnome-wayland.desktop.in.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=GNOME on Wayland
+Comment=This session logs you into GNOME
+Exec=@bindir@/gnome-session
+TryExec=@bindir@/gnome-session
+Type=Application
+DesktopNames=GNOME
+X-GDM-SessionRegisters=true
diff --git a/data/gnome-xorg.desktop.in.in b/data/gnome-xorg.desktop.in.in
new file mode 100644
index 0000000..9a76fac
--- /dev/null
+++ b/data/gnome-xorg.desktop.in.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=GNOME on Xorg
+Comment=This session logs you into GNOME
+Exec=@bindir@/gnome-session
+TryExec=@bindir@/gnome-session
+Type=Application
+DesktopNames=GNOME
+X-GDM-SessionRegisters=true
diff --git a/data/gnome.desktop.in.in b/data/gnome.desktop.in.in
new file mode 100644
index 0000000..7eec1de
--- /dev/null
+++ b/data/gnome.desktop.in.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=GNOME
+Comment=This session logs you into GNOME
+Exec=@bindir@/gnome-session
+TryExec=@bindir@/gnome-session
+Type=Application
+DesktopNames=GNOME
+X-GDM-SessionRegisters=true
diff --git a/data/gnome.session.conf.in b/data/gnome.session.conf.in
new file mode 100644
index 0000000..3f79d9e
--- /dev/null
+++ b/data/gnome.session.conf.in
@@ -0,0 +1,5 @@
+[Unit]
+# Must be in sync with gnome.session
+@wants_required_components@
+
+Requires=@requires_component@.target
diff --git a/data/gnome.session.desktop.in.in b/data/gnome.session.desktop.in.in
new file mode 100644
index 0000000..b3ea9fc
--- /dev/null
+++ b/data/gnome.session.desktop.in.in
@@ -0,0 +1,4 @@
+[GNOME Session]
+Name=GNOME
+# Must be in sync with gnome-session@gnome.target.d/gnome.session.conf drop-in
+RequiredComponents=@required_components@;
diff --git a/data/hardware-compatibility b/data/hardware-compatibility
new file mode 100644
index 0000000..48b7946
--- /dev/null
+++ b/data/hardware-compatibility
@@ -0,0 +1,32 @@
+##
+## This file contains a list of blacklist/whitelist regular expressions for
+## renderer strings.
+##
+## The regular expressions are case-insensitive POSIX Extended Regular
+## Expressions. See regex(7) for details.
+##
+## Syntax:
+## - Comment lines start with '#'
+## - Lines starting with '+' are whitelisting.
+## - Lines starting with '-' are blacklisting.
+## - Lines not starting with '#', '+', '-' are ignored.
+##
+
+# Intel 830-865
+-Intel\(R\) 8[[:digit:]]{2,2}[^[:digit:]]
+
+# Intel IGD
+-Intel IGD
+
+# Pre-R300 radeon
+-Mesa DRI R[12]00[^[:digit:]]
+-Mesa DRI R[12]00$
+
+# Old Mesa software GL renderer
+-software rasterizer
+
+# Gallium has softpipe; we explicitly enable llvmpipe
+-softpipe
+
+# nouveau vieux NV25 doesn't work too well
+-Mesa DRI nv25
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..f6d264f
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,197 @@
+desktop_plain = 'gnome'
+
+desktops = [
+ desktop_plain,
+ 'gnome-xorg',
+ 'gnome-wayland',
+]
+
+shell_component = {
+ desktop_plain: 'org.gnome.Shell',
+}
+
+required_components = {
+ desktop_plain: [
+ 'org.gnome.SettingsDaemon.A11ySettings',
+ 'org.gnome.SettingsDaemon.Color',
+ 'org.gnome.SettingsDaemon.Datetime',
+ 'org.gnome.SettingsDaemon.Housekeeping',
+ 'org.gnome.SettingsDaemon.Keyboard',
+ 'org.gnome.SettingsDaemon.MediaKeys',
+ 'org.gnome.SettingsDaemon.Power',
+ 'org.gnome.SettingsDaemon.PrintNotifications',
+ 'org.gnome.SettingsDaemon.Rfkill',
+ 'org.gnome.SettingsDaemon.ScreensaverProxy',
+ 'org.gnome.SettingsDaemon.Sharing',
+ 'org.gnome.SettingsDaemon.Smartcard',
+ 'org.gnome.SettingsDaemon.Sound',
+ 'org.gnome.SettingsDaemon.UsbProtection',
+ 'org.gnome.SettingsDaemon.Wacom',
+ 'org.gnome.SettingsDaemon.XSettings',
+ ],
+}
+
+if enable_session_selector
+ desktops += 'gnome-custom-session'
+endif
+
+foreach name: desktops
+ desktop_conf = configuration_data()
+ desktop_conf.set('bindir', session_bindir)
+
+ desktop = name + '.desktop'
+
+ desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+ )
+
+ if name.endswith('-xorg')
+ install_dir = session_datadir / 'xsessions'
+ elif name.endswith('-wayland')
+ install_dir = session_datadir / 'wayland-sessions'
+ else
+ # FIXME: The same target can not be copied into two directories.
+ # There is a workaround in meson_post_install.py until proper
+ # solution arises:
+ # https://github.com/mesonbuild/meson/issues/2416
+ install_dir = session_datadir / 'xsessions'
+ #install_dir = [
+ # join_paths(session_datadir, 'xsessions'),
+ # join_paths(session_datadir, 'wayland-sessions')
+ #]
+ endif
+
+ desktop_target = i18n.merge_file(
+ type: 'desktop',
+ input: desktop_in,
+ output: desktop,
+ po_dir: po_dir,
+ install: true,
+ install_dir: install_dir
+ )
+endforeach
+
+sessions = [
+ 'gnome',
+ 'gnome-dummy'
+]
+
+foreach session: sessions
+ session_file = session + '.session'
+ desktop_conf = configuration_data()
+ desktop_conf.set('libexecdir', session_libexecdir)
+ desktop_conf.set('required_components', ';'.join(
+ [shell_component.get(session, '')] + required_components.get(session, [])))
+
+ desktop = session_file + '.desktop'
+
+ desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+ )
+
+ i18n.merge_file(
+ type: 'desktop',
+ input: desktop_in,
+ output: session_file,
+ po_dir: po_dir,
+ install: true,
+ install_dir: join_paths(session_pkgdatadir, 'sessions')
+ )
+endforeach
+
+schema_conf = configuration_data()
+
+schema = 'org.gnome.SessionManager.gschema.xml'
+
+configure_file(
+ input: schema + '.in',
+ output: schema,
+ install: true,
+ install_dir: join_paths(session_datadir, 'glib-2.0', 'schemas'),
+ configuration: schema_conf
+)
+
+install_data(
+ 'gnome-session.convert',
+ install_dir: join_paths(session_datadir, 'GConf', 'gsettings')
+)
+
+if enable_systemd_session
+ unit_conf = configuration_data()
+ unit_conf.set('libexecdir', session_libexecdir)
+
+ systemd_service = ['gnome-session-manager@.service',
+ 'gnome-session-signal-init.service',
+ 'gnome-session-restart-dbus.service',
+ 'gnome-session-monitor.service',
+ 'gnome-session-failed.service']
+
+ foreach service: systemd_service
+ configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: systemd_userunitdir,
+ configuration: unit_conf
+ )
+ endforeach
+
+ systemd_target = files('gnome-session-wayland@.target',
+ 'gnome-session-wayland.target',
+ 'gnome-session-x11@.target',
+ 'gnome-session-x11.target',
+ 'gnome-session-x11-services.target',
+ 'gnome-session-x11-services-ready.target',
+ 'gnome-session@.target',
+ 'gnome-session.target',
+ 'gnome-session-pre.target',
+ 'gnome-session-manager.target',
+ 'gnome-session-initialized.target',
+ 'gnome-session-shutdown.target',
+ 'gnome-session-failed.target',
+ )
+
+ install_data(
+ systemd_target,
+ install_dir: systemd_userunitdir
+ )
+
+ install_data(
+ 'gnome-launched-override.scope.conf',
+ rename: 'override.conf',
+ install_dir : join_paths(systemd_userunitdir, 'gnome-launched-.scope.d')
+ )
+
+ foreach session, req_components: required_components
+ wanted_targets = []
+ foreach component: req_components
+ wanted_targets += 'Wants=@0@.target'.format(component)
+ endforeach
+
+ configure_file(
+ input: session + '.session.conf.in',
+ output: session + '.session.conf',
+ configuration: {
+ 'requires_component': shell_component[session],
+ 'wants_required_components': '\n'.join(wanted_targets),
+ },
+ install_dir: systemd_userunitdir / 'gnome-session@@0@.target.d'.format(
+ session),
+ )
+ endforeach
+endif
+
+data = files('hardware-compatibility')
+
+if enable_session_selector
+ data += files('session-selector.ui')
+endif
+
+install_data(
+ data,
+ install_dir: session_pkgdatadir
+)
diff --git a/data/org.gnome.SessionManager.gschema.xml.in b/data/org.gnome.SessionManager.gschema.xml.in
new file mode 100644
index 0000000..b2b220d
--- /dev/null
+++ b/data/org.gnome.SessionManager.gschema.xml.in
@@ -0,0 +1,24 @@
+<schemalist gettext-domain="gnome-session-3.0">
+ <schema id="org.gnome.SessionManager" path="/org/gnome/gnome-session/">
+ <key name="auto-save-session" type="b">
+ <default>false</default>
+ <summary>Save sessions</summary>
+ <description>If enabled, gnome-session will save the session automatically.</description>
+ </key>
+ <key name="auto-save-session-one-shot" type="b">
+ <default>false</default>
+ <summary>Save this session</summary>
+ <description>When enabled, gnome-session will automatically save the next session at log out even if auto saving is disabled.</description>
+ </key>
+ <key name="logout-prompt" type="b">
+ <default>true</default>
+ <summary>Logout prompt</summary>
+ <description>If enabled, gnome-session will prompt the user before ending a session.</description>
+ </key>
+ <key name="show-fallback-warning" type="b">
+ <default>true</default>
+ <summary>Show the fallback warning</summary>
+ <description>If enabled, gnome-session will display a warning dialog after login if the session was automatically fallen back.</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/session-selector.ui b/data/session-selector.ui
new file mode 100644
index 0000000..1c55712
--- /dev/null
+++ b/data/session-selector.ui
@@ -0,0 +1,195 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkListStore" id="session-store">
+ <columns>
+ <!-- column-name name -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkTreeModelSort" id="sort-model">
+ <property name="model">session-store</property>
+ </object>
+ <object class="GtkWindow" id="main-window">
+ <property name="title" translatable="yes">Custom Session</property>
+ <property name="window_position">center</property>
+ <property name="default_width">500</property>
+ <property name="default_height">310</property>
+ <property name="decorated">False</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0.5</property>
+ <property name="shadow_type">out</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <object class="GtkInfoBar" id="info-bar">
+ <property name="visible">True</property>
+ <property name="message-type">other</property>
+
+ <child internal-child="content_area">
+ <object class="GtkHBox" id="info-bar-content_area">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">0</property>
+ <child>
+ <object class="GtkLabel" id="info-label">
+ <property name="visible">True</property>
+ <property name="xalign">0.0</property>
+ <property name="yalign">0.5</property>
+ <property name="label" translatable="yes">Please select a custom session to run</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="session-list">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="search_column">0</property>
+ <property name="model">sort-model</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox2">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="new-session">
+ <property name="label" translatable="yes">_New Session</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="remove-session">
+ <property name="label" translatable="yes">_Remove Session</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="rename-session">
+ <property name="label" translatable="yes">Rena_me Session</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox2">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="continue-button">
+ <property name="label" translatable="yes">_Continue</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>