diff --git a/0002-feature-kiran-Support-kiran-desktop-environment.patch b/0002-feature-kiran-Support-kiran-desktop-environment.patch new file mode 100644 index 0000000000000000000000000000000000000000..367d81256eb438a0ddbe7646c53d7db27fa28330 --- /dev/null +++ b/0002-feature-kiran-Support-kiran-desktop-environment.patch @@ -0,0 +1,83 @@ +From 91dcb951c19e7a05b16f81474e0708e2389ce1d3 Mon Sep 17 00:00:00 2001 +From: tangjie02 +Date: Mon, 9 Aug 2021 18:00:34 +0800 +Subject: [PATCH 2/3] feature(kiran): Support kiran desktop environment. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 支持kiran桌面环境 + +Signed-off-by: tangjie02 +--- + libegg/eggsmclient.c | 10 +++++++++- + src/caja-application.c | 11 +++++++++-- + 2 files changed, 18 insertions(+), 3 deletions(-) + +diff --git a/libegg/eggsmclient.c b/libegg/eggsmclient.c +index c404349..3113e6b 100644 +--- a/libegg/eggsmclient.c ++++ b/libegg/eggsmclient.c +@@ -59,6 +59,14 @@ running_in_mate (void) + || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0); + } + ++static gboolean ++running_in_kiran (void) ++{ ++ return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "KIRAN") == 0) ++ || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "kiran") == 0) ++ || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "kiran") == 0); ++} ++ + static void + egg_sm_client_init (EggSMClient *client) + { +@@ -360,7 +368,7 @@ egg_sm_client_get (void) + as egg_sm_client_set_mode must be called prior to start of main loop + to stop caja restart but this is diffcult in GtkApplication */ + +- if (geteuid () == 0 || !running_in_mate ()){ ++ if (geteuid () == 0 || !(running_in_mate () || running_in_kiran ())){ + global_client = g_object_new (EGG_TYPE_SM_CLIENT, NULL); + } + } +diff --git a/src/caja-application.c b/src/caja-application.c +index 2791bd9..8d33baa 100644 +--- a/src/caja-application.c ++++ b/src/caja-application.c +@@ -1838,6 +1838,13 @@ running_in_mate (void) + || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "mate") == 0); + } + ++static gboolean ++running_in_kiran (void) ++{ ++ return (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "KIRAN") == 0) ++ || (g_strcmp0 (g_getenv ("XDG_SESSION_DESKTOP"), "KIRAN") == 0) ++ || (g_strcmp0 (g_getenv ("DESKTOP_SESSION"), "KIRAN") == 0); ++} + static gboolean + running_as_root (void) + { +@@ -2110,7 +2117,7 @@ init_desktop (CajaApplication *self) + self->priv->no_desktop = TRUE; + } + +- if (!running_in_mate ()) ++ if (!running_in_mate () && !running_in_kiran ()) + { + /* do not manage desktop when running as root or on other desktops unless forced */ + self->priv->no_desktop = TRUE; +@@ -2262,7 +2269,7 @@ caja_application_startup (GApplication *app) + * Otherwise, we read the value from the configuration. + */ + +- if (running_in_mate () && !running_as_root()) ++ if ((running_in_mate () || running_in_kiran ()) && !running_as_root()) + { + GApplication *instance; + +-- +2.33.0 + diff --git a/0003-fix-libegg-caja-not-register-for-root-in-MATE-deskto.patch b/0003-fix-libegg-caja-not-register-for-root-in-MATE-deskto.patch new file mode 100644 index 0000000000000000000000000000000000000000..f238bf1e4491130c9f2c017fd1d434e9fcd4e6fe --- /dev/null +++ b/0003-fix-libegg-caja-not-register-for-root-in-MATE-deskto.patch @@ -0,0 +1,32 @@ +From 0b2176a539338466dda802b06fcd7589d51ceef5 Mon Sep 17 00:00:00 2001 +From: tangjie02 +Date: Thu, 7 May 2020 00:06:50 +0800 +Subject: [PATCH 3/3] fix(libegg): caja not register for root in MATE desktop + before session manager timeout +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复caja在root登录时未向mate-session-manager进行注册导致mate-session-manager长时间等待(30秒)的问题 + +Signed-off-by: tangjie02 +--- + libegg/eggsmclient.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libegg/eggsmclient.c b/libegg/eggsmclient.c +index 3113e6b..f8c35e1 100644 +--- a/libegg/eggsmclient.c ++++ b/libegg/eggsmclient.c +@@ -368,7 +368,7 @@ egg_sm_client_get (void) + as egg_sm_client_set_mode must be called prior to start of main loop + to stop caja restart but this is diffcult in GtkApplication */ + +- if (geteuid () == 0 || !(running_in_mate () || running_in_kiran ())){ ++ if (!(running_in_mate () || running_in_kiran ())){ + global_client = g_object_new (EGG_TYPE_SM_CLIENT, NULL); + } + } +-- +2.33.0 + diff --git a/caja.spec b/caja.spec index 8c5c0587ce908bbff0f43476ee546a3c86d47373..d7dd7bcd90e5892a85a6bb3f245a053514d9fe99 100755 --- a/caja.spec +++ b/caja.spec @@ -16,9 +16,9 @@ Name: caja Summary: File manager for MATE Version: %{branch}.1 %if 0%{?rel_build} -Release: 3 +Release: 5 %else -Release: 0.15%{?git_rel} +Release: 0.15%{?git_rel}%{?dist} %endif License: GPLv2+ and LGPLv2+ URL: http://mate-desktop.org @@ -30,7 +30,9 @@ URL: http://mate-desktop.org %{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}} Patch0: caja_add-xfce-to-desktop-file-1.25.patch -Patch1: 0001-allow-root-to-use-desktop-manager.patch +Patch1: 0001-allow-root-to-use-desktop-manager.patch +Patch2: 0002-feature-kiran-Support-kiran-desktop-environment.patch +Patch3: 0003-fix-libegg-caja-not-register-for-root-in-MATE-deskto.patch BuildRequires: dbus-glib-devel BuildRequires: desktop-file-utils @@ -182,7 +184,14 @@ EOF %changelog -* Thu Mar 25 2022 caodongxia - 1.24.1-3 +* Thu Jun 23 2022 tangjie02 - 1.24.1-5 +- Support kiran desktop environment. +- Caja not register for root in MATE desktop before session manager timeout + +* Thu Mar 24 2022 zhangtao - 1.24.1-4 +- modify else release number back + +* Thu Mar 24 2022 xu_ping - 1.24.1-3 - Remove %{?dist} * Tue Jan 25 2022 longcheng - 1.24.1-2