Zulqarnain Hayat schrieb:
Hi,
This is zulqarnain from dubai uae i hope you are fine over there i have some problem regading ksh shell i wrote in ksh but it is not running in Linux suse .so kindly tell what i will do before i have changed in bash shell scrit so it is still not working please help in this prob.script is attached with my e-mail .

What is not working here?

Please try to capture the output from your script someplace.

You can try
- Send the output to syslog, by using a wrapper script that redirects output (in particular standard error output) to /bin/logger.

- Use ksh output redirection (exec 2>1 >/my/log/file.$$) to capture any messages from your script. Please note that you can't place your log files in /var/tmp or /tmp (or subdirectories thereof), because there they will get deleted when the session ends.

- Set up your session to start an xterm instead of your script and manually run the script from the terminal.

Some more comments inline:

#!/bin/ksh
LANG=ar_SA.UTF-8
LC_MONETARY=ar_SA.UTF-8
LC_NUMERIC=ar_SA.UTF-8
LC_MESSAGES=ar_SA.UTF-8
LC_COLLATE=ar_SA.UTF-8
LC_CTYPE=ar_SA.UTF-8
LC_TIME=ar_SA.UTF-8

You can configure a locale for your kiosk session in the session properties (e.g. in the web admin GUI) or (as a default) in the session descriptor. No need to hardcode this in the script.

DIR=`dirname $0`
DIR=/etc/opt/SUNWkio/sessions/moi

This directory should be available for you as $KIOSK_SESSION_DIR (assuming that your session descriptor is /etc/opt/SUNWkio/sessions/moi.conf)

export LC_MONETARY LC_NUMERIC LC_MESSAGES LC_COLLATE LANG LC_CTYPE LC_TIME
MAC=`ls -l $UTDEVROOT | sed 's/.*\.//'`
DEFAULTWINTSHOST=`awk '/^default/ {print $2}' $DIR/wints.map`
WINTSHOST=`awk '/^'$MAC'/ {print $2}' $DIR/wints.map`
WINUSER=`/opt/SUNWut/sbin/utdesktop -o | awk -F, '/'$MAC'/ {print $3}'`
if [ ! "$WINTSHOST" ]; then WINTSHOST=$DEFAULTWINTSHOST; fi
if [ ! "$WINUSER"  ]; then WINUSER=unknown; fi
OPTS="-D cursorshadow -D cursorsettings -D menuanimations -m -u $WINUSER"
lpstat -p $MAC >/dev/null 2>&1
if [ $? -eq 0 ]; then
 /opt/SUNWuttsc/bin/uttsc $OPTS -r printer:$MAC='hp deskjet 990c' $WINTSHOST
else
 /opt/SUNWuttsc/bin/uttsc $OPTS $WINTSHOST
fi

HTH

Best Regards

- Jörg

--
Joerg Barfurth
Software Engineer        mailto:[EMAIL PROTECTED]
Desktop Technology
Thin Client Software     http://www.sun.com/software/sunray/
Sun Microsystems GmbH    http://www.sun.com/software/javadesktopsystem/

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to