old blog,

Running X applications headless using Xvfb

Izhar Firdaus Izhar Firdaus Follow Support Jun 17, 2007 · 1 min read
Running X applications headless using Xvfb
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.
Sometimes, you might want to run certain X applications as a daemon in the background. For example, in my case, I want to make Ktorrent run in the background on startup while I control the torrents using its WebUI. However, to run Ktorrent , I must have X running and logged in to the desktop. So, how can I do this? , the answer is by using X Virtual Framebuffer Server.

How it works?

Xvfb emulates an X server without outputing it to monitor. Applications connect to it and run under the impression the GUI is there. Its as simple as that!. No modification needed on the applications that going to be run on it.

Read more : http://en.wikipedia.org/wiki/Xvfb

How to do it?

First, make sure you have Xvfb installed. If you dont, install it using your package manager.
In Fedora, use
yum install xorg-x11-server-Xvfb


Then, run Xvfb in any unique/unused display number, in this example, I put 100. Disable access control to the display so that you dont have to go through the hassle of setting access control for it.
Xvfb :100 -ac


Now that you got Xvfb up and running, time to start the app.

Before starting the app, export the DISPLAY environment variable to point to display number 100
export DISPLAY=:100.0


execute the command for the app, and ure good to go :D
ktorrent


Enjoy~
Written by Izhar Firdaus Follow Support
I'm a system architect, data engineer and developer advocate with passion in Free / Open Source software, entrepreneurship, community building, education and martial art. I take enjoyment in bridging and bringing together different FOSS technologies to help businesses and organizations utilize IT infrastructure to aid and optimize their business and organizational process.

Fedora repository mirroring script using reposync

I'm back~ :DAs my first post of this holidays .. I give y'all the script i've been using to mirror and sync the fedora repos. The scr...

In old blog, Jun 09, 2007

« Previous Post

Setting up ADSL connection, the Fedora way

Some users might not notice that Fedora have a very easy to use GUI for setting up ADSL and other network connections. The tool is in...

In old blog, Jun 18, 2007

Next Post »