QCAD Bugtracker

  • Status Closed
  • Percent Complete
    100%
  • Task Type Suggestion
  • Category QCAD (main)
  • Assigned To
    Andrew
  • Operating System Linux (All / Other)
  • Severity Low
  • Priority Very Low
  • Reported Version 3.16.4
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: QCAD Bugtracker
Opened by Peter - 26.01.2017
Last edited by Andrew - 26.01.2017

FS#1534 - Headless Styling

Since the launcher batch no longer requests “-style plastique” QT wants to apply the native style of the desktop environment. This fails on a headless system (or where the current user has no graphical shell to connect to) with the message “Gtk-WARNING **: cannot open display: “. Fortunately, QT provides a workaround in addtion to the new “platform=offscreen” flag.

In the tools that set -no-gui, beforehand export these variables into the environment

export QT_STYLE_OVERRIDE=""
export QT_QPA_PLATFORM=offscreen
export DISPLAY=""

PS: QT-offscreen will not find fonts; unfortunately the workaround only allows for a single directory to search them (I need helvetica):

export QT_QPA_FONTDIR="/usr/local/share/fonts/type1"

Maybe that should get reported upstream, so that like LD_LIBRARY_PATH several directories could be specified.

Closed by  Andrew
26.01.2017 12:03
Reason for closing:  Implemented
Admin
Andrew commented on 26.01.2017 12:03

Thanks. I've added this information to the usage info for the various command line tools. The information is also shown if the qcad binary fails to start under Linux (which can be the case on a headless system with GTK as default style).

Note that these settings should in my opinion not be added directly to the command line tool scripts, since that would unnecessarily complicate things for users running the command line tools on systems where X11 is up and running.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing