Long story short - I want to run EE apps on a
headless server. By "
headless" I mean not APP_ALLOW_NO_GPU flag and not running an app without GPU (on integrated graphics), but literally on a "
headless" server, with NO display at all.
Now what I need to do to run compiled EE app on a
headless linux server (new install on DigitalOcean):
1. Create Ubuntu 18.04 VM.
2. Install all needed packages.
3. Create virtual framebuffer (aka virtual display) using Xvfb
4. Export display in console (export DISPLAY=:0 )
5. Run EE application
6. Run VNC server to manage application (like EE server for projects).
and everything is OK.
If I don't do items 3-4, I get the following error:
Code:
> ./Server
Can't open XDisplay
sh: 1: zenity: not found
I wanted to try to move
Update() to
IntPre() because I thought display is not initialized there and that's the reason to use APP_EXIT_IMMEDIATELY, but it looks like I am wrong.
I love this engine very much, but in my opinion it currently has one problem (actually wo, but one comes from another): inability to run
headless out of the box. The problem that comes from this one is that "Server" application for collaborative work is hard to host because you need to have either Windows server (which is inefficient in disk space and resources), or use virtual framebuffers, which is complex and eats a lot of resources, because display is handled by CPU and ram.
For Serer application it would be cool to have console application for settings/account management (or if the same app is run with arguments like "get" or "set" it would be nice too), because you need to login to
Linux machine with server to perform setup anyway.
I can do it myself, but I don't want to drag custom changes through EE versions, because I think these features are needed in default versions of EE and Server.
=====
Quote:What's the reason to make a loop in InitPre?
HERE you said the following:
Quote:if you don't need graphics directx initilization then you can do your codes in InitPre and enable flag APP_EXIT_IMMEDIATELY