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
|
diff --git a/js/dbusServices/dbus-service.in b/js/dbusServices/dbus-service.in
old mode 100644
new mode 100755
index 524166102..100b81a63
--- a/js/dbusServices/dbus-service.in
+++ b/js/dbusServices/dbus-service.in
@@ -1,3 +1,9 @@
+#!@gjs@
+
+// gjs determines the package name from argv[0], which is .*-wrapped
+// so we need to override it to the original one.
+imports.package._findEffectiveEntryPointName = () => '@service@'
+
imports.package.start({
name: '@PACKAGE_NAME@',
prefix: '@prefix@',
diff --git a/js/dbusServices/dbus-service.service.in b/js/dbusServices/dbus-service.service.in
index 3b0d09abe..4fd4bb66d 100644
--- a/js/dbusServices/dbus-service.service.in
+++ b/js/dbusServices/dbus-service.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=@service@
-Exec=@gjs@ @pkgdatadir@/@service@
+Exec=@pkgdatadir@/@service@
diff --git a/js/dbusServices/meson.build b/js/dbusServices/meson.build
index c749f45dc..11bcb0c9e 100644
--- a/js/dbusServices/meson.build
+++ b/js/dbusServices/meson.build
@@ -2,6 +2,7 @@ launcherconf = configuration_data()
launcherconf.set('PACKAGE_NAME', meson.project_name())
launcherconf.set('prefix', prefix)
launcherconf.set('libdir', libdir)
+launcherconf.set('gjs', gjs.path())
dbus_services = {
'org.gnome.Shell.Extensions': 'extensions',
@@ -11,16 +12,17 @@ dbus_services = {
config_dir = '@0@/..'.format(meson.current_build_dir())
foreach service, dir : dbus_services
+ svc_launcherconf = launcherconf
+ svc_launcherconf.set('service', service)
configure_file(
input: 'dbus-service.in',
output: service,
- configuration: launcherconf,
+ configuration: svc_launcherconf,
install_dir: pkgdatadir,
)
serviceconf = configuration_data()
serviceconf.set('service', service)
- serviceconf.set('gjs', gjs.path())
serviceconf.set('pkgdatadir', pkgdatadir)
configure_file(
|