[FreeNX-kNX] VMware Workstation 5 via NX ?
Christoph Peus
cp at peus.net
Mon Oct 3 19:16:36 UTC 2005
Hi,
I've installed the freenx 1.4.0 server on a gentoo installation and it
works well with the NX Client 1.4 under WinXP - tested with xterm and xarkeia.
But my main intention for setting up freenx was to run VMware remote,
because the "speed" without NX-like compression is unbearable. But this
doesn't work. After "Authentication completed" I get "Negotiating link
parameters" message for some seconds, then "Could not yet establish the
connection to the remote proxy..."
The "session" file on the server side looks like this:
----------
NXPROXY - Version 1.4.0
Copyright (C) 2001, 2004 NoMachine.
See http://www.nomachine.com/ for more information.
Info: Proxy running in server mode with pid '8793'.
Info: Waiting for connection from '10.130.5.1' on port '5001'.
grep: write error: Bad file descriptor
/opt/vmware/lib/lib/wrapper-gtk24.sh: line 94: 1: Bad file descriptor
Info: Aborting procedure due to signal '15'.
----------
VMware's wrapper-gtk24 script seems to cause of the problem, but what's
wrong there? Any idea?
Thanks in advance!
Regards
Christoph
wrapper-gtk24.sh:
(I have marked line 94)
#!/bin/sh
libs="$1"
shift
binary="$1"
shift
confs="$1"
shift
# Apppend a directory to LD_LIBRARY_PATH
vm_append_lib() {
local lib="$1" # IN: The library to append
if [ "$LD_LIBRARY_PATH" = '' ]; then
LD_LIBRARY_PATH="$libs"'/'"$lib"
else
LD_LIBRARY_PATH="$LD_LIBRARY_PATH"':'"$libs"'/'"$lib"
fi
}
# Append the GTK+ 2.4 libaries to LD_LIBRARY_PATH
vm_fix_gtk24() {
# GLib
vm_append_lib 'libglib-2.0.so.0'
vm_append_lib 'libgmodule-2.0.so.0'
vm_append_lib 'libgobject-2.0.so.0'
# ATK
vm_append_lib 'libatk-1.0.so.0'
# Pango
vm_append_lib 'libpango-1.0.so.0'
vm_append_lib 'libpangoft2-1.0.so.0'
vm_append_lib 'libpangoxft-1.0.so.0'
vm_append_lib 'libpangox-1.0.so.0'
# GTK+
vm_append_lib 'libgdk-x11-2.0.so.0'
vm_append_lib 'libgdk_pixbuf-2.0.so.0'
vm_append_lib 'libgtk-x11-2.0.so.0'
# librsvg
vm_append_lib 'librsvg-2.so.2'
# GnomeCanvas
# We use gnomecanvas 2.6. Apparently 2.4 is symbol compatible but not
# compatible enough to avoid crashing at times, so consider gnomecanvas to
# be part of the base Gtk set.
vm_append_lib 'libgnomecanvas-2.so.0'
# These are not a direct dependency of GTK+ 2.4, but they keep breaking
# binary compatibility in both directions, so use ours.
vm_append_lib 'libfreetype.so.6'
vm_append_lib 'libXft.so.2'
vm_append_lib 'libXrender.so.1'
# FontConfig is actually fairly well behaved but the fonts.conf that we
# force when VMWARE_USE_SHIPPED_GTK=yes generates seemingly harmless
# warnings for the older version of fontconfig shipped with RH9.
# If we're going to force the config file, we should force a lib
# that parses it properly
vm_append_lib 'libfontconfig.so.1'
echo "$LD_LIBRARY_PATH"
}
# Parse ldd's output and append all missing libraries to LD_LIBRARY_PATH
vm_append_missing() {
local lib
local dummy
local status
while read -r lib dummy status; do
if [ "$status" = 'not found' ]; then
vm_append_lib "$lib"
fi
done
echo "$LD_LIBRARY_PATH"
}
# Run "$binary" while watching its progress on its stderr.
vm_run() {
local exitCode;
# Append any libraries that are still missing.
export LD_LIBRARY_PATH="`LANGUAGE=C LANG=C ldd "$binary" |
vm_append_missing`"
#
# "$binary"'s stdout goes unmodified to the shell's stdout.
# "$binary"'s stderr goes almost unmodified to the shell's stderr
# (lines starting with "UI: Wrapper: " are swallowed.)
#
line 94: exec 3>&1
"$binary" "$@" 2>&1 1>&3 | (
local exitCode=1 # Failure
local line
while IFS='' read -r line; do
# When "$binary" enters the event loop, pretty much all the GTK stuff
# should have been initialized.
case "$line" in
'UI: Wrapper: '*)
exitCode=0 # Success
;;
*)
echo "$line"
;;
esac
done
exit "$exitCode"
) 1>&2
exitCode="$?"
exec 3>&-
return "$exitCode"
}
#
# Dot releases of g++ keep breaking binary compatibility. Unconditionally use
# the C++ libraries we compiled with the same compiler.
#
vm_append_lib 'libgcc_s.so.1'
vm_append_lib 'libstdc++.so.5'
vm_append_lib 'libsigc-2.0.so.0'
vm_append_lib 'libglibmm-2.4.so.1'
vm_append_lib 'libglibmm_generate_extra_defs-2.4.so.1'
vm_append_lib 'libatkmm-1.6.so.1'
vm_append_lib 'libpangomm-1.4.so.1'
vm_append_lib 'libgdkmm-2.4.so.1'
vm_append_lib 'libgtkmm-2.4.so.1'
vm_append_lib 'libgnomecanvasmm-2.6.so.1'
#
# Redhat-7.3 doesn't have libpng12.so.0. the executable doesn't link to
# it directly, so we explicitly include it here
#
vm_append_lib 'libpng12.so.0'
#
# When environment variable VMWARE_USE_SHIPPED_GTK is set to "yes", we
# forcefully use the 32-bit GTK+ 2.4 runtime environment (libraries + their
# configuration files) that we ship.
#
# When environment variable VMWARE_USE_SHIPPED_GTK is set to "no", we use
# the system's 32-bit GTK+ 2.4 runtime environment.
#
# When environment variable VMWARE_USE_SHIPPED_GTK is not set (the default), we
# try to make an educated guess.
#
if [ "$VMWARE_USE_SHIPPED_GTK" = '' ]; then
if LANGUAGE=C LANG=C ldd -r "$binary" 2>&1 >/dev/null \
| grep -q 'gtk_file_chooser_'; then
# No 32-bit GTK+ 2.4 runtime environment on the system.
VMWARE_USE_SHIPPED_GTK=yes
fi
fi
if [ "$VMWARE_USE_SHIPPED_GTK" = '' ]; then
#
# A 32-bit GTK+ 2.4 runtime environment is present on the system.
# Unfortunately, the environment is broken on many 64-bit distributions
# including Fedora Core 3, excluding Debian unstable.
#
vm_run "$@"
exitCode="$?"
if [ "$exitCode" -eq 0 ]; then
# Assume that the system's environment works. Then we are done.
exit "$exitCode"
fi
if [ "$exitCode" -gt 128 ]; then
# The watcher process received a signal, maybe a SIGINT if the user
# pressed Ctrl-C.
exit "$exitCode"
fi
# Assume that the system's environment is broken.
VMWARE_USE_SHIPPED_GTK=yes
fi
if [ "$VMWARE_USE_SHIPPED_GTK" = 'yes' ]; then
#
# Libraries
#
export LD_LIBRARY_PATH="`vm_fix_gtk24`"
#
# Library configuration files
#
if [ -z "$PANGO_RC_FILE" ]; then
export PANGO_RC_FILE="$confs"'/etc/pango/pangorc'
fi
if [ -z "$GDK_PIXBUF_MODULE_FILE" ]; then
export GDK_PIXBUF_MODULE_FILE="$confs"'/etc/gtk-2.0/gdk-pixbuf.loaders'
fi
if [ -z "$GTK_IM_MODULE_FILE" ]; then
export GTK_IM_MODULE_FILE="$confs"'/etc/gtk-2.0/gtk.immodules'
fi
# We always want to append our gtkrc, whether or not this variable is set.
if [ -z "$GTK2_RC_FILES" ]; then
export GTK2_RC_FILES='/etc/gtk-2.0/gtkrc:'"$HOME"'/.gtkrc-2.0'
fi
export GTK2_RC_FILES="$GTK2_RC_FILES"':'"$confs"'/etc/gtk-2.0/gtkrc'
if [ -z "$FONTCONFIG_PATH" ]; then
export FONTCONFIG_PATH="$confs"'/etc/fonts'
fi
# always append our libdir to GTK_PATH
vm_gtk_path="$confs"'/lib/gtk-2.0/2.4.0/'
if [ -z "$GTK_PATH" ]; then
export GTK_PATH="$vm_gtk_path"
else
export GTK_PATH="$GTK_PATH"':'"$vm_gtk_path"
fi
fi
vm_run "$@"
exit 0
More information about the FreeNX-kNX
mailing list