Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Xvfb and ssh with X forwarding

900 views
Skip to first unread message

Russ P.

unread,
Apr 2, 2010, 2:47:05 PM4/2/10
to
I am running a large program remotely on Linux using ssh with X
forwarding. The program produces a large X graphics display, but I
don't need to see it, and it is such a huge network hog that it seems
to cause the program to crash when I try to run it remotely. I just
need the text output files generated by the program.

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.

Nico Kadel-Garcia

unread,
Apr 3, 2010, 8:52:16 PM4/3/10
to

Use VNC. Connect only as needed to the VNC based X session.

Simon Tatham

unread,
Apr 4, 2010, 3:52:34 AM4/4/10
to
Russ P. <russ.p...@gmail.com> wrote:
> 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

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."

Russ P.

unread,
Apr 6, 2010, 9:40:33 PM4/6/10
to
On Apr 4, 12:52 am, Simon Tatham <ana...@pobox.com> wrote:

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.

Regis

unread,
Apr 7, 2010, 9:29:07 AM4/7/10
to
Nico Kadel-Garcia <nka...@gmail.com> writes:

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).


Russ P.

unread,
Apr 8, 2010, 2:06:41 PM4/8/10
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.

Regis

unread,
Apr 9, 2010, 10:39:00 AM4/9/10
to
"Russ P." <russ.p...@gmail.com> writes:

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.

0 new messages