Troubleshooting

Here are some common problems you might encounter while customizing your environment:

A script I put in /etc/profile.d doesn't run.
Check the following:
  • Make sure that the script's name has .ksh or .sh as its extension.
  • Make sure the executable bit is set on the script.
  • Make sure that the script begins with the line:
    #! /bin/sh
      
How do I set the time so it's right in QNX Neutrino and Microsoft Windows?
If you have Windows in one partition and QNX Neutrino in another on your machine, you might notice that setting the clock on one OS changes it on the other.

Under QNX Neutrino, you usually set the hardware clock to use UTC (Coordinated Universal Time) and then set the time zone. Under Windows, you set the hardware clock to use local time.

To set the time so that it's correct in both operating systems, set the hardware clock to use local time under QNX Neutrino.

How can I properly check if .kshrc is being run as a script rather than as a terminal session?
If the i option is set, then .kshrc is running in interactive mode. Here's some code that checks to see if this option is set:
case $- in
*i*)

     set -o emacs

     export EDITOR=vi
     export VISUAL=vi
     export PS1='`hostname -s`:`/bin/pwd` >'

     bind ^[[z=list
     bind ^I=complete

     ...
esac
  

The $- parameter is a concatenation of all the single-letter options that are set for the script. For more information, see Parameters in the entry for ksh in the Utilities Reference.