View Issue Details

IDProjectCategoryView StatusLast Update
0016355ScribusGeneralpublic2026-02-15 00:56
Reportertanty Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version1.5.6 
Summary0016355: The "-g" command line option doesn't really do as described by the help
DescriptionRun:

"
$ scribus --help
Scribus, Open Source Desktop Publishing
---------------------------------------
Homepage: http://www.scribus.net
Documentation: http://docs.scribus.net
Wiki: http://wiki.scribus.net
Issues: http://bugs.scribus.net

Usage: scribus [options] [files]

Options:
     -fi, --font-info Show information on the console when fonts are being loaded
     -h, --help Print help (this message) and exit
     -l, --lang Uses xx as shortcut for a language, eg `en' or `de'
     -la, --langs-available List the currently installed interface languages
     -ns, --no-splash Do not show the splashscreen on startup
     -nns, --never-splash Stop showing the splashscreen on startup. Writes an empty file called .neversplash in ~/.config/scribus
     -pr, --prefs <path> Use path for user given preferences location
     -pi, --profile-info Show location of ICC profile information on console while starting
     -u, --upgradecheck Download a file from the Scribus website and show the latest available version
     -v, --version Output version information and exit
     -py, --python-script <script> [arguments ...] Run script in Python [with optional arguments]. This option must be last option used
     -g, --no-gui Do not start GUI
     -- Explicit end of command line options
"

Therefore, passing "-g" should not show the GUI at all. Even more, it should work without a graphical system.

However, that's not the case. At least, not as expected by the help description.
Steps To ReproduceFile used:
* export_to_image.py: https://bugs.scribus.net/file_download.php?file_id=11173&type=bug

If we run the script:

"
$ scribus testdoc.sla -ns -g -py export_to_image.py -type 'PNG' -quality 100 -transparentBkgnd 1 -name 'test.png' -scale 100 -dpi 96
"

I can see the GUI appearing and disappearing.

Even more, without an X DISPLAY it doesn't work at all:

"
$ DISPLAY="" scribus testdoc.sla -ns -g -py export_to_image.py -type 'PNG' -quality 100 -transparentBkgnd 1 -name 'test.png' -scale 100 -dpi 96
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: eglfs, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
"
Additional InformationI assume this change is not simple.

It would be great if this could work without the need for a graphical system but, at least, the help should be updated to better explain which is the purpose of the "-g" argument.
TagsNo tags attached.
PatchNo

Activities

tanty

2020-11-25 16:49

reporter   ~0048490

I suppose passing the QT_QPA_PLATFORM=offscreen env var could work around this limitation, but it's not the cleanest ...

mara004

2026-02-01 03:02

reporter   ~0053442

Setting the Qt platform plugin to offscreen fails with Scribus 1.7.2 AppImage:
```
Run experimental bundle that bundles everything
qt.qpa.plugin: Could not find the Qt platform plugin "offscreen" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
```

stepan

2026-02-14 23:34

reporter   ~0053482

I have been using the patch in https://bugs.scribus.net/view.php?id=17750

mara004

2026-02-14 23:48

reporter   ~0053483

@stepan: Thanks for the cross-reference, but as far as I can see this is no different from the approach here.
All that patch does is basically qputenv("QT_QPA_PLATFORM", "offscreen"), which would also fail for the AppImage.
A truly GUI-free approach might be needed.

stepan

2026-02-15 00:33

reporter   ~0053484

Ah... Why is AppImage different from Linux native apps, Windows apps and MacOS apps? Maybe there's a fix on the AppImage side for this behavior?

stepan

2026-02-15 00:42

reporter   ~0053485

Yep, the AppImage was incompletely bundeled.

There, I think I fixed it for you, but I am not near a Linux machine right now, so I can not test.
AppImage-fix.diff (652 bytes)   
diff --git a/AppImage-package/bundle.sh b/AppImage-package/bundle.sh
index b9eceed38..553725d8f 100644
--- a/AppImage-package/bundle.sh
+++ b/AppImage-package/bundle.sh
@@ -101,3 +101,7 @@ ARCH=x86_64 VERSION=$SCRIBUS_VERSION ./linuxdeployqt-continuous-x86_64.AppImage
    -executable=appdir/usr/bin/python3.12 \
    -executable=appdir/usr/lib/python3.12/lib-dynload/_tkinter.cpython-312-x86_64-linux-gnu.so \
    -qmake=qmake6;
+
+# Ensure the offscreen platform plugin is included for --no-gui mode
+QT_PLUGINS_DIR=$(qmake6 -query QT_INSTALL_PLUGINS)
+cp "$QT_PLUGINS_DIR/platforms/libqoffscreen.so" appdir/usr/plugins/platforms/ 2>/dev/null || true
AppImage-fix.diff (652 bytes)   

mara004

2026-02-15 00:48

reporter   ~0053486

May be so, I cannot tell.

Another finding: The AppImage actually just ignores the env var QT_QPA_PLATFORM, but it respects `-platform ...` which, when set to anything other than xcb, causes the above failure.
In that light, I suppose sla2pdf should switch from -platform to QT_QPA_PLATFORM, as getting the undesired GUI is arguably better than getting a failure.

FWIW, It's not just the offscreen platform that doesn't work. Wayland isn't natively supported, either (you can use xeyes to confirm).

mara004

2026-02-15 00:49

reporter   ~0053487

Apologies, didn't see your second comment until after my comment above. Reading now.

mara004

2026-02-15 00:51

reporter   ~0053488

That patch looks promising, thank you! Ideally also include the Wayland plugin.

stepan

2026-02-15 00:56

reporter   ~0053489

Maybe like this..?
AppImage-fix_v2.diff (746 bytes)   
diff --git a/AppImage-package/bundle.sh b/AppImage-package/bundle.sh
index b9eceed38..90c19e1de 100644
--- a/AppImage-package/bundle.sh
+++ b/AppImage-package/bundle.sh
@@ -101,3 +101,8 @@ ARCH=x86_64 VERSION=$SCRIBUS_VERSION ./linuxdeployqt-continuous-x86_64.AppImage
    -executable=appdir/usr/bin/python3.12 \
    -executable=appdir/usr/lib/python3.12/lib-dynload/_tkinter.cpython-312-x86_64-linux-gnu.so \
    -qmake=qmake6;
+
+# Ensure the offscreen and wayland platform plugins are included
+QT_PLUGINS_DIR=$(qmake6 -query QT_INSTALL_PLUGINS)
+cp "$QT_PLUGINS_DIR/platforms/libqoffscreen.so" appdir/usr/plugins/platforms/ 2>/dev/null || true
+cp "$QT_PLUGINS_DIR/platforms/libqwayland*.so" appdir/usr/plugins/platforms/ 2>/dev/null || true
AppImage-fix_v2.diff (746 bytes)   

Issue History

Date Modified Username Field Change
2020-11-25 16:44 tanty New Issue
2020-11-25 16:49 tanty Note Added: 0048490
2026-02-01 03:02 mara004 Note Added: 0053442
2026-02-14 23:34 stepan Note Added: 0053482
2026-02-14 23:48 mara004 Note Added: 0053483
2026-02-15 00:33 stepan Note Added: 0053484
2026-02-15 00:42 stepan Note Added: 0053485
2026-02-15 00:42 stepan File Added: AppImage-fix.diff
2026-02-15 00:48 mara004 Note Added: 0053486
2026-02-15 00:49 mara004 Note Added: 0053487
2026-02-15 00:51 mara004 Note Added: 0053488
2026-02-15 00:56 stepan Note Added: 0053489
2026-02-15 00:56 stepan File Added: AppImage-fix_v2.diff