linux apache cgi execute external program lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cappe · 2019-02-26 15:54 Hello, I can not to run from a cgi in apache a x11 program. I tried to run it as root but nothing. RunCommand( '/bin/sh',['-c','echo xx | sudo -S ' + ExeName],stringq); How can I run an x11 program from a cgi apache under linux? ---------------------------------------------------------------------- cpalx · 2019-02-27 16:38 i think, It can not do it. ---------------------------------------------------------------------- cappe · 2019-02-27 17:44 It would seem that it is possible to do so, but there are security problems. In any case, I did not succeed. ---------------------------------------------------------------------- cpalx · 2019-02-27 20:27 why dont you try to use broadway? https://developer.gnome.org/gtk3/stable/gtk-broadway.html ---------------------------------------------------------------------- korba812 · 2019-02-27 21:42 I think you should set "DISPLAY" environment variable https://askubuntu.com/questions/47642/how-to-start-a-gui-software-on- a-remote-linux-pc-via-ssh ---------------------------------------------------------------------- cappe · 2019-02-28 06:33 Quote from: cpalx on February 27, 2019, 09:27:13 pmwhy dont you try to use broadway? https://developer.gnome.org/gtk3/stable/gtk-broadway.html excellent, but I have some initial difficulties, and I do not seem to work with applications written in lazarus. At least it seems to me. ---------------------------------------------------------------------- Thaddy · 2019-02-28 06:52 Quote from: cpalx on February 27, 2019, 09:27:13 pmwhy dont you try to use broadway? https://developer.gnome.org/gtk3/stable/gtk-broadway.html Needs gtk3+, won't work with gtk2. It also needs web-sockets which is not always supported, although all mayor browsers support it in their latest releases it is near unusable on mobile platforms.