summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/core/gnome-control-center/paths.patch
blob: 63ca038d8027fff59965c6be4db8d2c4a62610cd (plain) (blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index 49ca35220..adefb87b9 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -599,7 +599,7 @@ gcm_prefs_calibrate_cb (GtkWidget *widget, CcColorPanel *prefs)
 
   /* run with modal set */
   argv = g_ptr_array_new_with_free_func (g_free);
-  g_ptr_array_add (argv, g_build_filename (BINDIR, "gcm-calibrate", NULL));
+  g_ptr_array_add (argv, g_build_filename ("@gcm@", "bin", "gcm-calibrate", NULL));
   g_ptr_array_add (argv, g_strdup ("--device"));
   g_ptr_array_add (argv, g_strdup (cd_device_get_id (prefs->current_device)));
   g_ptr_array_add (argv, g_strdup ("--parent-window"));
@@ -1038,7 +1038,7 @@ gcm_prefs_profile_view (CcColorPanel *prefs, CdProfile *profile)
 
   /* open up gcm-viewer as a info pane */
   argv = g_ptr_array_new_with_free_func (g_free);
-  g_ptr_array_add (argv, g_build_filename (BINDIR, "gcm-viewer", NULL));
+  g_ptr_array_add (argv, g_build_filename ("@gcm@", "bin", "gcm-viewer", NULL));
   g_ptr_array_add (argv, g_strdup ("--profile"));
   g_ptr_array_add (argv, g_strdup (cd_profile_get_id (profile)));
   g_ptr_array_add (argv, g_strdup ("--parent-window"));
@@ -1288,15 +1288,12 @@ gcm_prefs_device_clicked (CcColorPanel *prefs, CdDevice *device)
 static void
 gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *device)
 {
-  g_autofree gchar *s = NULL;
-
   /* get profile */
   g_debug ("selected profile = %s",
      cd_profile_get_filename (profile));
 
   /* allow getting profile info */
-  if (cd_profile_get_filename (profile) != NULL &&
-      (s = g_find_program_in_path ("gcm-viewer")) != NULL)
+  if (cd_profile_get_filename (profile) != NULL)
     gtk_widget_set_sensitive (prefs->toolbutton_profile_view, TRUE);
   else
     gtk_widget_set_sensitive (prefs->toolbutton_profile_view, FALSE);
diff --git a/panels/datetime/tz.h b/panels/datetime/tz.h
index 96b25140c..1ad704d4a 100644
--- a/panels/datetime/tz.h
+++ b/panels/datetime/tz.h
@@ -27,11 +27,7 @@
 
 #include <glib.h>
 
-#ifndef __sun
-#  define TZ_DATA_FILE "/usr/share/zoneinfo/zone.tab"
-#else
-#  define TZ_DATA_FILE "/usr/share/lib/zoneinfo/tab/zone_sun.tab"
-#endif
+#define TZ_DATA_FILE "@tzdata@/share/zoneinfo/zone.tab"
 
 typedef struct _TzDB TzDB;
 typedef struct _TzLocation TzLocation;
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c
index 7fce8691e..b839f8b69 100644
--- a/panels/info/cc-info-overview-panel.c
+++ b/panels/info/cc-info-overview-panel.c
@@ -187,7 +187,7 @@ load_gnome_version (char **version,
   gsize length;
   g_autoptr(VersionData) data = NULL;
 
-  if (!g_file_get_contents (DATADIR "/gnome/gnome-version.xml",
+  if (!g_file_get_contents ("@gnome_desktop@/share/gnome/gnome-version.xml",
                             &contents,
                             &length,
                             &error))
diff --git a/panels/network/connection-editor/net-connection-editor.c b/panels/network/connection-editor/net-connection-editor.c
index 9390a3308..d30b4a68e 100644
--- a/panels/network/connection-editor/net-connection-editor.c
+++ b/panels/network/connection-editor/net-connection-editor.c
@@ -247,9 +247,9 @@ net_connection_editor_do_fallback (NetConnectionEditor *editor, const gchar *typ
         GError *error = NULL;
 
         if (editor->is_new_connection) {
-                cmdline = g_strdup_printf ("nm-connection-editor --type='%s' --create", type);
+                cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --type='%s' --create", type);
         } else {
-                cmdline = g_strdup_printf ("nm-connection-editor --edit='%s'",
+                cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --edit='%s'",
                                            nm_connection_get_uuid (editor->connection));
         }
 
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index dd99a7485..4baa88a4e 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -1445,7 +1445,7 @@ device_wifi_edit (NetObject *object)
                 return;
         }
         uuid = nm_connection_get_uuid (NM_CONNECTION (connection));
-        cmdline = g_strdup_printf ("nm-connection-editor --edit %s", uuid);
+        cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --edit %s", uuid);
         g_debug ("Launching '%s'\n", cmdline);
         if (!g_spawn_command_line_async (cmdline, &error)) {
                 g_warning ("Failed to launch nm-connection-editor: %s", error->message);
diff --git a/panels/network/net-device.c b/panels/network/net-device.c
index d73b537b9..e2ee54294 100644
--- a/panels/network/net-device.c
+++ b/panels/network/net-device.c
@@ -197,7 +197,7 @@ net_device_edit (NetObject *object)
 
         connection = net_device_get_find_connection (device);
         uuid = nm_connection_get_uuid (connection);
-        cmdline = g_strdup_printf ("nm-connection-editor --edit %s", uuid);
+        cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --edit %s", uuid);
         g_debug ("Launching '%s'\n", cmdline);
         if (!g_spawn_command_line_async (cmdline, &error)) {
                 g_warning ("Failed to launch nm-connection-editor: %s", error->message);
diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c
index f53ba217e..d24bcaeb9 100644
--- a/panels/printers/pp-host.c
+++ b/panels/printers/pp-host.c
@@ -256,7 +256,7 @@ _pp_host_get_snmp_devices_thread (GTask        *task,
   devices = g_new0 (PpDevicesList, 1);
 
   argv = g_new0 (gchar *, 3);
-  argv[0] = g_strdup ("/usr/lib/cups/backend/snmp");
+  argv[0] = g_strdup ("@cups@/lib/cups/backend/snmp");
   argv[1] = g_strdup (priv->hostname);
 
   /* Use SNMP to get printer's informations */
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index e0604b8c3..fc323c1b2 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -763,10 +763,10 @@ row_layout_cb (CcRegionPanel *self,
         layout_variant = cc_input_source_get_layout_variant (source);
 
         if (layout_variant && layout_variant[0])
-                commandline = g_strdup_printf ("gkbd-keyboard-display -l \"%s\t%s\"",
+                commandline = g_strdup_printf ("@libgnomekbd@/bin/gkbd-keyboard-display -l \"%s\t%s\"",
                                                layout, layout_variant);
         else
-                commandline = g_strdup_printf ("gkbd-keyboard-display -l %s",
+                commandline = g_strdup_printf ("@libgnomekbd@/bin/gkbd-keyboard-display -l %s",
                                                layout);
 
         g_spawn_command_line_async (commandline, NULL);
diff --git a/panels/user-accounts/run-passwd.c b/panels/user-accounts/run-passwd.c
index 19934f186..9f41a9620 100644
--- a/panels/user-accounts/run-passwd.c
+++ b/panels/user-accounts/run-passwd.c
@@ -150,7 +150,7 @@ spawn_passwd (PasswdHandler *passwd_handler, GError **error)
         gchar  **envp;
         gint    my_stdin, my_stdout, my_stderr;
 
-        argv[0] = "/usr/bin/passwd";    /* Is it safe to rely on a hard-coded path? */
+        argv[0] = "/run/wrappers/bin/passwd";    /* Is it safe to rely on a hard-coded path? */
         argv[1] = NULL;
 
         envp = g_get_environ ();
diff --git a/panels/user-accounts/user-utils.c b/panels/user-accounts/user-utils.c
index 83d4cd091..e8784c722 100644
--- a/panels/user-accounts/user-utils.c
+++ b/panels/user-accounts/user-utils.c
@@ -486,7 +486,7 @@ is_valid_username_async (const gchar *username,
          * future, so it would be nice to have some official way for this
          * instead of relying on the current "--login" implementation.
          */
-        argv[0] = "/usr/sbin/usermod";
+        argv[0] = "@usermod@";
         argv[1] = "--login";
         argv[2] = data->username;
         argv[3] = "--";
diff --git a/tests/datetime/test-endianess.c b/tests/datetime/test-endianess.c
index 9cb92007a..84d2f0fa3 100644
--- a/tests/datetime/test-endianess.c
+++ b/tests/datetime/test-endianess.c
@@ -26,7 +26,7 @@ test_endianess (void)
 	g_autoptr(GDir) dir = NULL;
 	const char *name;
 
-	dir = g_dir_open ("/usr/share/i18n/locales/", 0, NULL);
+	dir = g_dir_open ("@glibc@/share/i18n/locales/", 0, NULL);
 	if (dir == NULL) {
 		/* Try with /usr/share/locale/
 		 * https://bugzilla.gnome.org/show_bug.cgi?id=646780 */