Inkscape's -g option does not make sense when using GTK/Quartz on Mac OS X

Bug #251982 reported by W. Michael Petullo on 2008-07-25
4
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Gellule

Bug Description

The documentation for inkscape's "-g" parameter says, "Try to use X server (even if $DISPLAY is not set)." This does not make sense when inkscape is built using GTK/Quartz on Mac OS X. In this case, the application does not use X. The default behavior for inkscape in this environment should be to present its GUI even without $DISPLAY set.

tags: added: osx
su_v (suv-lp) wrote :

The current version of the man page says:

-g, --with-gui

    Try to use the GUI (on Unix, use the X server even if $DISPLAY is not set).

tags: added: documentation
removed: osx
Changed in inkscape:
status: New → Fix Released
W. Michael Petullo (mike-flyn) wrote :

I think that Inkscape on Mac OS X, when compiled against GTK/Quartz (no X requirement), should run the GUI by default. That is, --with-gui should not be required. Just as Inkscape will run fine on traditional Unix when DISPLAY is set, it will run fine in this environment (without DISPLAY). Does Inkscape require the --with-gui parameter on Windows?

su_v (suv-lp) wrote :

> Inkscape on Mac OS X, when compiled against GTK/Quartz
> (no X requirement), should run the GUI by default.
It does not run the GUI for you? The experimental gtk-quartz build of Inkscape 0.47pre0 for OS X Leopard I have tested did use the GUI by default. The reports about a recent Inkscape 0.47 gtk-quartz build on OS X Tiger (both as command line version and bundled as osxapp) never indicated that 'inkscape' or 'inkscape-bin' (in the bundle) needs to be launched with the option '--with-gui'.

> That is, --with-gui should not be required.
AFAIK it is not required.

It is possible that I completely misunderstood your initial report - could you provide more information about how you configure, build and bundle Inkscape 0.47 +quartz? Do you need '--with-gui' when launching inkscape from the command line or as argument in the launcher script inside the application bundle?
Or is the issue that $DISPLAY is unset on your system (no X11/Xquartz installed) and you see similar issues as reported in bug #167857 “assertion hit when running inkscape without DISPLAY set” (<https://bugs.launchpad.net/inkscape/+bug/167857>) despite building it without x11 dependencies?

su_v (suv-lp) wrote :

tested with 'Inkscape-0.47pre0-leopard-NATIVE-GTK-EXPERIMENTAL.dmg' from <http://sourceforge.net/projects/inkscape/files/inkscape/0.47pre0/>:

The launcher script calls 'Contents/Resoures/bin/inkscape-bin' without '--with-gui'. To test any dependency on $DISPLAY I launched inkscape from the command line like this:

| $ unset DISPLAY; /full/path/to/Inkscape-Native.app/Contents/Resources/script
| cp: /full/path/to//Inkscape-Native.app/Contents/Resources/etc/pango/pangox.aliases: No such file or directory
|
| (process:81770): Gtk-WARNING **: Locale not supported by C library.
| Using the fallback 'C' locale.
| Nothing to do!

the same error as with Inkscape 0.47 compiled with X11 dependency (from bug #498710 comment #4):

| $ unset DISPLAY; /Applications/Inkscape.app/Contents/MacOS/Inkscape
| Setting Language: .UTF-8
|
| (process:46762): Gtk-WARNING **: Locale not supported by C library.
| Using the fallback 'C' locale.
| Nothing to do!

Adding '--with-gui' as command line argument to launch the native gtk version works:

| $ unset DISPLAY; /full/path/to/Inkscape-Native.app/Contents/Resources/script --with-gui
| cp: /full/path/to//Inkscape-Native.app/Contents/Resources/etc/pango/pangox.aliases: No such file or directory
|
| (process:81929): Gtk-WARNING **: Locale not supported by C library.
| Using the fallback 'C' locale.

and the main Inkscape window launches.

This GTK+/Quartz build is not fully functional (see <http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/30473/focus=30482>) but it confirms that inkscape-bin still has a dependency on $DISPLAY. I guess this went unnoticed since the developers on osx have X11 running anyway, and since under Leopard $DISPLAY is handled by 'lauchd' it takes an extra step to launch inkscape in an environment completely without X11.

Changed in inkscape:
status: Fix Released → Confirmed
tags: added: build gtk-osx osx
removed: documentation
su_v (suv-lp) wrote :

If manually unsetting $DISPLAY (the variable is set by the launch services automatically once X11/Xquartz had been installed), inkscape built with gtk+/quartz fails to launch:

LeWitt:~ suv$ echo $DISPLAY
/tmp/launch-wiwyAr/:0
LeWitt:~ suv$ unset DISPLAY
LeWitt:~ suv$ echo $DISPLAY

LeWitt:~ suv$ gdb /Volumes/green/mp-quartz/src/inkscape-repo/mp-quartz/Build/bin/inkscape
GNU gdb 6.3.50-20050815 (Apple version gdb-967) (Tue Jul 14 02:11:58 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
(…)
(gdb) run
Starting program: /Volumes/green/mp-quartz/src/inkscape-repo/mp-quartz/Build/bin/inkscape
Reading symbols for shared libraries ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.............................................................................. done
Nothing to do!

Program exited normally.
(gdb) bt
No stack.
(gdb) quit
LeWitt:~ suv$ port installed gtk2
The following ports are currently installed:
  gtk2 @2.22.1_1+no_x11+quartz (active)
LeWitt:~ suv$ /Volumes/green/mp-quartz/src/inkscape-repo/mp-quartz/Build/bin/inkscape --version
Inkscape 0.48+devel r10101 (Mar 14 2011)
LeWitt:~ suv$

Changed in inkscape:
importance: Undecided → Medium
Gellule (gellule-xg) on 2011-06-16
Changed in inkscape:
assignee: nobody → Gellule (gellule-xg)
Gellule (gellule-xg) wrote :
Changed in inkscape:
status: Confirmed → Fix Committed
Gellule (gellule-xg) on 2011-07-01
tags: added: backport-proposed
su_v (suv-lp) on 2011-07-01
Changed in inkscape:
milestone: none → 0.49
Gellule (gellule-xg) on 2011-07-07
tags: removed: backport-proposed
Changed in inkscape:
milestone: 0.49 → 0.48.2
Ted Gould (ted) on 2011-09-07
Changed in inkscape:
status: Fix Committed → Fix Released
su_v (suv-lp) on 2017-01-12
tags: added: gtk-quartz
removed: gtk-osx
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers