Hello guys,

I need some help. I developed a server application which runs on debian. Because I want to generate some pdfs, I need QPrinter and QPainter, which needs a the QtGui. So I have no QCoreApplication, but a QApplication.
The app runs very well on the dev-machine (ubunut gnome). After deploying on server, the app wasn't startable, but that was expected, because of no xserver instance.
So I installed Xvfb and started it via following script:
Qt Code:
  1. XVFB=/usr/bin/Xvfb
  2. XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset"
  3. PIDFILE=/var/run/xvfb.pid
  4. case "$1" in
  5. start)
  6. echo -n "Starting virtual X frame buffer: Xvfb"
  7. start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
  8. echo "."
  9. ;;
  10. stop)
  11. echo -n "Stopping virtual X frame buffer: Xvfb"
  12. start-stop-daemon --stop --quiet --pidfile $PIDFILE
  13. echo "."
  14. ;;
  15. restart)
  16. $0 stop
  17. $0 start
  18. ;;
  19. *)
  20. echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
  21. exit 1
  22. esac
  23.  
  24. exit 0
To copy to clipboard, switch view to plain text mode 

The Xvfb runs and the server app is startable. But if pdf-generation is needed, there are some warnings and no pdf is generated. The initial warning is QPainter::begin(): Returned false.

Maybe you can put me in the right direction. Are there other args needed, at the start of Xvfb?

thank u