Help on X Window service

Hi,

Need some help on the below issue or providing a pointer also would help

We have an application which will run as a service in Solaris (Sun4v) SPARC (The application will be displaying the popup messages).

For the service we are setting the display. As soon as the service starts we will get the popup messages.

But if we reboot the machine, the service for the application is online before the X Server comes up (May not be able to find the X Window Server), and the popup is not coming once the user log's into the machine.

Tried to set the Dependency with the X11-Server, but the Service is always in maintenance mode.

We are getting the following exception:

Could not initialize class sun.awt.X11GraphicsEnvironment

Is there any X Window service, we can set the dependency (or) is there any API in java to check whether the Graphics display is up (or) not?

Thanks,
Narendra

how is the service for your programm startet?

Hi,
Thanks for the reply.

1) Set the soft link using "ln -sf" for the XML file
2)"svccfg import" of the service
3)"svcadm enable" to enable the service

Thanks,

so what are the dependend services for your service? they can be listed with "svcs -d/-D fmri".
you should find X11 in the output of "svcs -d fmri" for your service.

Hi,
Below are the dependencies we have for the service in the XML

<dependency name="network" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/milestone/network:default" />
</dependency>

	&lt;dependency name="root" grouping="require_all" restart_on="none" type="service"&gt;
		&lt;service_fmri value="svc:/system/filesystem/root:default" /&gt;
	&lt;/dependency&gt;

	&lt;dependency name="autofs" grouping="require_all" restart_on="none" type="service"&gt;
		&lt;service_fmri value="svc:/system/filesystem/autofs:default" /&gt;
	&lt;/dependency&gt;

Tried to set the dependency with the x11-server, but the service is always in maintenance mode. If i tried to enable/clear the x11-server service,again it is going to maintenance mode.
Is there any service we can depend on?

Thanks,
Narendra

in your config file there are double quotes (") for the other services and single quotes (') for xserver... maybe this is a fault in your file?

Hi ,
Sorry for the confusion, below is the xml file dependencies

<dependency name="network" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/milestone/network:default" />
</dependency>

<dependency name="root" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/system/filesystem/root:default" />
</dependency>

<dependency name="autofs" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/system/filesystem/autofs:default" />
</dependency>

As i said earlier, tried to set the x11-server dependency, which is always in maintenence mode.

To make things clear is the x11 service in maintenance mode or is it so that adding it as dependency makes your service go into maintenance mode?

Anyways, are you really using the pop-ups? If so this is actually an app that should be started as a part of the real Xserver startup. Usually you only startup "xdm" as a service and not a real Xserver since that is something that normally requires user interaction..

If you just want a dump for the pop-ups which you are never using then a memory based Xserver (forgot the name of it but think of it as Xnest but only in memory) can be used. You would then start that one in the startup script of your own app and use it to simply dump device for your pop-ups..

Cheers Dyna

Hi,
x11 service is in maintenance mode. I tried to set the dependency with the x11 service, then my service is also not starting.

We have to display the popup's, else the application will not be useful.
Can you please let me know the real XServer service, if we have any?

Thanks,
Narendra