Wkhtmltopdf cannot start because no Qt platform plugin could be initialized

I’ve installed wkhtmltopdf from OpenSuse repo using YaST.

When I try to run it I get this problem:

txtechnician-server@tx-suse-server:~/Downloads> wkhtmltopdf 1012_Alliance\ AG.html whatever.pdf
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

What do I need to do?

I was trying to use this from the cli while remoted in.

If I unlock the screen and run this command from the terminal on the host pc, it works fine.

But, I intend to have this running on a remote server. How do I allow this program to run when the device is locked?

Perhaps it requires that “$DISPLAY” is defined.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.