From df6a79db321da52ce0787c1a88cbfc7918a66e04 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Jan 06 2024 13:27:52 +0000 Subject: Make sure wayland sessions get a login shell --- diff --git a/161.patch b/161.patch new file mode 100644 index 0000000..f4e8b8b --- /dev/null +++ b/161.patch @@ -0,0 +1,73 @@ +From 536f4dd96a444b20c7cf3fa75e7d48b3fb4e1986 Mon Sep 17 00:00:00 2001 +From: Bobby Rong +Date: Sat, 23 Dec 2023 23:24:59 +0800 +Subject: [PATCH] cinnamon-session: make sure wayland sessions get a login + shell + +Users expect their shell profiles to get sourced at startup, which +doesn't happen with wayland sessions. + +This commit brings back that feature, by making the cinnamon-session +wrapper script run a login shell. + +ref: https://gitlab.gnome.org/GNOME/gnome-session/-/commit/7e307f8ddb91db5d4051c4c792519a660ba67f35 +--- + cinnamon-session/cinnamon-session.in | 16 ++++++++++++++++ + cinnamon-session/meson.build | 14 +++++++++++++- + 2 files changed, 29 insertions(+), 1 deletion(-) + create mode 100755 cinnamon-session/cinnamon-session.in + +diff --git a/cinnamon-session/cinnamon-session.in b/cinnamon-session/cinnamon-session.in +new file mode 100755 +index 0000000..d9d7cb2 +--- /dev/null ++++ b/cinnamon-session/cinnamon-session.in +@@ -0,0 +1,16 @@ ++#!/bin/sh ++ ++if [ "x$XDG_SESSION_TYPE" = "xwayland" ] && ++ [ "x$XDG_SESSION_CLASS" != "xgreeter" ] && ++ [ -n "$SHELL" ] && ++ grep -q "$SHELL" /etc/shells && ++ ! (echo "$SHELL" | grep -q "false") && ++ ! (echo "$SHELL" | grep -q "nologin"); then ++ if [ "$1" != '-l' ]; then ++ exec bash -c "exec -l '$SHELL' -c '$0 -l $*'" ++ else ++ shift ++ fi ++fi ++ ++exec @libexecdir@/cinnamon-session-binary "$@" +diff --git a/cinnamon-session/meson.build b/cinnamon-session/meson.build +index a244069..b5e8273 100644 +--- a/cinnamon-session/meson.build ++++ b/cinnamon-session/meson.build +@@ -53,7 +53,7 @@ cinnamon_session_sources = [ + gdbus_sources, + ] + +-executable('cinnamon-session', ++executable('cinnamon-session-binary', + cinnamon_session_sources, + dependencies: [ + cinnamon_desktop, +@@ -75,6 +75,18 @@ executable('cinnamon-session', + ], + include_directories: [ rootInclude ], + install: true, ++ install_dir: get_option('libexecdir'), ++) ++ ++script_conf = configuration_data() ++script_conf.set('libexecdir', get_option('prefix') / get_option('libexecdir')) ++ ++configure_file( ++ input: 'cinnamon-session.in', ++ output: 'cinnamon-session', ++ install: true, ++ install_dir: get_option('bindir'), ++ configuration: script_conf + ) + + units = [ diff --git a/cinnamon-session.spec b/cinnamon-session.spec index 666e0e6..441b671 100644 --- a/cinnamon-session.spec +++ b/cinnamon-session.spec @@ -8,7 +8,7 @@ Summary: Cinnamon session manager Name: cinnamon-session Version: 6.0.1 -Release: 1%{!?tag:.%{date}git%{shortcommit0}}%{?dist} +Release: 2%{!?tag:.%{date}git%{shortcommit0}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/linuxmint/%{name} %if 0%{?tag:1} @@ -16,6 +16,7 @@ Source0: %url/archive/%{version}/%{name}-%{version}.tar.gz %else Source0: %url/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz %endif +Patch0: %url/pull/161.patch ExcludeArch: %{ix86} @@ -83,6 +84,7 @@ the other core components and handles logout and saving the session. %doc %{_mandir}/man*/* %license COPYING %{_bindir}/* +%{_libexecdir}/cinnamon-session-binary %{_libexecdir}/cinnamon-session-check-accelerated %{_libexecdir}/cinnamon-session-check-accelerated-helper %{_datadir}/cinnamon-session/ @@ -91,6 +93,9 @@ the other core components and handles logout and saving the session. %{_datadir}/glib-2.0/schemas/org.cinnamon.SessionManager.gschema.xml %changelog +* Sat Jan 06 2024 Leigh Scott - 6.0.1-2 +- Make sure wayland sessions get a login shell + * Tue Nov 28 2023 Leigh Scott - 6.0.1-1 - Update to 6.0.1 release