WX event loop on Linux (optionally display less)

24 views
Skip to first unread message

Basile STARYNKEVITCH

unread,
Sep 22, 2026, 4:39:16 AM (4 days ago) Sep 22
to wx-u...@googlegroups.com, b.stary...@gmail.com
Hello all,

I am a Linux only user (Debian & Ubuntu) and French open source
developer (see e.g. https://arxiv.org/abs/1109.0779 ...). So I
specifically don't care about WX for proprietary operating systems sold
by Microsoft (I never used any of them).

My current open source project is RefPerSys.org (an inference engine
for expert systems, CeCILL/GPL licensed....)

Is it possible to use WX (or perhaps some other open source graphical
widget toolkit) on Linux without a working display and screen, but
processing other events (e.g. with poll(2) or pselect(2)...)

The use cases I have in mind include:

1. starting a [multi-threaded] Linux process (from a dynamically linked
ELF executable) which initially interacts with its user thru some
graphical interface (eg. WX based) so use XOpenDisplay or
wl_display_connect and 8 hours later continue to run without any
graphical display (so calls XCloseDisplay or wl_display_disconnect) in
the background, possibly using daemon(3) call. That process is still
event based (e.g. could be some HTTPS server or accept(2)-ing some
socket connections). We could assume that the refpersys process runs
for weeks of elapsed time (maybe even on some Linux supercomputer) and
on office time has a graphical under interface which is not usable at
night.

2. starting a long running Linux process (accepting eg ssh or HTTPS
connections) in the evening and have the same process opening a
graphical interface in the next morning. Assume a process running for
several days or weeks.


I suppose to not be alone with those wishes. Obviously a lot of HPC
software (e.g. simulation of galaxy collisions, or of electrical
distributions networks) are running for weeks of real time. A lot of
top500.org supercomputers have Linux processes running for several days
of elapsed time.

It seems that many graphical toolkit open source libraries are
providing their own event loop, and none of them is based upon external
event loop libraries like https://libevent.org/

Thanks for reading, and sorry for my poor English (I am French)

--

Basile STARYNKEVITCH
<bas...@starynkevitch.net>
8 rue de la Faïencerie
http://starynkevitch.net/Basile/
92340 Bourg-la-Reine
https://github.com/bstarynk
France
https://github.com/RefPerSys/RefPerSys
https://orcid.org/0000-0003-0908-5250

Vadim Zeitlin

unread,
Sep 22, 2026, 6:44:16 AM (4 days ago) Sep 22
to wx-u...@googlegroups.com
On Tue, 22 Sep 2026 10:24:27 +0200 Basile STARYNKEVITCH wrote:

BS> Hello all,

Bonjour Basile,

BS> Is it possible to use WX (or perhaps some other open source graphical
BS> widget toolkit) on Linux without a working display and screen, but
BS> processing other events (e.g. with poll(2) or pselect(2)...)

Yes, sure. You can use wxConsoleEventLoop which, as its name indicates,
works without GUI. It uses epoll() and not pselect() under Linux, but this
is an implementation detail and shouldn't affect your use of it.

It's also perfectly possible to use the normal GUI event loop without a
display by using Xvfb or Weston in headless mode.

What is better depends on what do you actually need to do.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
https://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages