SystemServer(5) - SerenityOS man pages

Name

SystemServer - services configuration

Synopsis

/etc/SystemServer.ini

Description

SystemServer configuration consists of a list of services for it to spawn.

Each service is configured as a section in the configuration file, where the section name is the service name and the keys inside the section are the options describing how to launch and manage this service.

Options

Note that:

Environment

Socket takeover mechanism

When SystemServer runs a service which has Socket defined, it will create the sockets and then pass an environment variable named SOCKET_TAKEOVER to the launched service. This environment variable is structured as follows:

SOCKET_TAKEOVER=/tmp/socket1:3 /tmp/socket2:4

Items in the variable are separated by spaces, and each item has two components separated by a colon. The first part is the path of the socket requested, and the second part is the file descriptor number that was passed to the newly created service. The service can then parse this information and obtain file descriptors for each socket.

Examples

# Spawn the terminal as user anon once on startup.
[Terminal]
User=anon

# Set up a socket at /tmp/portal/lookup; once a connection attempt
# is made spawn the LookupServer as user anon with a low priority.
# If it exits or crashes, repeat.
[LookupServer]
Socket=/tmp/portal/lookup
Lazy=1
Priority=low
KeepAlive=1
User=anon

# Launch the Shell on /dev/tty0 on startup when booting in text mode.
[Shell@tty0]
Executable=/bin/Shell
StdIO=/dev/tty0
Environment=TERM=xterm
KeepAlive=1
SystemModes=text

# Launch WindowManager with two sockets: one for main windowing operations, and
# one for window management operations. Both sockets get file permissions as 660.
[WindowServer]
Socket=/tmp/portal/window,/tmp/portal/wm
SocketPermissions=660
Priority=high
KeepAlive=1
User=window

See also