hobbits icon indicating copy to clipboard operation
hobbits copied to clipboard

hobbits-runner shouldn't need a display?

Open jakecrowley opened this issue 2 years ago • 3 comments

I have limited knowledge of Qt so I'm not sure if this is even possible with the way hobbits-runner is implemented currently, but it for some reason still needs a display to run, even though it is a purely CLI tool. When trying to run it over SSH i get the error in the screenshot below.

hobbits-runner

jakecrowley avatar Jul 05 '22 17:07 jakecrowley

it looks like the CI tests solve this by passing the argument -platform offscreen:https://github.com/Mahlet-Inc/hobbits/blob/c4036969066fe1720c4dda41b3d0a8acbf39ad53/tests/test_hobbits.js#L64

I definitely botched some of the build configurations and dependencies - it's possible that the runner still depends on the GUI parts of Qt because parts of hobbits are tightly coupled to Qt widgets.

hello-adam avatar Jul 05 '22 18:07 hello-adam

Running with -platform minimal may also serve, if the code doesn't actually try to show() any widgets (or can cope with those attempts failing).

-platform offscreen still requires that the system have an OpenGL-compatible GPU attached, IIRC. -platform minimal is OK with having no display hardware at all (assuming the code is also OK with that).

ferdnyc avatar Jul 06 '22 02:07 ferdnyc

Thank you for the help, both -platform offscreen and -platform minimal work in my case.

jakecrowley avatar Jul 06 '22 13:07 jakecrowley