summarylogtreecommitdiffstats
path: root/0001-cinnamon-settings-don-t-rely-on-the-presence-of-cinn.patch
blob: e3ddd3622e5f5946ff818bfac47fd552b58c4777 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From ac4d2fc9fafb38ebb02615a41b23cceca304e73a Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Tue, 20 Mar 2018 14:11:02 -0400
Subject: [PATCH] cinnamon-settings: don't rely on the presence of
 cinnamon-control-center

The existence of the cinnamon-control-center binary does not even tell
us what control center libraries are available. So instead, do the same
thing we did for cinnamon-settings modules, and check if the library
exists.
---
 files/usr/bin/cinnamon-settings | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/files/usr/bin/cinnamon-settings b/files/usr/bin/cinnamon-settings
index 9fbdbecd2..98ca454a5 100755
--- a/files/usr/bin/cinnamon-settings
+++ b/files/usr/bin/cinnamon-settings
@@ -58,6 +58,7 @@ Available types of sort, and corresponding numbers:
 import getopt
 import os
 import sys
+import sysconfig
 
 def usage():
     print("""Usage:
@@ -119,7 +120,7 @@ if len(sys.argv) > 1:
             os.execvp("/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", (" ",) + tuple(sys.argv[1:]))
     elif os.path.exists("/usr/share/cinnamon/cinnamon-settings/modules/cs_%s.py" % module):
         os.execvp("/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", (" ",) + tuple(sys.argv[1:]))
-    elif os.path.exists("/usr/bin/cinnamon-control-center"):
+    elif os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "cinnamon-control-center-1/panels/lib%s.so" % module)):
         os.execvp("/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", (" ",) + tuple(sys.argv[1:]))
     elif os.path.exists("/usr/bin/gnome-control-center"):
         print ("Unknown module %s, calling gnome-control-center" % module)
-- 
2.22.0