<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry id="stdin" xmlns="http://docbook.org/ns/docbook" version="5.0">
  <!--
      Header
  -->
  <refmeta>
    <refentrytitle>rdsinglestart</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class='source'>December 2022</refmiscinfo>
    <refmiscinfo class='manual'>Linux Audio Manual</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>rdsinglestart</refname>
    <refpurpose>
      Start an X11 client program so as to ensure that only a
      single instance is run
    </refpurpose>
  </refnamediv>
  <info>
    <author>
      <personname>
	<firstname>Fred</firstname>
	<surname>Gleason</surname>
	<email>fredg@paravelsystems.com</email>
      </personname>
      <contrib>Application Author</contrib>
    </author>
  </info>

  <!--
      Body
  -->
  <refsynopsisdiv id='synopsis'>
    <cmdsynopsis>
      <command>rdsinglestart</command>
      <arg choice='req'><replaceable>cmd-name</replaceable></arg>
      <arg choice='opt'><replaceable>cmd-opt1</replaceable></arg>
      <arg choice='opt'><replaceable>..</replaceable></arg>
      <sbr/>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id='description'><title>Description</title>
  <para>
    <command>rdsinglestart</command><manvolnum>1</manvolnum> is used to start
    an X11 client program so as to ensure that only a single instance is run.
    When invoked, <command>rdsinglestart</command><manvolnum>1</manvolnum>
    will first look for existing windows whose title begins with the
    string specified in <replaceable>cmd-name</replaceable> (case-insensitive).
    If found, such windows will be raised, following which
    <command>rdsinglestart</command><manvolnum>1</manvolnum> will exit.
    If no matching windows are found, 
    <command>rdsinglestart</command><manvolnum>1</manvolnum>
    will attempt to start <replaceable>cmd-name</replaceable>, using any
    added options specified, following which it will exit.
  </para>
  </refsect1>

  <refsect1 id='notes'><title>Notes</title>
  <para>
    <command>rdsinglestart</command><manvolnum>1</manvolnum> uses
    <command>wmctrl</command><manvolnum>1</manvolnum> to query and interact
    with the X11 windowing system. As such, it will work only with X11
    client programs. Attempts to use it with non-X11 programs will have
    undefined results.
  </para>
  </refsect1>
  
  <refsect1 id='see_also'><title>See Also</title>
  <para>
    <citerefentry>
      <refentrytitle>wmctrl</refentrytitle><manvolnum>1</manvolnum>
    </citerefentry>
  </para>
  </refsect1>
</refentry>

