- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Automating X server (mwm) on system bootup
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2005 10:15 AM
07-14-2005 10:15 AM
Automating X server (mwm) on system bootup
Attached is the script used for startup.
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2005 05:23 PM
07-14-2005 05:23 PM
Re: Automating X server (mwm) on system bootup
I've got a simple script to start xvfb and mwm during start-up:
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
rval=2
case $1 in
start_msg) echo "Starting xvfb" ;;
stop_msg) echo "Shutting down xvfb" ;;
start)
nohup /usr/bin/X11/Xvfb :45 -screen 0 1024x768x8 -pn -fp /usr/lib/X11/fonts/misc
-sp /etc/X11/SecurityPolicy &
nohup /usr/bin/X11/mwm -display $HOSTA:45.0 & ;;
stop)
rval=$? ;;
*) echo "usage: $0 {start|stop|start_msg|stop_msg}"
rval=1 ;;
esac
exit $rval
Regards,
Ira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2005 09:57 AM
07-15-2005 09:57 AM
Re: Automating X server (mwm) on system bootup
It did not help me to keep mwm process running always.
Whats happening is the script starts xvfb and mwm while the system is coming up.
But mwm process dies once system is completely come up.
Please anybody guide me to prepare a script or providing some other way to start xvfb and mwm in the system startup.
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2005 10:28 AM
07-15-2005 10:28 AM
Re: Automating X server (mwm) on system bootup
Here is what we use out here:
Create a script in /sbin/init.d/startxvfb.ksh
link the /sbin/rc3.d/S93startxvfb to this
Hope it helps
thanks
DP
#!/bin/ksh
# startxvfb.ksh -- restart Xvfb and twm
#
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/shlib/X11
integer Xvfb_pid
let Xvfb_pid=0
integer twm_pid
let twm_pid=0
if [[ "$1" = stop ]]
then
# Find the PID of Xvfb
Xvfb_pid=`ps -ef | grep Xvfb | grep -v grep | awk '{ print $2 }'`
if [ $Xvfb_pid -gt 0 ]
then
kill -9 $Xvfb_pid
fi
# Find the PID of twm
twm_pid=`ps -ef | grep twm | grep -v grep | awk '{ print $2 }'`
# If twm is running, stop it.
if [ $twm_pid -gt 0 ]
then
kill -9 $twm_pid
fi
else
# Restart Xvfb and twm
# Find the PID of Xvfb
Xvfb_pid=`ps -ef | grep Xvfb | grep -v grep | awk '{ print $2 }'`
# If Xvfb is running, stop it.
if [ $Xvfb_pid -gt 0 ]
then
kill -9 $Xvfb_pid
fi
# Start Xvfb then wait ten seconds.
/usr/bin/X11/Xvfb :9 &
/sbin/sleep 5
# Find the PID of twm
twm_pid=`ps -ef | grep twm | grep -v grep | awk '{ print $2 }'`
# If twm is running, stop it.
if [ $twm_pid -gt 0 ]
then
kill -9 $twm_pid
fi
# Start twm
/usr/bin/X11/twm -display :9 &
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2005 10:39 AM
07-15-2005 10:39 AM
Re: Automating X server (mwm) on system bootup
My xvfb rc script works fine if we run manually. But same script is not working in the system startup.
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2005 02:23 AM
07-16-2005 02:23 AM
Re: Automating X server (mwm) on system bootup
I suspect there might be some other script that runs later in the sequence that might be affecting.
try to change the sequence so that this one runs at the last.
DP