jeromerobert / k4dirstat

K4DirStat (KDE Directory Statistics) is a small utility program that sums up disk usage for directory trees, very much like the Unix 'du' command. It displays the disk space used up by a directory tree, both numerically and graphically (copied from the Debian package description).
GNU General Public License v2.0
64 stars 10 forks source link

'k4dirstat --version' does not work without display #42

Closed raboof closed 3 years ago

raboof commented 3 years ago

When I run k4dirstat --version in an environment where there is no display, I get:

qt.qpa.xcb: could not connect to display
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: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

That seems 'normal' for qt applications. However, when I start it with k4dirstat -platform offscreen --version, I get:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/build/runtime-nixbld'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/build/runtime-nixbld'
Fontconfig error: Cannot load default config file: No such file: (null)
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Icon theme "breeze" not found.
Icon theme "breeze" not found.
This plugin does not support propagateSizeHints()
No exclude rules defined 

This plugin does not support propagateSizeHints()
This plugin does not support propagateSizeHints()
This plugin does not support propagateSizeHints()

... and the program hangs. This approach does seem to work for other KDE applications, tested with 'kate'.

jeromerobert commented 3 years ago

I cannot reproduce that. Could you run it in gdb and give a backtrace ?

raboof commented 3 years ago

Huh, it works for me now, not sure what is going on :/