getEmu - Release Notes


Copyright 2026 by The Software Samurai.
On the web: http://www.SoftwareSam.us/
Software released under GNU GPL3, and documentation released under FDL1.3
This document describes version 0.0.01 of getEmu.


Description

The getEmu (‘getemu’) utility is a GNU/Linux console application which scans the system's process tree and reports the name of the terminal emulator program from which the application was launched.
The scan is performed by moving sequentially upward through the process tree. This tree consists of a group of files in the system “/proc” directory associated with each active process in the system.


This application was designed under Fedora Linux and is built using the GNU C compiler, version 15.2.1 or higher (C++17 support required). If you are not using GCC, then verify that your compiler fully supports the C++17 standard.


Building From Source



Operational Overview

getEmu is a very basic demonstration utility, bypassing user-friendliness in favor of simplicity.
There are only four functions: main(), getEmulator(), reportShellname() and helpMe().
The getEmulator() function can easily be integrated into nearly any application that requires information about the parent terminal program, or alternatively, the getEmu utility could be called from the external application with the output captured to a temporary file.

Note that getEmu creates a tempory file in the current working directory (CWD). In a fully functional application this file would be created in the system's /tmp directory and would be managed by the application's temp-file manager. For an example of temporary-file management, see the TFMan class (TFMan.hpp) in the author's AnsiCmd package.
AnsiCmd Class Link Library

See the next section for a list of getEmu command-line options.

This application relies heavily on our gString text-analysis tool which parses the source data, performs text comparisons as well as formatting text for output to the display.
Use of the gString class encapsulates or bypasses all of the dangerous C-language string manipulation functions. While C-language functions such as ‘wcsncasecmp’, ‘wcpncpy’, ‘wcwidth’, ‘mbsrtowcs’ ‘wcsrtombs’ and others are undeniably more efficient than the poorly-designed C++ ‘std::string’ etc.; they often lead to buffer overruns, memory leaks and other dangerous relics of a previous century. Using the gString class leverages the speed of these functions while minimizing the danger.
For a full discussion of the gString class, please see the documentation for the author's NcDialog API package,
NcDialog API or the stand-alone gString text-analysis-and-formatting package. gString Documentation


Command-line Options

Invocation: Usage: getemu [OPTIONAL ARGS] --shell : include name of shell program in report --verbose : include shell program and additional info --version : display application version and copyright --help : display application help