master not working without GUI

Bug #1806878 reported by Mc on 2018-12-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tavmjong Bah

Bug Description

Since the Gtk::Application merge , nothing works without a gui anymore.

As a consequence, rendering tests fail because they can't execute.

Mc (mc...) on 2018-12-05
tags: added: blocker
Tavmjong Bah (tavmjong-free) wrote :

I've just checked on Fedora with a Virtual Terminal and all the tests pass.

Mc (mc...) wrote :

does not work on 18.10 in a tty, or on debian.

I just installed a fedora VM to test and Fedora TTY appear to use the open X server when you are also logged graphically (you can even open inkscape from the tty and it opens graphically in the graphical interface). But when you close all sessions except the tty one, the error shows and you can't run "./bin/inkscape -V", or run the tests or anything

Tavmjong Bah (tavmjong-free) wrote :

I've confirmed it doesn't work from the console when booting Fedora into a non-graphical mode.

The problem here is that it blocks our automated rendering tests. Until we have a truly headless Inkscape version, we'll need a work-around for testing. I see two possible solutions:

1. Use a "dummy" x-server as described in

2. Use #ifdefs to create a version of Inkcape with Inkscape::Application derived from Gio::Application rather than Gtk::Application. I've tested that using Gio::Application works as long as the --without-gui flag is set. (I can get a graphical version to run with Gio::Application by manually calling a bunch of Gtk/Gdk/Pango init() functions but it loses a few pieces of functionality from Gtk::Application.) About six short #ifdef sections are needed.

I also tried creating an Inkscape::ApplicationBase class that derives from Gio::Application and then an Inkscape::ApplicationGui class the derives from both Inkscape::ApplicationBase and Glib::Application. This gets quite messy fast and I couldn't get a toy version to work. Clearly inferior to the other solutions.

Mc (mc...) wrote :

As solution 1 is just a hackish workaround, solution 2 can probably be a first step in a headless compile

Tavmjong Bah (tavmjong-free) wrote :

Just added a branch "headless" that implements 2.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers