diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-11-10 13:54:38 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-11-10 13:54:40 +0100 |
commit | 42a13a2cf848fcf29a003ea874e9f09f8496b39a (patch) | |
tree | 2ba3c04f6f02633acdb30854cb02b65a383f0ef6 | |
parent | 01ff58184c0e14d52feca414e45bac1aad16b9e0 (diff) | |
download | arctica-greeter-42a13a2cf848fcf29a003ea874e9f09f8496b39a.tar.gz arctica-greeter-42a13a2cf848fcf29a003ea874e9f09f8496b39a.tar.bz2 arctica-greeter-42a13a2cf848fcf29a003ea874e9f09f8496b39a.zip |
src/arctica-greeter.vala: Search at alternative installation path /usr/lib for indicator service executables.
Resolves indicator service startups on openSUSE.
-rw-r--r-- | src/arctica-greeter.vala | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 06a4854..dcf413b 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -1214,7 +1214,7 @@ public class ArcticaGreeter : Object try { /* Start the indicator service */ - string[] argv; + string[] argv = null; /* FIXME: This path is rather hard-coded here. * If it pops up, we need to handle this in @@ -1222,15 +1222,25 @@ public class ArcticaGreeter : Object * how we find at-spi-bus-launcher on the file * system. */ - Shell.parse_argv ("/usr/libexec/%s/%s-service".printf(indicator_service, indicator_service), out argv); - Process.spawn_async (null, - argv, - null, - SpawnFlags.SEARCH_PATH, - null, - out indicator_service_pid); - launched_indicator_service_pids.append(indicator_service_pid); - debug ("Successfully started Ayatana Indicator Service '%s' [%d]", indicator_service, indicator_service_pid); + if (FileUtils.test ("/usr/lib/%s/%s-service".printf(indicator_service, indicator_service), FileTest.EXISTS)) + Shell.parse_argv ("/usr/lib/%s/%s-service".printf(indicator_service, indicator_service), out argv); + else if (FileUtils.test ("/usr/libexec/%s/%s-service".printf(indicator_service, indicator_service), FileTest.EXISTS)) + Shell.parse_argv ("/usr/libexec/%s/%s-service".printf(indicator_service, indicator_service), out argv); + if (argv != null) + { + Process.spawn_async (null, + argv, + null, + SpawnFlags.SEARCH_PATH, + null, + out indicator_service_pid); + launched_indicator_service_pids.append(indicator_service_pid); + debug ("Successfully started Ayatana Indicator Service '%s' [%d]", indicator_service, indicator_service_pid); + } + else + { + warning ("Could not find indicator service executable for Indicator Service '%s'", indicator_service); + } } catch (Error e) { |