Subject: (NMRDraw) XView error: Cannot open connection to window server

From: René Genz <[email-masked]>
Date: Sat, 10 Sep 2016 23:37:38 +0200

Package: x2goclient
Version: 4.0.5.1-2016.08.18

On Windows 7 using the built-in X server of X2Go Client starting `nmrDraw` fails.
It is a program from the NMRPipe environment, installation guide is below.
Xfce is used as session.

X2Go server is: Fedora 24 x86_64 (reproducable with Fedora 22 x86_64 as X2Go server)
$ rpm -q x2goserver
x2goserver-4.0.1.19-11.fc24.x86_64

$ rpm -q x2goserver-xsession
x2goserver-xsession-4.0.1.19-11.fc24.x86_64

$ rpm -q nxagent
nxagent-3.5.0.32-4.fc24.x86_64

After starting nmrDraw from the terminal no window of nmrDraw appears as expected.
The error message is:
$ nmrDraw
...
(NMRDraw) XView error: Cannot open connection to window server: :50.0 (Server package)

Using a different X server is a workaround.
The steps are:
1. download freeware: http://mobaxterm.mobatek.net/download.html -- Home Edition
     if you lack administrative rights to install 'installer edition', download and extract 'portable edition'
2. close all X2Go connections
3. reconfigure X2Go client:
     X2Go Client -- Options -- Settings... -- X.Org Server settings: |x| use custom X-Server
     change from:
             executable:             C:\program files\vcxsrv\vcxsrv.exe
             command line options:   -multiwindow -notrayicon -clipboard
     to:
     # for portable version
             executable:     path to MobaXterm_Personal_9.0.exe
     # for installer version (packages extracted during runtime to %temp%\Mxt90 ; X-Server is: %temp%\Mxt90\bin\XWin_MobaX.exe)
             executable:     %programfiles%\Mobatek\MobaXterm Personal Edition\MobaXterm.exe
             on 64 bit OS:   %programfiles(x86)%\Mobatek\MobaXterm Personal Edition\MobaXterm.exe
     # either version
             append to command line options: -silent-dup-error -nolisten inet6 -hostintitle +bs -nowgl -noreset :0
4. restart X2Go client

Other X2Go clients I tested and the outcome of starting `nrmDraw`:
on Lubuntu 14.04 with X2Go Client 4.0.1.1: error

on Mac OS X 10.10.6 with X2Go Client 4.0.5.1: OK

on Fedora 24 x86_64 with X2Go Client 4.0.5.1: OK

The installation guide for NMRPipe follows.
The commands work for Fedora 24 x86_64 using a Bash shell.

### NMRPipe (analyze NMR spectra) installation guide
### website: https://www.ibbr.umd.edu/nmrpipe/install.html ; old: http://spin.niddk.nih.gov/NMRPipe/
# user must use tcsh to use programs, f.e. `nmrDraw`

### download installation files
## required:
wget --timestamping 'http://spin.niddk.nih.gov/NMRPipe/install/download/install.com' # install script
wget --timestamping 'http://spin.niddk.nih.gov/NMRPipe/install/download/binval.com' # an auxiliary script which determines system type
wget --timestamping 'http://spin.niddk.nih.gov/NMRPipe/install/download/NMRPipeX.tZ' # data for all versions of NMRPipe
# font.com not required! only use the "font.com" script if the "install.com" procedure or README_NMRPIPE_USERS file indicates that it is needed for your system (mostly just SGI/IRIX systems, and some versions of Linux)
## optional:
#wget --timestamping 'http://spin.niddk.nih.gov/NMRPipe/install/download/talos.tZ' # files required for TALOS+ and SPARTA+
#wget --timestamping 'http://spin.niddk.nih.gov/NMRPipe/install/download/dyn.tZ' # files required for DYNAMO and MFR
# DemonstrationData
#wget --timestamping 'http://spin.niddk.nih.gov/NMRPipe/install/data/data.tar'
#wget --timestamping 'http://spin.niddk.nih.gov/NMRPipe/install/valpha/valpha_all.tar'

### download installation files -- no difference
# http://nmrpipe.org/install.html
## required:
#wget --timestamping 'https://www.ibbr.umd.edu/nmrpipe/install.com' # Install script
#wget --timestamping 'https://www.ibbr.umd.edu/nmrpipe/binval.com' # Used by install script
#wget --timestamping 'https://www.ibbr.umd.edu/nmrpipe/NMRPipeX.tZ' # NMRPipe executables and files for Linux and Mac OS X
#wget --timestamping 'https://www.ibbr.umd.edu/nmrpipe/s.tZ' # NIST IBBR Updates for NMRPipe
## optional:
#wget --timestamping 'https://www.ibbr.umd.edu/nmrpipe/dyn.tZ' # Optional Ramachandran surfaces for TALOS+ graphics, PDB data and all files for DYNAMO and MFR
#wget --timestamping 'https://www.ibbr.umd.edu/nmrpipe/talos.tZ' # Files required for TALOS-N, TALOS+, and SPARTA+

### installation
## required programs
dnf install -y tcsh
dnf install -y xterm

## 32 bit compatibility libs
# ia32-libs @Debian/Ubuntu is the 32-bit version of the C standard library; glibc.i686 @Fedora
dnf install -y glibc
dnf install -y glibc.i*

## for nmrDraw on 64-bit Fedora
dnf install -y libX11.so.6
dnf install -y libXext.so.6

## some programs, such as SPARTA+ and TALOS+, might require 32-bit C++ libraries
# $ repoquery -f */libstdc++.so
#  compat-gcc-34-c++-0:3.4.6-24.fc17.x86_64
#  libstdc++-devel-0:4.7.2-8.fc18.i686
#  gcc-c++-0:4.7.2-8.fc18.x86_64
dnf install -y libstdc++.so.6
dnf install -y libstdc++-devel.i*

## fonts
dnf install -y xorg-x11-fonts-100dpi
dnf install -y xorg-x11-fonts-ISO8859-1-100dpi
dnf install -y xorg-x11-fonts-75dpi
dnf install -y xorg-x11-fonts-ISO8859-1-75dpi
dnf install -y xorg-x11-fonts-misc

## for test after installation
dnf install -y xset

## put installation files into place
DIR0="/usr/local/NMRPipe"
mkdir -p "${DIR0}"
for F in *.tZ; do
         mv "${F}" "${DIR0}"
done
for F in *.com; do
         mv "${F}" "${DIR0}"
done
# required for access later on
chmod o+rx "${DIR0}"
cd "${DIR0}"

# *.Z and *.tar not present
for F in *.tZ; do
         chmod a+r "${F}"
done
for F in *.com; do
         chmod a+rx "${F}"
done

#`./install.com +help` to generate a list of install command-line options and help
#tcsh "${DIR0}/install.com" # tcsh not required for installation, works with Bash; execution or program requires tcsh, though
"${DIR0}/install.com"

## modify config file to source environment automatically
# man 1 tcsh => global file = /etc/csh.cshrc ; private file = ~/.cshrc
# not changing /etc/csh.cshrc because ancient gnuplot from NMRPipe would be used by default, hence break workflow for other users

# note TCSH is required to start/use programs!
# users with Bash as default shell have to start TCSH before they can start `nmrDraw`

FILE="${HOME}/.cshrc"
echo "### NMRPipe" >> "${FILE}"
# see above for DIR0 value!
grep -v "#" /usr/local/NMRPipe/example.cshrc | grep -v '^$' >> "${FILE}"
# Some previous versions of NMRPipe have an expiration date. To override the expiration date:
echo "setenv NMR_CONT CORRECT_ALL" >> "${FILE}"
# full path to `nmrDraw`: /usr/local/NMRPipe/nmrbin.linux9/nmrDraw
-- 
Kind regards,
René