Hi, to make dia run without an X11 display, e.g. from a Makefile or script, I inserted some checks for the already existing variable dia_is_interactive (sometimes using the already existing function app_is_interactive()). The seems to work for me, but testing is necessary, because I had to change the sequence of function calls in app/app_proc.c heavily. This file is a mess and I cleaned it a little bit by introducing some new functions: process_opts() and print_credits(), but please check whether my changes aren't making things worse. E.g. I compile w/o GNOME and only for Linux, so I don't know, if GNOME or win32 are broken with the patch. Additional change: If with an export option, dia is assumed to be run non-interactively. If running non-interactively, no splash screen is displayed, whether or not --nosplash. When calling dia w/o a display I get six Gdk-CRITICAL warnings. I don't know the origin, but believe that it comes from some of the plug-ins, maybe Python. Exporting PNGs works perfectly however. Note, that this patch assumes, that the size patch (new option --size) is already applied. Please check and apply! Cheers, -- W. Borgert <debacle debian org>
Attachment:
no-display.patch
Description: Text document