QCAD Command Line Tools on a Linux Server

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

QCAD Command Line Tools on a Linux Server

Post by andrew » Fri Feb 10, 2017 2:58 pm

From a QCAD user:
When running the QCAD command line tools on a Linux server, an error message appears:
Fatal: QXcbConnection: Could not connect to display

User avatar
andrew
Site Admin
Posts: 9062
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD Command Line Tools on a Linux Server

Post by andrew » Fri Feb 10, 2017 3:00 pm

If you are running the QCAD command line tools on a headless Linux server (i.e. a Linux server without a display, without an X11 server), you'll have to use the offscreen platform plugin (starting with Qt 5, QCAD 3.16):

Code: Select all

./dwg2pdf -platform offscreen ...
You also might have to set the QT_QPA_FONTDIR environment variable to point to a directory with fonts to use:

Some fonts are included with your QCAD installation under fonts/qt:

Code: Select all

QT_QPA_FONTDIR=fonts/qt ./dwg2pdf -platform offscreen ...
However, you likely have more suitable fonts installed on your system unless you are running the command line tools on an embedded platform.

Post Reply

Return to “QCAD Troubleshooting and Problems”