From: Cun Zhang (apzc2529_at_gmail.com)
Date: Thu Nov 24 2011 - 07:07:11 CST

I have solved this problem by another way. My OS is Debian.

At the end of the vmd csh script, print the full command, then using a bash
script replace it.

Here is my vmd start script written by bash (the command line of rlwrap is
from that vmd csh script )

#!/bin/bash
defaultvmddir=/usr/local/lib/vmd
vmdbasename=vmd
export
LD_LIBRARY_PATH=/usr/local/lib/vmd::/usr/local/lib/python2.6/site-package
export VMDDISPLAYDEVICE=win
export VMDSCRPOS="596 190"
export VMDSCRSIZE="669 634"
export VMDSCRHEIGHT=6.0
export VMDSCRDIST=-2.0
export VMDTITLE=on
export VMD_WINGEOM="-geometry 80x11-0-0"
export TCL_LIBRARY=/usr/local/lib/vmd/scripts/tcl
export PYTHONPATH=/usr/local/lib/vmd/scripts/python

rlwrap -C vmd -c -b\(\){}[],\&^%#\;\|\\ -f
/usr/local/lib/vmd/vmd_completion.dat /usr/local/lib/vmd/vmd_LINUXAMD64 $*

On Wed, Nov 23, 2011 at 3:38 AM, Pablo De Biase <pablodebiase_at_gmail.com>wrote:

> I have found a solution to your problem and mine. Something has changed
> from previous version of ubuntu to ubuntu oneiric. I think it may be the
> csh. Now is using a new version. rlwrap version seems to be the same.
> To fix this issue edit vmd run script (/usr/local/bin/vmd). If you use
> "vi" just do:
> sudo vi /usr/local/bin/vmd
>
> look for rlwrap doing in vi "/rlwrap"
> there you will see this:
>
> # detect if we have rlwrap available to have commandline editing
> set vmdprefixcmd=""
> if (("${ARCH}" == "LINUX") || ("${ARCH}" == "LINUXAMD64")) then
> set rlwrap=`which rlwrap`
> if ( -x "$rlwrap" ) then
> if ( -f ${MASTERVMDDIR}/vmd_completion.dat ) then
> set vmdprefixcmd="rlwrap -C vmd -c -b(){}[],&^%#;|\\ -f
> ${MASTERVMDDIR}/vmd_completion.dat "
> else
> set vmdprefixcmd="rlwrap -C vmd -c -b(){}[],&^%#;|\\ "
> endif
> endif
> endif
>
> Apparently, csh cannot understand the symbols as they are: (){}[],&^%#;|\\
> Probably a slash (\) is needed before some symbols now.
> I just fix it removing the -b option because the default options are those
> symbols. So comment both lines and replace by the same line without b
> option and without symbols as I did below. That fixes the issue.
>
> # detect if we have rlwrap available to have commandline editing
> set vmdprefixcmd=""
> if (("${ARCH}" == "LINUX") || ("${ARCH}" == "LINUXAMD64")) then
> set rlwrap=`which rlwrap`
> if ( -x "$rlwrap" ) then
> if ( -f ${MASTERVMDDIR}/vmd_completion.dat ) then
> # set vmdprefixcmd="rlwrap -C vmd -c -b(){}[],&^%#;|\\ -f
> ${MASTERVMDDIR}/vmd_completion.dat "
> set vmdprefixcmd="rlwrap -C vmd -c -f
> ${MASTERVMDDIR}/vmd_completion.dat "
> else
> # set vmdprefixcmd="rlwrap -C vmd -c -b(){}[],&^%#;|\\ "
> set vmdprefixcmd="rlwrap -C vmd -c "
> endif
> endif
> endif
>
>
>
> On Nov 1, 2011, at 11:50 AM, Frank Barry wrote:
> > I am having problems running vmd 1.9 on a newly installed Ubuntu box.
> >
> > $ vmd
> > rlwrap: No match.
> >
> > I found this related posts on the list:
> > http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/18099.html
> >
> > As in the post, if I comment out the "rlwrap block" in the start-up
> script I can get vmd to open but with quite poor performance (maybe
> unrelated).
> > I am quite new to Linux (especially Ubuntu). So any tips on a better way
> to proceed would be helpful.
> > Thanks in advance,
> > Frank
> >
> >
> > ## using vmd-1.9.bin.LINUXAMD64.opengl.tar.gz
> >
> > $ which csh rlwrap
> > /bin/csh
> > /usr/bin/rlwrap
> >
> >
> > $ ./configure
> > using configure.options: LINUXAMD64 OPENGL FLTK TK ACTC CUDA IMD
> LIBSBALL XINERAMA XINPUT LIBTACHYON VRPN NETCDF TCL PYTHON PTHREADS NUMPY
> SILENT
> >
> > $ cd src/
> >
> > $ sudo make install
> > Make sure /usr/local/bin/vmd is in your path.
> > VMD installation complete. Enjoy!
> >
> > $ vmd
> > rlwrap: No match.
> >
> >
> > $ head /usr/local/bin/vmd
> > #!/bin/csh
> > set defaultvmddir="/usr/local/lib/vmd"
> >
> >
> > $ uname -a
> > Linux perutz 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011
> x86_64 x86_64 x86_64 GNU/Linux
> >
> >
> > $ lsb_release -a
> > No LSB modules are available.
> > Distributor ID: Ubuntu
> > Description: Ubuntu 11.10
> > Release: 11.10
> > Codename: oneiric
> >
>
>

-- 
========================================
Cun Zhang
Ph.D. Candidate
LNM,Institute of Mechanics
Chinese Academy of Sciences
Beijing, 100190, China
Tel:86-10-82544204
http://www.edwardpku.com/cun
========================================