Monday 18 November 2013

How to install and configure Xvfb in Linux/Centos


Step to install and configure xvfb :

First check the xvfb install or not
# yum info xorg-x11-server-Xvfb

If installed then look like this :
[root@server ~]# yum info xorg-x11-server-Xvfb
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.leapswitch.com
 * epel: mirrors.vinahost.vn
 * extras: mirror.leapswitch.com
 * rpmforge: mirror-fpt-telecom.fpt.net
 * updates: mirror.leapswitch.com
 * webtatic: us-east.repo.webtatic.com
Installed Packages
Name        : xorg-x11-server-Xvfb
Arch        : x86_64
Version     : 1.13.0
Release     : 11.1.el6.centos.2
Size        : 1.8 M
Repo        : installed
From repo   : updates
Summary     : A X Windows System virtual framebuffer X server.
URL         : http://www.x.org
License     : MIT and GPLv2
Description : Xvfb (X Virtual Frame Buffer) is an X server that is able to run
            : on machines with no display hardware and no physical input
            : devices. Xvfb simulates a dumb framebuffer using virtual memory.
            : Xvfb does not open any devices, but behaves otherwise as an X
            : display.  Xvfb is normally used for testing servers.
[root@server ~]#
If it's not installed, please install it :
# yum info xorg-x11-server-Xvfb
# yum install firefox

check firewall version :
#firefox -v

Run firefox browser in backend service  :

/usr/bin/Xvfb :1 -screen 0 1024x768x24 &
export DISPLAY=:1     ( note you can change display number)
echo 'display is set'
firefox &

Install XRDP in Centos 7

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum update yum groupinstall "GNOME Desktop" ...