Installing and Configuring xvfb
Asked Answered
K

5

28

I'm trying to find a Ubuntu operating system, version of xorg, and version of xvfb that are compatible. Can anyone help me with directions to install xvfb without getting a hang on Initializing build-in extension GLX

So far I've tried the following

Ubuntu 13 Server(No graphics card)
sudo apt-get install xorg 
sudo apt-get install xvfb
sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic

I run the command xvfb :10 and it hangs on

Initializing build-in extension GLX

Are there specific versions I could download that will work or a operating system that would be compatible?

Kiefer answered 9/2, 2014 at 22:27 Comment(1)
on 14.04 ubuntu server i get this problem too.Keffer
F
19

Install Xvfb or Xephyr or Xvnc. Also install pyvirtualdisplay python module. This is for Ubuntu 14.04 and tested on 16.04 as well.

sudo apt-get install python-pip
sudo apt-get install xvfb xserver-xephyr vnc4server
sudo pip install pyvirtualdisplay
# optional
sudo apt-get install python-pil scrot
sudo pip install pyscreenshot

Now you can start Xvfb from your python script. It will start Xvfb when your script will be executed. Add the following lines to your code.

from pyvirtualdisplay import Display
display = Display(visible=0, size=(1366, 768))
display.start()

Here is the example code.

from pyvirtualdisplay import Display
from selenium import webdriver

display = Display(visible=0, size=(1366, 768))
display.start()
browser = webdriver.Firefox()
browser.get('http://www.google.com')
print browser.title
browser.quit()

display.stop()
Feticide answered 15/2, 2017 at 12:39 Comment(0)
A
10

Here is what I do:

apt install xvfb

Xvfb&

xvfb-run someprogram

Source: http://realtechtalk.com/using_Xvfb_on_virtual_remote_ssh_server_to_have_X_graphical_programs_work-2287-articles

Allopathy answered 26/3, 2020 at 20:12 Comment(1)
Thanks. Much easier to use xvfb-run <myprogram> then configuring xvfb.Slightly
T
6

The output means xvfb works fine. It should run as a background process (or service).

Tetany answered 10/9, 2014 at 9:42 Comment(2)
I'm having the same issue. To clarify... the fact it hangs is ok? Should I control-C out of the process when it hangs?Transliterate
@Transliterate - if you wish to run xvfb in order to have other programs use it; than xvfb process must be execute as a background process (i.e. xvfb [args] &). If you'll execute it, and control-C out of the process, it will be terminated and other programs won't be able to use it.Tetany
P
1

in my log files i see everything is okay up to Initializing built-in extension GLX but then it is followed by

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error:   Could not resolve keysym XF86AudioMicMute
Errors from xkbcomp are not fatal to the X server

may be the key issue is with xkbcomp?

Presentation answered 31/10, 2014 at 13:2 Comment(0)
M
-1

You can try pyvirtualdisplay LINK HERE. Further, This may be helpful: LINK

Mathematician answered 20/3, 2014 at 13:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.