A few years ago I thought I had a solution to this problem, but I just
tried it and it doesn't seem to work anymore. I have these lines in my
bash script for starting the program:
if [ $Xdisplay = false ]; then # suppress X window displays
Xvfb :9 >& /dev/null & # send X display to X virtual frame buffer
export DISPLAY=:9
fi
and this is what I get:
xterm Xt error: Can't open display: :9
Xlib: connection to ":9.0" refused by server
Xlib: No protocol specified
Any ideas on how to fix this? Thanks.
Russ P.
Use VNC. Connect only as needed to the VNC based X session.
Instead of redirecting Xvfb's output to /dev/null, direct it to a
file, and then look at the file to see if Xvfb has printed any
useful error messages.
--
Simon Tatham "Thieves respect property; they only wish the property to
<ana...@pobox.com> be their own, that they may more properly respect it."
Good idea. Here's what I get:
AUDIT: Tue Apr 6 18:32:33 2010: 4673 Xvfb: client 1 rejected from
local host
I ran this locally, without ssh, so the problem apparently has nothing
to do with ssh. If anyone can suggest a good forum for Xvfb problems,
please let me know. Thanks.
Russ P.
I think VNC is an excellent suggestion here. Its protocol is much
more effecient than X and the reconnectability is lovely. It is also
likely to solve the issue (though not in the way you apparently want
to).
I'd be happy to try VNC if it is faster than X. Someone told me a few
years ago that VNC is great for Unix-to-Windows connnectivity, but not
for Unix/Unix. Is it? I don't want to go to the trouble of setting it
up for nothing. Thanks.
I've used it unix to unix, windows to windows, windows to unix.
If you're dealing with a LAN, then the gain probably isn't worth it.
If you're access the unix server over a less reliable or slower
(e.g. broadband or less) connection, VNC is worth it for its
reconnectability alone, with the bandwidth savings as a welcome
bonus. Finally, it may also happen to solve whatever issue you're
fighting with in your OP.
It's not that hard to set up, so I'd still encourage you to give it a
whirl.