The "XDG standardization for applications" specification states that
services should be in the form:
app[-<launcher>]-<ApplicationID>[@<RANDOM>].service or
app[-<launcher>]-<ApplicationID>-<RANDOM>.scope
In this case "autostart" takes the place of [RANDOM] to provide a unique
identifier if the same app is launched elsewhere. As it is a service
that means it should be set as a template not using a hyphen delimiter.
_cleanup_free_ char *t;
assert_se(t = xdg_autostart_service_translate_name("a-b.blub.desktop"));
- assert_se(streq(t, "app-a\\x2db.blub-autostart.service"));
+ assert_se(streq(t, "app-a\\x2db.blub@autostart.service"));
}
static void test_xdg_format_exec_start_one(const char *exec, const char *expected) {
if (!escaped)
return NULL;
- return strjoin("app-", escaped, "-autostart.service");
+ return strjoin("app-", escaped, "@autostart.service");
}
static int xdg_config_parse_bool(