Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HOWTO create Graphs without X (was: QPaintDevice: Must construct a QApplication ...)

1 view
Skip to first unread message

Mat Ballard

unread,
Nov 6, 2001, 5:25:31 PM11/6/01
to Håvard Hovind, Marcel Stadtmann
My original post has been expired, so here is how you can create graphs without X:

________________________________________________________________________

First of all, many thanks to Olaf Monien and Sam Liddicott for their input,
especially Olaf for putting me onto Xvfb.

The problem with graphics without X is that both TBitmap and TDrawing use Qt,
which uses X, not to mention things like font servers. there may be other
problems with specific graphing components.

As i posted earlier, i've successfully modified TPlot to work in a console app -
however, that console app must run in an xterm - not just from the command line
- because of the bitmap problem above.

This post describes how to run a console app that employs TPlot from the command
line without X.

first, if you don't already have it, get Xvfb for your system:

http://www.rpmfind.net/linux/rpm2html/search.php?query=xvfb+&submit=Search

and install it. many distributions have it also.

second, create a console app that does not use Qt heavily, but does use a
graphing package, such as TPlot. NOTE: the current versions of TPlot use Qt
heavily. contact me to get the latest version, which can be compiled to NOT use
Qt heavily (i'll upload when the latest revisions are finished). build the
executable.

third, start Xvfb. you can do this as an ordinary user:

[whoami]$ Xvfb :1 &

you may need to supply a path to Xvfb. the ":1" is the display device number to
serve. ":0" is the default, and it can be any number. "&" means return
immediately. Xvfb uses about 3M of memory.

next, run you console app:

[whoami]$ ./Console -display :1

voila ! depending on your app, you might like to post-pend "&". the most useful
reference to Xvfb i've found is actually a successor:

http://www.3dwm.org/docs/x3vfb.html.


can TChart also work this way ? dunno - ask David Bernada.

cheers,


Mat

________________________________________

rm -rf /mnt/windows/
________________________________________

Dr Mat Ballard,
mat.b...@Chemware.hypermart.net
http://Chemware.hypermart.net/
Linux Registered User #6854

Ka Chun, Cheng

unread,
Nov 10, 2001, 1:31:45 AM11/10/01
to
coool. my stuff is working!

"Mat Ballard" <mat.b...@chemware.hypermart.net> wrote in message
news:3BE8635B...@chemware.hypermart.net...

0 new messages