[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Corel® WordPerfect® 8 for Linux® is here! (fwd)



My WP8 installation is up and working.
Herein a few cautions are passed along, learned during setting up on my
Dell Inspiron Laptop, which is a dual boot Win95 & Linux.

1) Do gunzip and tar -xvf the files in some Linux directory like /tmp
Unpacking in a DOS/Win95 partition is inadequate because a /readme
directory cannot be formed after prior unpacking of a Readme file.

2) Do leave a copy of the tarred files in /tmp  while installing with
./Runme  as they are still needed even though unpacked in /tmp and
subdirectories

3) the correct start command is the  xwp  within the wpbin directory

 tree -d /usr/local/lib/wp8
/usr/local/lib/wp8
|-- shbin10
|-- shlib10
|   `-- fonts
|-- wpbin
|-- wpexpdocs
|-- wpgraphics
|-- wplearn
|-- wplib
|   `-- dt
|       `-- appconfig
|           |-- appmanager
|           |   `-- C
|           |       `-- WordPerfect_8
|           |-- help
|           |-- icons
|           |   `-- C
|           `-- types
|               `-- C
`-- wpmacros
    `-- us

4) the attached file capsules some exchanges on the dc-lug newsgroup on
how to implement command line options.

MarvS
ftp://ftp.tux.org/pub/people/greg-pryzby/GUILG00.GZ

------------------
> The only downfall to this is you can't pass command line parameters.

How about

#!/bin/sh
/opt/wp/wpbin/xwp $@ &


very good! in fact, i'm going to change the script... can i use your tip
in the second edition of Teach Yourself Linux? (i'll give you credit)...
--------------
josh - quite true... although i don't need cmd-line opts for wp, perhaps:

/opt/wp/wpbin/xwp $1 $2 $3 $4 $5 &

would be better?
---------------
Better yet:

#!/bin/sh
PATH=/opt/wp/wpbin:$PATH
export PATH

exec xwp "${@-}"

## NOTREACHED ##

The "${@-}" is the precise notation for adding in all parameters exactly as
they came in, and not failing if there are none even if you have set -u on.
$@ within double quotes has special meaning, the double quotes are needed
in most shell implementations.
-------------
One thing that I had to add to mine is an extra statement to remove the
environment variable LD_LIBRARY_PATH.  When I run xwp with a setting for
that variable, I get a seg fault.  Removing the variable setting though
works fine.
--------------

OK, and there's been some noise on BUGTRAQ about some stuff wp likes to
create in /tmp
(world-writable files, dirs, follows sym links, the usual stuff). So here's
another script to cover the
concerns so far. I just posted this to BUGTRAQ, maybe it'll show up, maybe
not. But my thanks to Billy,
Bruce, and David for their ideas.

#!/bin/sh
# Set $TMPDIR to ~/tmp if the user doesn't already have a TMPDIR variable
if [ "${TMPDIR}" = "" ]; then
#Niermi says: This will break for some values of TMPDIR, the ideal way to do this is:
# if [ -z "${TMPDIR-}" ]; then
        TMPDIR=${HOME}/tmp
fi
if [ ! -d "${TMPDIR}" ]; then
   # Need to make a new directory
   TMPDIR_TEST="error"
   /bin/mkdir "${TMPDIR}" && TMPDIR_TEST="ok"
   if [ ${TMPDIR_TEST} != "ok" ]; then
        /bin/echo "Unable to create safe tmp directory ${TMPDIR}"
        exit 1
    fi
    /bin/chmod o= "${TMPDIR}"
fi
# Set $TMPDIR for the wpc-$HOSTNAME junk
export TMPDIR
# Clear LD_LIBRARY_PATH to prevent reported seg faults
LD_LIBRARY_PATH="" export LD_LIBRARY_PATH
# Set the PATH and exec the app, passing any command-line args
PATH=${PATH}:/path/to/wordperfect/wpbin export PATH
exec xwp "${@-}" &


Reply to: