master not working without GUI

Bug #1806878 reported by Mc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Critical
Tavmjong Bah

Bug Description

Since the Gtk::Application merge https://gitlab.com/inkscape/inkscape/merge_requests/418 , nothing works without a gui anymore.

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

Tags: blocker
Mc (mc...)
tags: added: blocker
Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

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

Revision history for this message
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

Revision history for this message
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 https://superuser.com/questions/904142/launching-programs-with-gui-without-display-manager

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.

Revision history for this message
Mc (mc...) wrote :

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

Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

Just added a branch "headless" that implements 2.

Mc (mc...)
Changed in inkscape:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.