[Interest] Running as nobody, generating images

Andreas Pakulat apaku at gmx.de
Thu Feb 9 14:43:54 CET 2012


On 09.02.12 14:26:34, Harri Pasanen wrote:
> On 02/09/2012 11:10 AM, Andreas Pakulat wrote:
> > On 09.02.12 10:14:59, Harri Pasanen wrote:
> >> Picking your collective brain here...
> >>
> >> I'm trying to do some batch style image processing with a Qt app, using
> >> QImage.
> >> As QCoreApplication / console everything compiled, but silently failed
> >> at runtime.
> >>
> >> As QApplication with a MainWindow things started to work but looks like
> >> a display is required.
> >> I tried to set a timer to run my app on N9 using dbus/timed, and while
> >> the application starts,
> >> it seems to be always running as nobody:nogroup and thus fails, probably
> >> as it cannot get
> >> hold of the display.  The timed docs say that it should run as user,
> >> using Maemo::Timed::Event::Action::runCommand, but that does not seem to
> >> be the case.
> >>
> >> I've thought about porting libgd, or using python-imaging, but these are
> >> almost overkill for me.
> >> The only thing I'd really need is open png, drawPixmap(x,y) on it, save png.
> > Sounds like you're using QPixmap, that one is a native GUI pixmap and
> > hence requires a GUI application that connects to whatever draws the GUI
> > on your device (X11 on Linux). If you just want to paint something on a
> > png, simply use QImage only and then you can go back to
> > QCoreApplication.
> >
> > Andreas
> 
> No, I'm using QImage, actually doing drawText on it, and that does not work.
> Fonts are probably provided by the underlying window system, perhaps that
> is the problem?

At least on Linux that is the case yes, no idea wether its possible to
provide font's and font-rendering to Qt without requiring the platforms
GUI layer to be up and running.

Andreas




More information about the Interest mailing list