0

I need to run a program that I haven't developed, the issue is that even if it doesn't run any GUI interface (can be used on silent mode) it still requires an X server running because of the way it's coded.

I have struggled to, not install, but go and start an X server on a Centos 7 system. I don't want it to do anything, just be running like on the background.

Is such a thing possible?

  • Use e.g. Xvfb, the X virtual framebuffer server. – dirkt Feb 26 '19 at 13:03
2

To have a GUI that exists only in memory, I would suggest using Xvfb (X Virtual Frame Buffer). I have written an answer on this previously, so I will just reproduce the same here with some minor edits.

Xvfb (X Virtual Frame Buffer) allows you to have a display that exists only in-memory, so that tests/operations with graphical dependencies can be completed without actually using a GUI.

On CentOS, you can install Xvfb from the core CentOS repository with yum:

yum install xorg-x11-server-Xvfb

Once Xvfb is installed, prefix your command with xvfb-run to use it:

xvfb-run /path/to/your/application

xvfb-run is a wrapper command that does a few useful things. First, it initializes an Xvfb display and passes it to your command for execution. Once the command runs to completion, the display is also gracefully shut down.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.