FLTK logo

Re: [fltk.general] FLTK use with Raspberry Pi OS

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: FLTK use with Raspberry Pi OS janezz55 Nov 26, 2020  
 
cairo has a backend for the framebuffer:

cairo-directfb-surface.c
cairo-directfb.h

so, if you write a display driver for cairo (which was done in the NTK project), you will be able to run your application. Please share your work, a 100% working cairo display driver seems an elusive target.
On Wednesday, November 4, 2020 at 8:50:14 PM UTC+1 Greg Ercolano wrote:
On 2020-11-04 11:30, Greg Ercolano wrote:
On 2020-11-04 11:04, Dave Branson wrote:
I have a small C++ app that uses several FLTK features and currently runs well from the command line - I want to run it at boot-up using rc.local for auto start, but I don't know if the desktop GUI is required to be running for FLTK-based apps to operate.  Can one run a FLTK app without having first launched the GUI?
    You need X running for FLTK to work. Window manager is optional though.
    Without the window manager, FLTK apps (and all other GUI apps) will be borderless.

    You can start X yourself, then set the DISPLAY environment variable to just ":0.0",
    and then be able to run the FLTK app.


    If you want to start X yourself, first disable the default desktop from starting up automatically on your RPI
    so the machine boots to a text login console, so you can take over starting X yourself.

    Then create two scripts, for example:

        /usr/local/bin/my-start-x
        /usr/local/bin/my-start-apps

    Your rc.local would run that first script, /usr/local/bin/my-start-x, perhaps starting it in the background
    so it doesn't block the rest of your rc.local.

    The contents of /usr/local/bin/my-start-x would be:

#!/bin/sh
xinit  /usr/local/bin/my-start-apps  -xinit  --

    ..and the contents of my-start-apps would be:

#!/bin/sh
/path/to/your/fltk-app -arg1 -arg2 &

    What you should end up with is a plain X11 graphics screen, no window manager, just the default
    X environment. Your second script, 'my-start-apps' handles starting your FLTK application, which will
    inherit a DISPLAY variable that is already set, IIRC.

    Up to your app to handle window placement, as you'll have no window manager to let the user move
    stuff around (which is probably what you want), and there will be no window manager hot keys to let
    the user accidentally trigger window minimize/window close/etc, suitable for e.g. a kiosk or other dedicated
    function machine.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/b1f93dbb-8e1a-48b1-ad95-85e5bce4e61cn%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.