b8ca77
From 33c56bac4d5592e845a824f3273de5af5eee0ae4 Mon Sep 17 00:00:00 2001
b8ca77
From: Debarshi Ray <debarshir@gnome.org>
b8ca77
Date: Wed, 17 Jun 2020 12:59:48 +0200
b8ca77
Subject: [PATCH] Add a manual
b8ca77
b8ca77
https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/277
b8ca77
---
b8ca77
 Makefile.am            |   2 +-
b8ca77
 configure.ac           |   9 +
b8ca77
 man/Makefile.am        |  18 ++
b8ca77
 man/gnome-terminal.xml | 385 +++++++++++++++++++++++++++++++++++++++++
b8ca77
 4 files changed, 413 insertions(+), 1 deletion(-)
b8ca77
 create mode 100644 man/Makefile.am
b8ca77
 create mode 100644 man/gnome-terminal.xml
b8ca77
b8ca77
diff --git a/Makefile.am b/Makefile.am
b8ca77
index 14b59bac43b9..52dd7265d715 100644
b8ca77
--- a/Makefile.am
b8ca77
+++ b/Makefile.am
b8ca77
@@ -1,4 +1,4 @@
b8ca77
-SUBDIRS = src po help
b8ca77
+SUBDIRS = man src po help
b8ca77
 
b8ca77
 NULL =
b8ca77
 
b8ca77
diff --git a/configure.ac b/configure.ac
b8ca77
index c5f40c07884a..00028858c654 100644
b8ca77
--- a/configure.ac
b8ca77
+++ b/configure.ac
b8ca77
@@ -192,6 +192,14 @@ if test -z "$DESKTOP_FILE_VALIDATE"; then
b8ca77
   fi
b8ca77
 fi
b8ca77
 
b8ca77
+AC_ARG_VAR([XSLTPROC],[the xsltproc programme])
b8ca77
+if test -z "$XSLTPROC"; then
b8ca77
+  AC_PATH_PROG([XSLTPROC],[xsltproc],[])
b8ca77
+  if test -z "$XSLTPROC"; then
b8ca77
+    AC_MSG_ERROR([xsltproc not found])
b8ca77
+  fi
b8ca77
+fi
b8ca77
+
b8ca77
 # ***************************
b8ca77
 # GNOME Shell search provider
b8ca77
 # ***************************
b8ca77
@@ -327,6 +335,7 @@ AC_DEFINE_UNQUOTED([GDK_VERSION_MAX_ALLOWED],[G_ENCODE_VERSION($(echo $GTK_MAX_A
b8ca77
 AC_CONFIG_FILES([
b8ca77
 Makefile
b8ca77
 org.gnome.Terminal.desktop.in
b8ca77
+man/Makefile
b8ca77
 src/Makefile
b8ca77
 src/terminal-version.h
b8ca77
 help/Makefile
b8ca77
diff --git a/man/Makefile.am b/man/Makefile.am
b8ca77
new file mode 100644
b8ca77
index 000000000000..ecce224d455d
b8ca77
--- /dev/null
b8ca77
+++ b/man/Makefile.am
b8ca77
@@ -0,0 +1,18 @@
b8ca77
+XSLTPROC_FLAGS = \
b8ca77
+        --nonet \
b8ca77
+        --stringparam man.output.quietly 1 \
b8ca77
+        --stringparam funcsynopsis.style ansi \
b8ca77
+        --stringparam man.authors.section.enabled 0 \
b8ca77
+        --stringparam man.copyright.section.enabled 0
b8ca77
+
b8ca77
+.xml.1:
b8ca77
+	$(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
b8ca77
+
b8ca77
+man_MANS = \
b8ca77
+	gnome-terminal.1
b8ca77
+
b8ca77
+xml_files = $(man_MANS:.1=.xml)
b8ca77
+
b8ca77
+EXTRA_DIST = $(xml_files)
b8ca77
+
b8ca77
+CLEANFILES = $(man_MANS)
b8ca77
diff --git a/man/gnome-terminal.xml b/man/gnome-terminal.xml
b8ca77
new file mode 100644
b8ca77
index 000000000000..abdac002c8ae
b8ca77
--- /dev/null
b8ca77
+++ b/man/gnome-terminal.xml
b8ca77
@@ -0,0 +1,385 @@
b8ca77
+
b8ca77
+
b8ca77
+  Copyright © 2020 Red Hat, Inc.
b8ca77
+
b8ca77
+  This program is free software; you can redistribute it and/or modify
b8ca77
+  it under the terms of either:
b8ca77
+
b8ca77
+  * the GNU General Public License as published by the Free
b8ca77
+    Software Foundation; either version 3 of the License, or (at your
b8ca77
+    option) any later version.
b8ca77
+
b8ca77
+  or
b8ca77
+
b8ca77
+  * the GNU Free Documentation License version 1.3 as published by the
b8ca77
+    Free Software Foundation; with no Invariant Sections, no Front-Cover
b8ca77
+    Texts, and no Back-Cover Texts.
b8ca77
+
b8ca77
+  or both in parallel, as here.
b8ca77
+
b8ca77
+  This program is distributed in the hope that it will be useful,
b8ca77
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
b8ca77
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b8ca77
+  GNU General Public License and the GNU Free Documentation License
b8ca77
+  for more details.
b8ca77
+
b8ca77
+  You should have received a copy of the GNU General Public License and
b8ca77
+  of the GNU Free Documentation License along with this program.
b8ca77
+  If not, see <https://www.gnu.org/licenses/>.
b8ca77
+-->
b8ca77
+<refentry id="gnome-terminal.1">
b8ca77
+  <refentryinfo>
b8ca77
+    <title>gnome-terminal</title>
b8ca77
+    <date>June 2020</date>
b8ca77
+    <productname>GNOME</productname>
b8ca77
+  </refentryinfo>
b8ca77
+
b8ca77
+  <refmeta>
b8ca77
+    <refentrytitle>gnome-terminal</refentrytitle>
b8ca77
+    <manvolnum>1</manvolnum>
b8ca77
+    <refmiscinfo class="manual">User Commands</refmiscinfo>
b8ca77
+  </refmeta>
b8ca77
+
b8ca77
+  <refnamediv>
b8ca77
+    <refname>gnome-terminal</refname>
b8ca77
+    <refpurpose>A terminal emulator for GNOME</refpurpose>
b8ca77
+  </refnamediv>
b8ca77
+
b8ca77
+  <refsynopsisdiv>
b8ca77
+    <cmdsynopsis>
b8ca77
+      <command>gnome-terminal</command>
b8ca77
+    </cmdsynopsis>
b8ca77
+  </refsynopsisdiv>
b8ca77
+
b8ca77
+
b8ca77
+  <refsect1>
b8ca77
+    <title>DESCRIPTION</title>
b8ca77
+    <para>
b8ca77
+      <command>gnome-terminal</command> is a terminal emulator application for
b8ca77
+      accessing a UNIX shell environment which can be used to run programs
b8ca77
+      available on your system. It supports several profiles, multiple tabs and
b8ca77
+      implements several keyboard shortcuts.
b8ca77
+    </para>
b8ca77
+  </refsect1>
b8ca77
+
b8ca77
+  <refsect1>
b8ca77
+    <title>OPTIONS</title>
b8ca77
+    <variablelist>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--help, -h</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Show a brief overview of all the options.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--help-all</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Show all the options in detail.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--help-gtk</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Show all the GTK options.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--help-terminal</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Show all the options to select between new terminal tabs or
b8ca77
+            windows.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--help-terminal-options</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Show all the options to change the attributes of terminals
b8ca77
+            regardless of whether they are in separate tabs or windows.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--help-window-options</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Show all the options to change the attributes of windows
b8ca77
+            containing terminals.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--load-config=FILE</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Restore the application to a previously saved state by loading it
b8ca77
+            from a configuration file.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--preferences</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Show the preferences window.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--print-environment, -p</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Print the environment variables to interact with newly created
b8ca77
+            terminals.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--quiet, -q</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Suppress diagnostics.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--verbose, -v</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Increase diagnostic verbosity.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--tab</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Open a new tab containing a terminal in the last-opened window with
b8ca77
+            the default profile.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--window</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Open a new window with a tab containing a terminal with the default
b8ca77
+            profile.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--command, -e=COMMAND</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Execute the argument to this option inside the terminal.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--fd=FD</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Forward file descriptor.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--profile=PROFILE-NAME</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Use the given profile instead of the default profile.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--title, -t=TITLE</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Set the initial terminal title.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--wait</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Wait until the terminal's child exits.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--working-directory=DIRNAME</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Set the terminal's working directory.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--zoom=ZOOM</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Set the terminal's zoom factor. 1.0 is normal size.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--active</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Set the last specified tab as the active one in its window.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--full-screen</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Full-screen the window.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--geometry=GEOMETRY</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Set the window size as COLSxROWS+X+Y. For example, 80x24 or
b8ca77
+            80x24+200+200.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--hide-menubar</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Turn off the menubar for the window.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--show-menubar</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Turn on the menubar for the window.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--maximize</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Maximize the window.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--role=ROLE</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Set the X window role.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--class=CLASS</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Program class as used by the window manager.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--display=DISPLAY</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            X display to use.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--g-fatal-warnings</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Make all warnings fatal.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--gdk-debug=FLAGS</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            GDK debugging flags to set.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--gdk-no-debug=FLAGS</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            GDK debugging flags to unset.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--gtk-debug=FLAGS</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            GTK debugging flags to set.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--gtk-no-debug=FLAGS</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            GTK debugging flags to unset.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--gtk-module=MODULES</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Load additional GTK modules.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+      <varlistentry>
b8ca77
+        <term><option>--name=NAME</option></term>
b8ca77
+        <listitem>
b8ca77
+          <para>
b8ca77
+            Program name as used by the window manager.
b8ca77
+          </para>
b8ca77
+        </listitem>
b8ca77
+      </varlistentry>
b8ca77
+    </variablelist>
b8ca77
+  </refsect1>
b8ca77
+
b8ca77
+  <refsect1>
b8ca77
+    <title>BUGS</title>
b8ca77
+    <para>
b8ca77
+      Please read
b8ca77
+      <ulink url="https://wiki.gnome.org/Apps/Terminal/ReportingBugs"></ulink>
b8ca77
+      on how to report bugs.
b8ca77
+    </para>
b8ca77
+  </refsect1>
b8ca77
+
b8ca77
+  <refsect1>
b8ca77
+    <title>SEE ALSO</title>
b8ca77
+    <para>
b8ca77
+      For further information, visit the website
b8ca77
+      <ulink url="https://wiki.gnome.org/Apps/Terminal"></ulink>. There's a
b8ca77
+      list of frequently asked questions at
b8ca77
+      <ulink url="https://wiki.gnome.org/Apps/Terminal/FAQ"></ulink>.
b8ca77
+    </para>
b8ca77
+  </refsect1>
b8ca77
+</refentry>
b8ca77
-- 
b8ca77
2.25.4
b8ca77