Lines Matching refs:service
310 _cleanup_(xdg_autostart_service_freep) XdgAutostartService *service = NULL; in xdg_autostart_service_parse_desktop()
313 service = new0(XdgAutostartService, 1); in xdg_autostart_service_parse_desktop()
314 if (!service) in xdg_autostart_service_parse_desktop()
317 service->path = strdup(path); in xdg_autostart_service_parse_desktop()
318 if (!service->path) in xdg_autostart_service_parse_desktop()
322 …esktop Entry", "Name", xdg_config_parse_string, 0, &service->description … in xdg_autostart_service_parse_desktop()
323 …esktop Entry", "Exec", xdg_config_parse_string, 0, &service->exec_string … in xdg_autostart_service_parse_desktop()
324 …esktop Entry", "Path", xdg_config_parse_string, 0, &service->working_director… in xdg_autostart_service_parse_desktop()
325 …esktop Entry", "TryExec", xdg_config_parse_string, 0, &service->try_exec … in xdg_autostart_service_parse_desktop()
326 …esktop Entry", "Type", xdg_config_parse_string, 0, &service->type … in xdg_autostart_service_parse_desktop()
327 …esktop Entry", "OnlyShowIn", xdg_config_parse_strv, 0, &service->only_show_in … in xdg_autostart_service_parse_desktop()
328 …esktop Entry", "NotShowIn", xdg_config_parse_strv, 0, &service->not_show_in … in xdg_autostart_service_parse_desktop()
329 …esktop Entry", "Hidden", xdg_config_parse_bool, 0, &service->hidden … in xdg_autostart_service_parse_desktop()
330 …esktop Entry", "AutostartCondition", xdg_config_parse_string, 0, &service->autostart_condit… in xdg_autostart_service_parse_desktop()
331 …esktop Entry", "X-KDE-autostart-condition", xdg_config_parse_string, 0, &service->kde_autostart_co… in xdg_autostart_service_parse_desktop()
332 …esktop Entry", "X-GNOME-Autostart-Phase", xdg_config_parse_string, 0, &service->gnome_autostart_… in xdg_autostart_service_parse_desktop()
333 …esktop Entry", "X-systemd-skip", xdg_config_parse_bool, 0, &service->systemd_skip … in xdg_autostart_service_parse_desktop()
353 r = config_parse(NULL, service->path, NULL, in xdg_autostart_service_parse_desktop()
356 CONFIG_PARSE_WARN, service, in xdg_autostart_service_parse_desktop()
360 log_warning_errno(r, "Failed to parse %s, ignoring it", service->path); in xdg_autostart_service_parse_desktop()
361 service->hidden = true; in xdg_autostart_service_parse_desktop()
364 return TAKE_PTR(service); in xdg_autostart_service_parse_desktop()
462 const XdgAutostartService *service, in xdg_autostart_generate_desktop_condition() argument
477 service->path, test_binary); in xdg_autostart_generate_desktop_condition()
487 service->path, gnome_autostart_condition_path, e_autostart_condition); in xdg_autostart_generate_desktop_condition()
499 const XdgAutostartService *service, in xdg_autostart_service_generate_unit() argument
506 assert(service); in xdg_autostart_service_generate_unit()
509 if (service->hidden) { in xdg_autostart_service_generate_unit()
510 log_debug("%s: not generating unit, entry is hidden.", service->path); in xdg_autostart_service_generate_unit()
514 if (service->systemd_skip) { in xdg_autostart_service_generate_unit()
515 … log_debug("%s: not generating unit, marked as skipped by generator.", service->path); in xdg_autostart_service_generate_unit()
520 if (!streq_ptr(service->type, "Application")) { in xdg_autostart_service_generate_unit()
521 … log_debug("%s: not generating unit, Type=%s is not supported.", service->path, service->type); in xdg_autostart_service_generate_unit()
525 if (!service->exec_string) { in xdg_autostart_service_generate_unit()
526 log_warning("%s: not generating unit, no Exec= line.", service->path); in xdg_autostart_service_generate_unit()
532 if (service->try_exec) { in xdg_autostart_service_generate_unit()
533 r = find_executable(service->try_exec, NULL); in xdg_autostart_service_generate_unit()
537 service->path, service->try_exec); in xdg_autostart_service_generate_unit()
542 r = xdg_autostart_format_exec_start(service->exec_string, &exec_start); in xdg_autostart_service_generate_unit()
544 … log_warning_errno(r, "%s: not generating unit, error parsing Exec= line: %m", service->path); in xdg_autostart_service_generate_unit()
548 if (service->gnome_autostart_phase) { in xdg_autostart_service_generate_unit()
550 … log_debug("%s: not generating unit, startup phases are not supported.", service->path); in xdg_autostart_service_generate_unit()
554 path_escaped = specifier_escape(service->path); in xdg_autostart_service_generate_unit()
558 unit = path_join(dest, service->name); in xdg_autostart_service_generate_unit()
564 … return log_error_errno(errno, "%s: failed to create unit file %s: %m", service->path, unit); in xdg_autostart_service_generate_unit()
574 if (service->description) { in xdg_autostart_service_generate_unit()
577 t = specifier_escape(service->description); in xdg_autostart_service_generate_unit()
598 if (service->working_directory) { in xdg_autostart_service_generate_unit()
601 e_working_directory = cescape(service->working_directory); in xdg_autostart_service_generate_unit()
609 if (!strv_isempty(service->only_show_in) || !strv_isempty(service->not_show_in)) { in xdg_autostart_service_generate_unit()
612 only_show_in = strv_join(service->only_show_in, ":"); in xdg_autostart_service_generate_unit()
613 not_show_in = strv_join(service->not_show_in, ":"); in xdg_autostart_service_generate_unit()
629 r = xdg_autostart_generate_desktop_condition(service, f, in xdg_autostart_service_generate_unit()
631 service->autostart_condition); in xdg_autostart_service_generate_unit()
635 r = xdg_autostart_generate_desktop_condition(service, f, in xdg_autostart_service_generate_unit()
637 service->kde_autostart_condition); in xdg_autostart_service_generate_unit()
641 …g_debug("%s: symlinking %s in xdg-desktop-autostart.target/.wants…", service->path, service->name); in xdg_autostart_service_generate_unit()
642 return generator_add_symlink(dest, "xdg-desktop-autostart.target", "wants", service->name); in xdg_autostart_service_generate_unit()