LinuxCommandLibrary

smproxy

Run X11 clients through a session manager

SYNOPSIS

smproxy [options] [--] [command [arguments]]

PARAMETERS

-display display
    Specifies the X display to connect to. This is typically set by the environment variable DISPLAY and usually not needed.

-geometry geometry
    Sets the initial geometry for the proxy window. Note: The man page states this option is currently ignored.

-id SM_ID
    Specifies the X session management ID to use. This is primarily for internal use when the session manager is orchestrating the proxy.

-restore SM_FILE
    Specifies a file from which to restore the session. This is used when the session manager requests the proxy to restore its state.

-proxy
    Enables proxy mode. This is the default behavior and usually not explicitly needed.

-h, --help
    Prints a short help message and exits.

-V, --version
    Prints the version information and exits.

DESCRIPTION

The smproxy command acts as an intermediary for X applications that do not directly support the X Session Management Protocol (XSMP). In the X Window System, a session manager (like part of GNOME, KDE, or Xfce desktop environments) uses XSMP to save and restore the state of applications during session shutdowns or restarts.

Many older or simpler X applications were not designed with XSMP in mind. Without smproxy, these applications would not be able to participate in session management, leading to them being abruptly terminated during a session shutdown or not being reopened correctly on session restoration. smproxy registers itself with the session manager and then effectively 'wraps' the non-XSMP application, translating session management requests into actions the wrapped application understands (like sending a SIGHUP or SIGTERM for shutdown, or restarting the application with specific arguments for restoration). It ensures that even legacy applications can be gracefully managed within a modern X session.

CAVEATS

The -geometry option is documented to be ignored. smproxy is primarily useful for applications that predate or do not implement X Session Management Protocol (XSMP). Modern X applications are expected to handle XSMP directly, making smproxy less critical for newly developed software. Its role is often as a compatibility layer.

X SESSION MANAGEMENT PROTOCOL (XSMP)

XSMP is a protocol that allows applications to communicate with a session manager about their state. This includes requests to save their current state, restore a previous state, or prepare for shutdown. smproxy allows non-XSMP applications to indirectly participate in this protocol by acting on their behalf.

HISTORY

smproxy is a component of the X Session Management Library (libSM) and X Session Management Protocol (XSMP) tools, which were introduced to provide a standardized way for X applications to participate in session management (saving/restoring state, handling shutdowns). It emerged to bridge the gap for the large existing base of X applications that predated XSMP, allowing them to integrate into desktop environments that adopted the protocol. Its presence ensures backward compatibility and graceful handling of diverse X client types within a unified desktop session.

SEE ALSO

xsm(1), xsmp(7), xinit(1)

Copied to clipboard