Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: out_to_x = false causes startup failure #1479

Closed
philer opened this issue Mar 31, 2023 · 2 comments · Fixed by #1481 or #1843
Closed

[Bug]: out_to_x = false causes startup failure #1479

philer opened this issue Mar 31, 2023 · 2 comments · Fixed by #1481 or #1843
Labels
bug Bug report or bug fix PR triage Issue that hasn't been verified

Comments

@philer
Copy link

philer commented Mar 31, 2023

There are two parts to this issue, that I assume are related.

1.

When setting out_to_x = false with no other output related settings, conky fails to start and logs the following error:

conky: invalid setting of type 'table'
Unable to find a usable display output.
conky: initialize_display_outputs() failed.

Example config:

conky.config = { out_to_x = false }
conky.text = "foo"

Evidently conky is not happy that it's not allowed to output anywhere.

You may argue that there is no point in running conky like this.
I do however use it to run tests for my lua widget library polycore. The test files are conky configs that are rendered to image files, rather than outputting anything. See this example

2.

When adding out_to_console = true conky starts successfully but still logs the first line of the error above:

conky: invalid setting of type 'table'

Example config:

conky.config = {
    out_to_x = false,
    out_to_console = true,
}
conky.text = "foo"

Version

1.18.3

Which OS/distro are you seeing the problem on?

Linux Mint 21.1

@philer philer added bug Bug report or bug fix PR triage Issue that hasn't been verified labels Mar 31, 2023
@bi4k8
Copy link
Collaborator

bi4k8 commented Mar 31, 2023

This changed in 281097a (diff). I think the original intent of the code was to return false (i.e., exit with failure) if no usable display backend was found, but we weren't doing it at the time the code was originally written. That said, I don't think there's any reason we need to exit there, and if it's more useful to users to let conky run with no backends, it's probably fine to simply change it back to return true;.

I don't believe the conky: invalid setting of type 'table' is related to the refusal to start when no display output is enabled. A bit of debugging indicates that set_config_settings in settings.cc seems to end up doing something unexpected with the Lua stack and calling get_setting when the top of the stack is something that isn't a setting.

@bi4k8
Copy link
Collaborator

bi4k8 commented Mar 31, 2023

I think this bug would be clearer if named "out_to_x = false causes startup failure".

@philer philer changed the title [Bug]: out_to_x = true causes startup failure [Bug]: out_to_x = false causes startup failure Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report or bug fix PR triage Issue that hasn't been verified
Projects
None yet
2 participants