Bug 130601

Summary: make command line export of graphics independent from X
Product: [Applications] umbrello Reporter: Daniel Franke <franke.daniel>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kip, okellogg, ralf.habacker
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Daniel Franke 2006-07-11 10:44:01 UTC
Version:           1.5.3 (using KDE 3.5.3 Level "a" , unofficial build of SUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.13-4-smp

Umbrello needs X even when run at the command line (without X):

$> umbrello --export eps foo.xmi
umbrello: cannot connect to X server

In addition (with X): if the file cannot be found, a dialog box appears stating so. When the command line switches are used, such errors should be written to stderr instead.
Comment 1 Daniel Calviño Sánchez 2006-07-12 00:13:04 UTC
If I'm not wrong, I think that this can't be done, at least with the current internal design of Umbrello.

The main class of Umbrello is UMLApp. This class inherits, through some other classes, from QWidget. The problem is that when a KApplication is executed without connecting to X server, QWidgets can't be created (the application crashes with this message: "QWidget: Cannot create a QWidget when no GUI is being used").

So, as UMLApp is itself a QWidget, it can't be created.

Provided I haven't mistaken anything, to fix this bug a major redesign should be made in Umbrello internal code.
Comment 2 Oliver Kellogg 2006-07-14 18:42:49 UTC
If anyone would like to implement this, we can always reopen :)
Comment 3 Oliver Kellogg 2012-11-24 07:20:27 UTC
I made an entry for this in the Umbrello FAQ, http://uml.sourceforge.net/faq.php#headless

*** This bug has been marked as a duplicate of bug 283748 ***
Comment 4 Kip 2012-11-24 20:18:27 UTC
Thanks Oliver. I wonder if Ralph's potential workaround should be mentioned in #headless:

<https://bugs.kde.org/show_bug.cgi?id=283748#c9>
Comment 5 Oliver Kellogg 2012-11-24 22:43:50 UTC
(In reply to comment #4)
> Thanks Oliver. I wonder if Ralph's potential workaround should be mentioned
> in #headless:
> 
> <https://bugs.kde.org/show_bug.cgi?id=283748#c9>

Good point. Done.
Comment 6 Kip 2012-11-24 23:53:04 UTC
Thanks Oliver. Just for the benefit of anyone else wanting to do this, here is an example:

$ xvfb-run umbrello --export eps Diagram.xmi

On my distro (Ubuntu Precise), xvfb-run is found in a package called xvfb.
Comment 7 Ralf Habacker 2012-11-25 10:08:27 UTC
>http://uml.sourceforge.net/faq.php#headless
s/prodive/provide/
Just a note to the mentioned package : this is on opensuse 12.2