How to start the Xvfb(1) X server on a headless system via SMF fo T2000?



Hi all,

The following procedure is running on SFV240. However, we are not able to run
on T2000. It complains of the following error.

Do you know is it supported on T2000 or not? And do you know any way to run
in T2000 platform?



Regards,



[ Nov 15 12:32:29 Enabled. ]

[ Nov 15 12:32:29 Executing start method ("/lib/svc/method/x11-server -d 0 -c
Xvfb start") ]

[ Nov 15 12:32:29 Method "start" exited with status 0 ]

/dev/fb: No such file or directory

/dev/fb: No such file or directory

Graphics Adapter device /dev/fb is of unknown type



Fatal server error:

InitOutput: Error loading module for /dev/fb



[ Nov 15 12:32:30 Stopping because all processes in service exited. ]

[ Nov 15 12:32:30 Executing stop method (:kill) ]

[ Nov 15 12:32:30 Executing start method ("/lib/svc/method/x11-server -d 0 -c
Xvfb start") ]

[ Nov 15 12:32:30 Method "start" exited with status 0 ]

/dev/fb: No such file or directory

/dev/fb: No such file or directory

Graphics Adapter device /dev/fb is of unknown type



Fatal server error:

InitOutput: Error loading module for /dev/fb



[ Nov 15 12:32:30 Stopping because all processes in service exited. ]

[ Nov 15 12:32:30 Executing stop method (:kill) ]

[ Nov 15 12:32:30 Executing start method ("/lib/svc/method/x11-server -d 0 -c
Xvfb start") ]

[ Nov 15 12:32:30 Method "start" exited with status 0 ]

/dev/fb: No such file or directory

/dev/fb: No such file or directory

Graphics Adapter device /dev/fb is of unknown type

Keyword(s):SMF, svccfg, x11-server.xml, Xserver, Xsun, Xvfb

Description:



On headless systems, The Xsun(1) X server does not run by default because it
cannot find any graphics devices. In such cases, the Xvfb(1) X server can be
run instead. Selecting which X server to run entails modifying options for
Xserver(1).

This article explains how to enable a service running the Xvfb(1) X server via
SMF on a headless system so that Xvfb(1) is always started upon reboot.

Document Body:



Usually, Xsun(1) is launched by dtlogin(1X). As there are no graphics devices
on headless systems, dtlogin(1X) cannot launch Xsun(1) by default.

However, by enabling the "svc:/application/x11/x11-server" service or its
instance via SMF and setting it to run Xvfb(1) instead, a X server can be
started for every system reboot.

Below are two example procedures that enable an instance of the
"svc:/application/x11/x11-server" service. You can choose either procedures.

- Non-Interactive Setup -

1. Create an instance for the "svc:/application/x11/x11-server" service.



# svccfg -s svc:/application/x11/x11-server add Xvfb



2. Add property group for "options".



# svccfg -s svc:/application/x11/x11-server:Xvfb addpg options
application



3. Set the "options/server" property to run Xvfb(1).



# svccfg -s svc:/application/x11/x11-server:Xvfb setprop
options/server=astring: "/usr/openwin/bin/Xvfb"



4. Set the "options/server_args" property to control access restrictions.
This is optional.



If you would like to disable access control restrictions (i.e. "xhost +"),
you can specify the "-ac" option.



# svccfg -s svc:/application/x11/x11-server:Xvfb setprop
options/server_args=astring: "-ac"



If you would like to enable access control restrictions (i.e. "xhost
+<host_or_user_name>"), you do not need to specify any options. Clients (i.e.
host or user) can run "xhost +<host_or_user_name>" to modify access control
restrictions. Please refer to InfoDoc# 77005 for more details on how to use
remote Xvfb(1) server.



5. Enable the "svc:/application/x11/x11-server:Xvfb" instance.



# svcadm enable svc:/application/x11/x11-server:Xvfb



- Interactive Setup -

1. Perform all above procedure in one go.

# svccfg

svc:> select svc:/application/x11/x11-server

svc:/application/x11/x11-server> add Xvfb

svc:/application/x11/x11-server> select Xvfb

svc:/application/x11/x11-server:Xvfb> addpg options application

svc:/application/x11/x11-server:Xvfb> setprop
options/server=astring:"/usr/openwin/bin/Xvfb"

svc:/application/x11/x11-server:Xvfb> setprop
options/server_args=astring:"-ac"

svc:/application/x11/x11-server:Xvfb> quit

# svcadm enable svc:/application/x11/x11-server:Xvfb



After a system reboot, you should see that Xvfb(1) is running as follows (i.e.
Xsun(1) is running with the "-dev vfb" option).

# svcs -a | grep x11-server

online 9:12:16 svc:/application/x11/x11-server:Xvfb

# ps -ef | grep Xsun

root 630 1 0 09:12:16 ? 0:01 /usr/openwin/bin/Xsun :0
+nkeyboard +nmouse -dev vfb :0

#



If you would like to make Xsun run on another DISPLAY, you can modify
start/type and start/exec properties for Xvfb instance to specify
DISPLAY.

For example, if you would like to make Xsun run on :1, please specify "-d 1"
option to /lib/svc/method/x11-server method.

The following procedure shows the way to run Xvfb(1) on DISPLAY=:1 via SMF.

# svccfg -s svc:/application/x11/x11-server

svc:/application/x11/x11-server> add Xvfb_DISPLAY_1

svc:/application/x11/x11-server> select Xvfb_DISPLAY_1

svc:/application/x11/x11-server:Xvfb_DISPLAY_1> addpg options application

svc:/application/x11/x11-server:Xvfb_DISPLAY_1> setprop
options/server=astring:"/usr/openwin/bin/Xvfb"

svc:/application/x11/x11-server:Xvfb_DISPLAY_1> setprop
options/server_args=astring:"-ac"

svc:/application/x11/x11-server:Xvfb_DISPLAY_1> addpg start method

svc:/application/x11/x11-server:Xvfb_DISPLAY_1> setprop
start/type=astring:"method"

svc:/application/x11/x11-server:Xvfb_DISPLAY_1> setprop
start/exec=astring:"/lib/svc/method/x11-server\ -d\ 1\ -c\ %i\ %m"

svc:/application/x11/x11-server:Xvfb_DISPLAY_1> quit

#



# svcadm enable svc:/application/x11/x11-server:Xvfb_DISPLAY_1



# svcs -p svc:/application/x11/x11-server:Xvfb_DISPLAY_1

STATE STIME FMRI

online 12:48:07 svc:/application/x11/x11-server:Xvfb_DISPLAY_1

12:48:07 2204 Xsun

# ps -ef | grep 2204

root 2204 1 0 12:48:07 ? 0:01 /usr/openwin/bin/Xsun :0
+nkeyboard +nmouse -dev vfb -ac :1

#
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Relevant Pages

  • Re: pseudo-display fuer batch-modus
    ... Ich schätze, Du suchst xvfb. ... Xvfb provides an X server that can run on machines with no display ... was intended to be server testing, but other novel uses for it have ... Next by Date: ...
    (de.comp.os.unix.x11)
  • SUMMARY: A quick question about X.
    ... All of whom suggested I use either Xvfb or Xvnc. ... Also thanks to Charles for pointing out the the ridiculous requirement comes ... Still Oracle did choose the Java path. ... Due to some ridiculous requirement of Oracle we need to have an x server ...
    (Tru64-UNIX-Managers)
  • Re: pseudo-display fuer batch-modus
    ... welches display noch frei ist. ... Xvfb ohne Argument geht nicht: ... Fatal server error: ... Next by Date: ...
    (de.comp.os.unix.x11)
  • Re: Launch App without X-Windows
    ... What I want to do is be able to launch applications without actually ... X windows has certain requirements. ... X server is by using the x virtual frame buffer server. ... Package: xvfb ...
    (Debian-User)
  • RE: Launch App without X-Windows
    ... Subject: Launch App without X-Windows ... X windows has certain requirements. ... X server is by using the x virtual frame buffer server. ... Package: xvfb ...
    (Debian-User)