I'm attempting to get the "tab window manager" under SMF control.  I already 
have Xvfb running (Xsun) successfully:

$ svcs | grep -i xvf
online         Sep_08   svc:/application/x11/x11-server:Xvfb

and want to make my twm service depend on Xvfb.  I have created a manifest and 
imported it:

denoad2:stsmcwd $ cat twm.xml 
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
        Service to start twm (Tab Window Manager) for Oracle Reporting
        to work correctly.
-->

<service_bundle type='manifest' name='SUNWxwopt:twm'>

<service
        name='application/x11/twm'
        type='service'
        version='1'>

        <create_default_instance enabled='false' />

        <!-- Xvfb (via x11-server) must be started before twm -->
        <dependency
                name='x11-server'
                grouping='require_all'
                restart_on='restart'
                type='service'>
                <service_fmri value='svc:/application/x11/x11-server:Xvfb' />
        </dependency>

        <exec_method
                type='method'
                name='start'
                exec='/usr/openwin/bin/twm -display :0 -v'
                timeout_seconds='60' />

        <exec_method
                type='method'
                name='stop'
                exec=':kill'
                timeout_seconds='60' />

        <stability value='Unstable' />

        <template>
                <common_name>
                        <loctext xml:lang='C'> tab window manager
                        </loctext>
                </common_name>
        </template>
</service>

</service_bundle>

When I enable this SMF service the process apparently starts just fine:

$ sudo svcadm enable twm
$ ps -ef | grep twm
 stsmcwd  3355  2972   0 14:54:10 pts/8       0:00 grep twm
    root  3347     7   0 14:53:54 ?           0:00 /usr/openwin/bin/twm 
-display :0 -v

But shortly after the process gets knocked off and the service goes into 
maintenance mode:

$ svcs twm
STATE          STIME    FMRI
maintenance    14:54:54 svc:/application/x11/twm:default

>From the log file for the service:

[ Sep 13 14:53:53 Enabled. ]
[ Sep 13 14:53:53 Executing start method ("/usr/openwin/bin/twm -display :0 
-v") ]
[ Sep 13 14:54:54 Method or service exit timed out.  Killing contract 142 ]
[ Sep 13 14:54:54 Method "start" failed due to signal KILL ]

This is probably a simple issue, but I'm hoping that someone here will have the 
easy answer.

TIA,

-Mike-
 
 
This message posted from opensolaris.org

Reply via email to