mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #276377 from mkg20001/cinnamon-fix-gpaste
nixos/gpaste: also add to cinnamon session path + fix sessionPath
This commit is contained in:
commit
d5ba1d218a
3 changed files with 79 additions and 0 deletions
|
@ -32,5 +32,7 @@ with lib;
|
||||||
systemd.packages = [ pkgs.gnome.gpaste ];
|
systemd.packages = [ pkgs.gnome.gpaste ];
|
||||||
# gnome-control-center crashes in Keyboard Shortcuts pane without the GSettings schemas.
|
# gnome-control-center crashes in Keyboard Shortcuts pane without the GSettings schemas.
|
||||||
services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gnome.gpaste ];
|
services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gnome.gpaste ];
|
||||||
|
# gpaste-reloaded applet doesn't work without the typelib
|
||||||
|
services.xserver.desktopManager.cinnamon.sessionPath = [ pkgs.gnome.gpaste ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
From 174d14edcbb401aa2bfb77932b214512befb486c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bobby Rong <rjl931189261@126.com>
|
||||||
|
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 10092ee..3d32fdc 100644
|
||||||
|
--- a/cinnamon-session/meson.build
|
||||||
|
+++ b/cinnamon-session/meson.build
|
||||||
|
@@ -54,7 +54,7 @@ cinnamon_session_sources = [
|
||||||
|
]
|
||||||
|
|
||||||
|
dbus_glib = dependency('dbus-glib-1')
|
||||||
|
-executable('cinnamon-session',
|
||||||
|
+executable('cinnamon-session-binary',
|
||||||
|
cinnamon_session_sources,
|
||||||
|
dependencies: [
|
||||||
|
cinnamon_desktop,
|
||||||
|
@@ -76,6 +76,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 = [
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
|
@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./0001-Use-dbus_glib-instead-of-elogind.patch
|
./0001-Use-dbus_glib-instead-of-elogind.patch
|
||||||
|
./0002-Use-login-shell-for-wayland-session.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue