- Support kiran desktop environment.
- Caja not register for root in MATE desktop before session manager timeout Signed-off-by: tangjie02 <tangjie02@kylinsec.com.cn>
This commit is contained in:
parent
02e3f27f8a
commit
56b796006e
83
0002-feature-kiran-Support-kiran-desktop-environment.patch
Normal file
83
0002-feature-kiran-Support-kiran-desktop-environment.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From 91dcb951c19e7a05b16f81474e0708e2389ce1d3 Mon Sep 17 00:00:00 2001
|
||||
From: tangjie02 <tangjie02@kylinos.com.cn>
|
||||
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 <tangjie02@kylinos.com.cn>
|
||||
---
|
||||
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
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
From 0b2176a539338466dda802b06fcd7589d51ceef5 Mon Sep 17 00:00:00 2001
|
||||
From: tangjie02 <tangjie02@kylinos.com.cn>
|
||||
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 <tangjie02@kylinos.com.cn>
|
||||
---
|
||||
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
|
||||
|
||||
16
caja.spec
16
caja.spec
@ -16,7 +16,7 @@ Name: caja
|
||||
Summary: File manager for MATE
|
||||
Version: %{branch}.1
|
||||
%if 0%{?rel_build}
|
||||
Release: 2
|
||||
Release: 5
|
||||
%else
|
||||
Release: 0.15%{?git_rel}%{?dist}
|
||||
%endif
|
||||
@ -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,6 +184,16 @@ EOF
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jun 23 2022 tangjie02 <tangjie02@kylinsec.com.cn> - 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 <zhangtao221@huawei.com> - 1.24.1-4
|
||||
- modify else release number back
|
||||
|
||||
* Thu Mar 24 2022 xu_ping <xuping33@huawei.com> - 1.24.1-3
|
||||
- Remove %{?dist}
|
||||
|
||||
* Tue Jan 25 2022 longcheng <longcheng@kylinos.com.cn> - 1.24.1-2
|
||||
- Modify the require redhat-menus to openEuler-menus
|
||||
- Allow root to use desktop manager
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user