Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the display successfully starts before returning #25

Closed
mithro opened this issue Apr 28, 2017 · 5 comments
Closed

Check the display successfully starts before returning #25

mithro opened this issue Apr 28, 2017 · 5 comments

Comments

@mithro
Copy link

mithro commented Apr 28, 2017

(Fix this TODO)

We use the xdpyinfo tool in our own code to check if a X server is working.

Code something like this would work;

start_time = time.time()
while time.time() - start_time < START_TIMEOUT:
    # We don't explicitly set the display, as we want to check the
    # environment value.
    exit_code = subprocess.call(['xdpyinfo'])
    if exit_code == 0:
        logging.info('Successfully started Xvfb with display "%s".', display)
        return
    logging.warn('xdpyinfo check failed with exit code %s while starting Xvfb on "%s".', exit_code, display)
    time.sleep(0.1)
logging.fatal('Failed to start Xvfb on display "%s" (xdpyinfo check failed).', display)
@mithro
Copy link
Author

mithro commented Apr 28, 2017

(I'm opening this issue as I hope to send you a pull request with a fix soon.)

@The-Compiler
Copy link

xdpyinfo won't necessarily be installed, though.

@mithro
Copy link
Author

mithro commented Apr 28, 2017

We can probably try a bunch of different tools (xeyes was a previous test tool :-)

@ponty
Copy link
Owner

ponty commented May 2, 2017

Other X11 tools:

https://packages.debian.org/jessie/x11-apps

 - atobm, bitmap, and bmtoa, tools for manipulating bitmap images;
 - ico, a demo program animating polyhedrons;
 - oclock and xclock, graphical clocks;
 - rendercheck, a program to test render extension implementations;
 - transset, a tool to set opacity property on a window;
 - xbiff, a tool which tells you when you have new email;
 - xcalc, a scientific calculator desktop accessory;
 - xclipboard, a tool to manage cut-and-pasted text selections;
 - xconsole, which monitors system console messages;
 - xcursorgen, a tool for creating X cursor files from PNGs;
 - xditview, a viewer for ditroff output;
 - xedit, a simple text editor for X;
 - xeyes, a demo program in which a pair of eyes track the pointer;
 - xgc, a graphics demo;
 - xload, a monitor for the system load average;
 - xlogo, a demo program that displays the X logo;
 - xmag, which magnifies parts of the X screen;
 - xman, a manual page browser;
 - xmore, a text pager;
 - xwd, a utility for taking window dumps ("screenshots") of the X session;
 - xwud, a viewer for window dumps created by xwd;
 - Xmark, x11perf, and x11perfcomp, tools for benchmarking graphical
   operations under the X Window System;

https://packages.debian.org/jessie/x11-utils

 - appres, editres, listres and viewres, which query the X resource database;
 - luit, a filter that can be run between an arbitrary application and a
   UTF-8 terminal emulator;
 - xdpyinfo, a display information utility for X;
 - xdriinfo, query configuration information of DRI drivers;
 - xev, an X event displayer;
 - xfd, a tool that displays all the glyphs in a given X font;
 - xfontsel, a tool for browsing and selecting X fonts;
 - xkill, a tool for terminating misbehaving X clients;
 - xlsatoms, which lists interned atoms defined on an X server;
 - xlsclients, which lists client applications running on an X display;
 - xlsfonts, a server font list displayer;
 - xmessage, a tool to display message or dialog boxes;
 - xprop, a property displayer for X;
 - xvinfo, an Xv extension information utility for X;
 - xwininfo, a window information utility for X;

@ponty
Copy link
Owner

ponty commented May 28, 2020

Check with xdpyinfo is implemented.

@ponty ponty closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants