Hello All,
I have a difficult problem and I'm hoping that someone out there can help.
In summary we have a piece of software that is graphical (requires X) and
needs to start at system boot. The suggestion we received was to have it
start in a persistent VNC session which in general works very well. I
created a service and if I start\stop while logged in everything is great
the software starts and is persistent. However when the service starts at
system boot the VNC session is there but the shell script referred to in
the service does not execute and all I have is a grey screen. It looks like
the xstartup file might not be read. However why it works after the system
boots but not during boot is a mystery to me. I am including a copy of the
service and Xstartup file in this message. Any help that you gurus can
provide would be GREATLY appreciated.
System is OpenSUSE 10.2
Code:
# !/bin/sh
#
# Author: Ryan Terp, 2007
#
#
### BEGIN INIT INFO
# Provides: batchmanager
# Required-Start: $local_fs $remote_fs xdm xinetd
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: 5
# Default-Stop: 0 1 2 6
# Short-Description: OpenMFG Batch Manager
# Description: OpenMFG Batch Manager
### END INIT INFO
# Load the rc.status script for this service.
.. /etc/rc.status
# Reset status of this service
rc_reset
case "$1" in
'start')
echo -n "Starting OpenMFG Batch Manager"
/bin/su - openmfg -l -c "/usr/bin/vncserver :5 -depth 16 -geometry
800x600" 2>nul
rc_status -v
;;
'stop')
echo -n "Shutting down OpenMFG Batch Manager"
/bin/su - openmfg -l -c "/usr/bin/vncserver -kill :5" 2>nul
rc_status -v
;;
*)
echo "Usage: /etc/init.d/rc.vnc { start | stop }"
;;
esac
rc_exit
Code:
!/bin/sh
echo BatchManager Start at $(date) >> /var/log/batchmanager.log
xrdb $HOME/.Xresources
xsetroot -solid grey
# xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
~/batchmanager/BatchManager -geometry 300x320+10+10
-databaseURL=psql://192.168.1.1/demodb:5432 -username=
-passwd=
echo BatchManager end at $(date) >> /var/log/batchmanager.log