Initial Windows agent repository

This commit is contained in:
Frank Harris 2026-06-08 10:45:20 -05:00
commit a0db0c2e5b
10589 changed files with 3844063 additions and 0 deletions

View file

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/philosophy/why-not-lgpl.html>.

View file

@ -0,0 +1,671 @@
Version 5.0.1 (12/05/25):
* Fixes:
- CVE-2025-46805: do NOT send signals with root privileges
- CVE-2025-46804: avoid file existence test information leaks
- CVE-2025-46803: apply safe PTY default mode of 0620
- CVE-2025-46802: prevent temporary 0666 mode on PTYs in attacher
- CVE-2025-23395: reintroduce lf_secreopen() for logfile
- buffer overflow due bad strncpy()
- uninitialized variables warnings
- typos
- combining char handling that could lead to a segfault
Version 5.0.0 (28/08/24):
* Rewritten authentication mechanism
* Add escape %T to show current tty for window
* Add escape %O to show number of currently open windows
* Use wcwdith() instead of UTF-8 hard-coded tables
* New commands:
- auth [on|off]
Provides password protection
- status [top|up|down|bottom] [left|right]
The status window by default is in bottom-left corner.
This command can move status messages to any corner of the screen.
- truecolor [on|off]
- multiinput
Input to multiple windows at the same time
* Removed commands:
- time
- debug
- password
- maxwin
- nethack
* Fixes:
- Screen buffers ESC keypresses indefinitely
- Crashes after passing through a zmodem transfer
- Fix double -U issue
Version 4.9.1 (20/08/2023):
* Support stop/parity bits on serial port (#23952)
* Add needed system headers in checks and return values
for implicit function declarations
* Fixes:
- Avoid zombies after shell exit (#25089)
- Missed signal sending permission check on failed query
messages (CVE-2023-24626)
- manpage fixes
- source code fixes during cleanup
- UTF-8 encoding can emit invalid UTF-8 sequences for out of
range unicode values (#62097)
Version 4.9.0 (30/01/2022):
* Hardstatus option for used encoding (escape string '%e')
* OpenBSD uses native openpty() from its utils.h
* Fixes:
- fix combining char handling that could lead to a segfault
- CVE-2021-26937: possible denial of service via a crafted
UTF-8 character sequence (bug #60030)
- make screen exit code be 0 when checking --help
- session names limit is 80 symbols (bug #61534)
- option -X ignores specified user in multiuser env (bug #37437)
- a lot of reformations/fixes/cleanups (man page and source code)
Version 4.8.0 (05/02/2020):
* Improve startup time by only polling for files to close
* Fixes:
- Fix for segfault if termcap doesn't have Km entry
- Make screen exit code be 0 when checking --version
- Fix potential memory corruption when using OSC 49
Version 4.7.0 (02/10/2019):
* Add support for SGR (1006) mouse mode
* Add support for OSC 11
* Update Unicode ambiguous and wide tables to 12.1.0
* Fixes:
- cross-compilation support (bug #43223)
- a lot of manpage fixes and cleanups
Version 4.6.2 (23/10/2017):
* Fixes:
- revert changes to cursor position restore behavour (bug #51832)
- set freed pointer to NULL (bug #52133)
- documentation fixes
- fix windowlist crashes (bug #43054 & #51500)
Version 4.6.1 (10/07/2017):
* Fixes:
- problems with starting session in some cases
- parallel make install
- segfault when querying info on nonUTF locale (bug #51402)
Version 4.6.0 (28/06/2017):
* Update Unicode wide tables to 9.0 (bug #50044)
* Support more serial speeds
* Improved namespaces support
* Migrate from fifos to sockets
* Start viewing scrollback at first line of output (bug #49377)
Version 4.5.1 (25/02/2017):
* Fixes:
- logfile permissions problem (CVE-2017-5618)
- SunOS build problem (bug #50089)
- FreeBSD core dumps (bug #50143)
Version 4.5.0 (10/12/2016):
* Allow specifying logfile's name via command line parameter '-L'
* Fixes:
- broken handling of "bind u digraph U+" (bug #48691)
- crash with long $TERM (bug #48983)
- crash when bumping blank window
- build for AIX (bug #49149)
- %x improperly separating arguments
- install with custom DESTDIR (bug #48370)
Version 4.4.0 (19/06/2016):
* Support up to 24 function keys
* Fix runtime issues
* 'logfile' command, starts logging into new file upon changing
Version 4.3.1 (28/06/2015):
* Fix resize bug
Version 4.3.0 (13/06/2015):
* Introduce Xx string escape showing the executed command of a window
* Implement dead/zombie window polling, allowing for auto reconnecting
* Allow setting hardstatus on first line
* New Commands:
- 'sort' command sorting windows by title
- 'bumpleft', 'bumpright' - manually move windows on window list
- 'collapse' removing numbering 'gaps' between windows, by renumbering
- 'windows' command now accepts arguments for use with querying
Version 4.2.1 (28/04/2014):
* allow for terminal with long $TERM (up to 32 characters)
* allow to use long logins
* documentation fixes
* runtime fixes
Version 4.2.0 (17/04/2014):
New Commands:
* 'unbindall' to unbind all commands
* 'up', 'down', 'left', 'right' sub-commands for 'focus'
* 'rendition' to specify rendition to use in caption/hardstatus for
window-names that have bell/monitor/silence/so turned on.
* 'layout', with the following sub-commands
- 'title'
- 'number'
- 'autosave' ('autosave on' or 'autosave off')
- 'new'
- 'save' ('save <name>')
- 'select'
- 'next'
- 'prev'
- 'attach'
- 'show'
- 'remove'
- 'dump'
* 'group' for moving window(s) into a group.
* 'defmousetrack' and 'mousetrack', to turn on/off mouse-tracking for
displays. It's turned off by default. With mouse-tracking turned on, it's
possible to switch to a region ('focus') using mouse clicks. It's also
possible to select a text region in copy-mode using a mouse click to place
a mark and the scroll wheel to scroll through the buffer. Additional
features might be to allow clicking on window-titles in the caption to
switch to that window.
* All commands prefixed '@' are treated as 'quiet', i.e. '@'-prefixed commands
do not trigger any display messages.
Changed Commands:
* '-v' parameter to 'split' command for vertical splits.
* 'sorendition' deprecated in favour of 'rendition so'.
* 'digraph' can take a second parameter to specify custom digraphs. For
example,
'digraph >= ≥' or 'digraph >= U+2265'
Using '0' as the second parameter will remove the digraph.
* 'stuff' will prompt for input if there's nothing to stuff.
* The argument to ":number"
can be prefixed with '+' or '-' to use it as a relative argument.
* '-g' parameter to 'windowlist' to show nested list of windows.
* '//group' parameter to 'screen' to create a grouped window.
* 'blankerprg' shows the currently set command on no argument.
* 'maxwin' can now be used to increase the number of maximum windows.
.screenrc:
* $PID expands to the PID of the screen session.
* $PWD expands to the current working directory of the session.
* $STY expands to the session name.
* Tilde-expansion in pathnames (e.g. for the 'source' command)
* C-style escapes can be used (e.g. "\n" to get a newline with 'stuff')
* '%p' in caption/hardstatus string expands to the PID of the backend, and
'%+p' expands to the PID of the frontend (display).
* '%S' in caption/hardstatus string expands to the session name.
* '%P' in the caption string evaluates to true if the region is in copy mode.
* '%E' in the caption string evaluates to true if the escape character has
currently been pressed.
Window List:
* Nested views when there are window groups (with 'windowlist -g').
* Press 'm' to toggle the most-recent view.
* Press 'g' to toggle nestedness.
* Press 'a' to view all windows in the list.
* Press '/' to search in the list.
* Press ',' and '.' to re-order windows in the list.
* Press 'K' to kill a window (requires confirmation).
Display List:
* Press 'd' to detach a display, 'D' to power-detach.
Others:
* Start using 'ChangeLog' for logging changes again.
* Terminfo update for 256-color support.
* Multiple input history (partially from Romain Francoise).
* vi-like fFtT;, searching in copy mode.
* In copy mode, search in reverse direction when 'N' is pressed.
* Tab-completion for command input.
* Some more readline-like bindings in input mode (e.g. ^W, ^D, ^P, ^N etc.)
* Fix displaying unicode characters in the caption/hardstatus on UTF8 locale.
* A revamped displays list (for 'displays' command)
* Increased default maximum number of windows from 40 to 100.
* Increased number color/attribute changes in caption/hardstatus string from 16 to 256.
* Some commands can be remotely queried using the -Q command-line flag.
In-Progress:
* Scripting support (thanks to Google Summer of Code 2009 project by Rui Guo)
Developers:
* Alexander Naumov <alexander_naumov@opensuse.org>
* Amadeusz Sławiński <amade@asmblr.net>
* Juergen Weigert <jw@suse.de>
* Michael Schroeder <mls@suse.de>
* Micah Cowan <micah@cowan.name>
* Sadrul Habib Chowdhury <sadrul@users.sourceforge.net>
Contributors:
* Clavelito <maromomo@hotmail.com>
* Dick <dick@mrns.nl>
* Gabriel <g2p.code@gmail.com>
* Benjamin Andresen <bandresen@gmail.com>
* Takeshi Banse <takebi@laafc.net>
* Maarten Billemont <lhunath@gmail.com>
* Curtis Brown <mrbrown8@juno.com>
* Cyril Brulebois <kibi@debian.org>
* Trent W Buck <trentbuck@gmail.com>
* Stephane Chazelas <stephane_chazelas@yahoo.fr>
* Kees Cook <kees@ubuntu.com>
* Thomas Dickey <tom@invisible-island.net>
* Christian Ebert <blacktrash@gmx.net>
* Geraint Edwards <gedge-lists-screen@yadn.org>
* Romain Francoise <romain@orebokech.com>
* Alexander Gattin <xrgtn@yandex.ru>
* Emanuele Giaquinta <e.giaquinta@glauco.it>
* Yi-Hsuan Hsin <mhsin@mhsin.org>
* Kipling Inscore <kinscore@synaptics.com>
* Chris Jones <cjns1989@gmail.com>
* Max Kalashnikov <mmt@maxkalashnikov.com>
* Steve Kemp <steve@steve.org.uk>
* Ryan Niebur <ryan@debian.org>
* Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
* William Pursell <bill.pursell@gmail.com>
* Michael Scherer <misc@mandriva.org>
* Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
* Peter Teichman <peter@teichman.org>
30.10.94
This is a quick overview of screen's life story. But it is not up
to date. You'll find more details about the revision history in
patchlevel.h and newer changes are only documented there.
31.7.93 -- 3.5.1
================
* writelock, number, paste with arg, at, zombie and wall commands added.
* Access Control Lists and more multi-user support added.
* select and setenv commands enhanced.
* socket.c: motorola bugfix.
* configure.in: --srcdir support.
* configure.in: recognize alpha and SUNOS3 correctly.
* doc/screen.texinfo: Documentation by Jason Merrill.
13.05.93 -- 3.3.3
=================
* defautonuke, silence commands added.
* exec command added.
* hardcopydir, logdir commands added.
* Made a superb configure script.
* BROKEN_PIPE, SOCK_NOT_IN_FS added for braindamaged systems.
* multi display, multi user support.
* process command. CS, CE switch cursorkeycap in application mode.
* lockprg pow_detaches on SIGHUP
* ins_reg copy_reg commands.
* new screenrc syntax.
* split up screen.c and ansi.c
21.10.92 -- 3.2.9
================
* ChangeLog: replaces CHANGES and is in GNUish format.
* Makefile (CFLAGS, M_CFLAGS, LIBS, OPTIONS): moved user config here,
merged all Makefiles, GNUified
* socket.c (FindSocket): ignoring bad files in $SCREENDIR
* config/config.linux: ported.
* utmp.c, exec.c, loadav.c: split apart from screen.c/fileio.c
15.07.92 -- 3.2.8
=================
* ansi.c (WriteString): automatic character set switching for 8bit support
3.2.3-3.2.7
===========
* concept changes: Display structure, Multi attacher
...
3.2.2
=====
* screen.c (main): -m option, "_M_ake always new session", ignore $STY
* screen.c (main): -Ssessionname
* fileio.c (RcLine): ^A:sessionname give your session a nicer name.
* screen.c (main): supporting detached startup via screen -d -m -Ssockname
* fileio.c (stripdev): moved, could not compile
* overlay.h: "stackable overlay concept"
* search.c: vi-like / and ? search AND emacs-like ^S and ^R incremental search
in scrollback
* mark.c: I meant BSDI not BSD
* concept change: struct display and struct newwin introduced.
* screen.c (main): -v option prints version.
* screen.c (MakeWindow): ^A:screen /dev/ttya opens a character device
instead of forking ShellProg with a pty pair.
3.2.0
=====
Ultrix port
Irix 3.3 SGI port
shadow password suite supported
data loss on stdin overflow fixed
"refresh off" keyword added.
3.1.1
------
Screen is now under the GNU copyleft license. See file COPYING.
command line option -A. $LINES, $COLUMNS improved.
C-A : vbellwait <sec>
XENIX support (Ronald Khoo)
SYSV has uname() instead of gethostname().
hpux has setresuid.
ClearScreen now saves image to scrollback buffer.
mips has setenv.
numerous bugfixes.
3.1 finally released version.
=============================
3.0.99: last minute changes:
----------------------------
MIPS support (J{rvinen Markku)
SVR4 support (Marc Boucher)
secopen() secfopen() calls replace stat/access/open.
C-a : echo improved.
'register int'
Changes up to Screen 3.0 Patchlevel 7
=====================================
Better terminfo support: Screen now checks if a termcap/info
entry which the name "screen.$TERM" does exist. Look in the
"VIRTUAL TERMINAL" section of the manual for more details.
Many security improvements.
ScrollRegion() bug fixed which caused slow scrolling if AL
or DL was used.
Pyramid and Ultrix support added. (Tim and Larry)
ENVIRONMENT support.
/local/etc/screenrc checks for $SYSSCREENRC
$HOME/.screenrc checks for $ISCREENRC and $SCREENRC
/local/screens checks for $ISCREENDIR and $SCREENDIR
.screenrc understands ${VAR} and $VAR .
screen 3.0 Patchlevel 6
=======================
.screenrc:
screen now only opens the windows you explicitly ask for.
If you specify none, you still get one window, of course.
screen 3.0. Patchlevel 5
========================
Ansi prototyping by Christos.
copy mode: CTRL-U / CTRL-D exchanged. code cleanup.
changes to screen 3.0 patchlevel 4
==================================
markkeys "string"
allows to rebind the keys used in copy/history mode.
string is made up of pairs "<oldchar>=<newchar>" which are separated
by a colon. Oldchar and newchar are either single ascii characters,
or the two character sequence ^x, where x is an ascii character, or
a 3 digit octal value prepended with '\'. the string "\040=.:^M=q"
rebinds '.' to set marks, and the return key will abort copy mode.
set scrollback 100
resizes the scrollback history buffer to 100 lines. a default of 50
is installed.
A Howard Chu like scrollback history is installed. Many vi-like keys
are added to the copy mode. The '?' key reports on cursor position.
screen 3.0 Patchlevel 3
=======================
WriteString fixed, it did kill the display variable.
Yet another LP bugfix.
non vt100 semi-graphics character support.
waynes patch fixed
screen 3.0 Patchlevel 2
=======================
wayne patches cursor motion outside scrollregions.
.screenrc
monitor on|off
changes in Screen 3.0 Patchlevel 1
==================================
screen -wipe
^A : set vbell_msg "Wuff Wuff"
Thousand enhancements: help resizable, copy'n'paste in main
socket loop, and no more '\0' hackin'. :WS=\E8;%d;%dt:
screen can now resize windows under sunview.
^A : set crlf on|off
effects markroutine join.
screen learned about sized windows under X
screen -ls (-d) -q
quiet option. We count the number of detached (attached) sessions and set
a return value of 10+n. The -q option inhibits all startup
warnings/messages. i.e. screen -R -q may return with code 12 or higher
or start a new/old session.
pow_detach_msg "text string"
new command, allows messages, terminal reset, etc. on logout caused
by pow_detach.
^A : learned a new keyword "set":
commands like "login on" , "vbell off", ... affect the default for
windows to be created. But commands like "set login off" affect
the actual setting of this window. and not the default.
such commands may be bound to keys. example:
bind 'O' set login off
is valid in your .screenrc as well as typed at the ':' prompt.
a bonus is ":set all" which is synonym to ":help".
At the Colon prompt also KeyNames can be entered, although that makes
not always sense.
^A x uses a builtin lockprg, if
a) we don't find our lockprg, or
b) user supplies us with the environment variable LOCKPRG set to "builtin"
the builtin locks until your login password is typed. on systems using
"shadow password files" you are prompted for a password.
markroutine can append joined.
screen removes the "controlling tty" from utmp while ptys are attached.
markroutine performs CR+NL when '\n' is pressed
screen may die quietly, when no TERMCAP entry for "screen" is
found, and screen is run under X-windows
_SEQUENT_ marks sequent386_ptx
screen runs now under SunOS4.1.1 (we need setsid()!).
bug in SetForeWindow fixed.
rare markroutine bug fixed.
we don't open every file the attacher tells us.
we have now our wonderful "Wuff, Wuff" visual_bell
we have now the interprocess-communication-buffer. secure version.
'^A =' removes the interprocess-communication-buffer.
markroutine as in 2.1
markroutine: 'a' toggles append mode,
'>' like ' ', but immediately WriteFile(DUMP_EXCHANGE) then.
'A' like ' ', but first switch to append mode.
.screenrc understands "screen 2:faui09 rlogin faui09 -l jnweiger"
and "password none"
and "vbell [on|off]"
'^A :' allows .screenrc commands "online".
screen now receives new $TERM from attacher, when it is reattached
MakeClientSocket() fifo version does now test for access.
.screenrc learns "hardstatus {on|off}"
termcap's VB is used for vbell if available.
Attach() code rewritten:
screen now lists socket directory, if it does not find a suitable socket
screen -d [host.tty] detaches a running screen.
screen -[ls|list]
list all sockets that we find in our sockdir
when the socket has been removed, send a SIGCHLD to the poor SCREEN
process and it will try to recover. then try a 'screen -r' again.
all the socket stuff lives now in an extra file.
Major changes in version 2.4:
=============================
* Test version that presents the erlangen extensions from 2.0 in a 2.3
screen.
* window resize support
* screen locking C-a x
* support for SYSV
* password protection
* copy & paste across screens
* remote detach and power detach
Major changes in version 2.3:
* Terminal emulation has been significantly enhanced and bugfixed.
* We now fully update the last character on the screen for true auto-
margin terminals, though there may be some delay before the character
can be safely added to the screen. If your terminal has character
insert it will be used to shorten the delay.
* Added the "termcap" .screenrc command to tweak your terminal's termcap
entry AND to customize the termcap generated for the virtual terminals.
See also the -L and -O command-line options, and the SCREENCAP environ-
ment variable.
* Fixed screen's character handling when detached or suspended to NOT block
the child processes in their windows -- output continues to be processed
in the background.
* Added a.k.a.s (window-name aliases) that allow you to customize the
window-information line, including being able to change the name on-
the-fly to reflect what's currently running in the window (see the
-k option, shellaka command, and ALSO KNOWN AS discussion in the doc).
* Added the ability to log the output of a window to a file (see the
"C-a H" (log) command).
* Flow-control can now be set for each window and switched interactively
(see the "flow" command, -f option, and FLOW CONTROL discussion).
* Individual windows can be included or excluded from mention in the
/etc/utmp file (see the "login" command and -l option).
* Added an activity monitor, which allows you to have a window watched for
the start of any output and alert you when it occurs (see the "C-a M"
(monitor) command).
* Enhanced the information in the window-information line to keep track of
windows that have: logging turned on '(L)'; beeped in the background '!';
became active while being monitored '@' (see the "C-a w" (windows) command).
* Added an on-line help display that lists all the commands and their
key bindings (see the "C-a ?" (help) command).
* Extended handling of the beep message (and also the new activity message)
to allow '~' to specify a literal beep (see the "beep" and "activity"
.screenrc commands).
* You can now set the default action on receipt of a hangup signal: detach
or terminate (see the "autodetach" .screenrc command).
* Routing of characters to their virtual terminals has been enhanced to
not drop characters nor (in rare circumstances) hang up screen.
* The NFS compatibility has been enhanced.
Major changes in version 2.0a:
* Screen allows you to `detach' the "screen" session from the physical
terminal and resume it at a later point in time (possibly on a
different terminal or in a different login session).
To get an impression of this functionality do the following:
- call "screen" and create a couple of windows
- type Control-A Control-D (screen terminates; you are back
in the shell)
- call "screen -r" to resume the detached screen
* Screen supports multiple character sets and the ISO 2022 control
functions to designate and switch between character sets.
This allows you, for instance, to make use of the VT100 graphics
character set or national character sets.

View file

@ -0,0 +1,253 @@
jw 21.10.93
05.05.94
screen: frequently asked questions -- known problems -- unimplemented bugs
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Q: Why is it impossible to download a file with Kermit/sz/rz when
screen is running? Do I need to set some special variables?
A: Screen always interprets control-sequences sent by the
applications and translates/optimizes them for the current
terminal type. Screen always parses the user input for its
escape character (CTRL-A). Both are basic screen features and
cannot be switched off. Even if it were possible to switch
screen into a completely transparent mode, you could never switch
between windows, while kermit/sz/rz is downloading a file. You
must wait till the end as kermit/sz/rz will not transmit your
input during a file transfer and as kermit/sz/rz would be very
confused if screen switched away the window containing the
other kermit/sz/rz. Simply detach your screen session for each
file transfer and start the transfer program only from the shell
where you started screen.
Q: I am using screen with a YYY terminal, which supports the XXX
graphic language. I am very happy with it, except one thing: I
cannot render graphics into screen windows.
A: You are out of luck there. Screen provides a fixed set of escape
sequences in order to make it possible to switch terminal types.
Screen has to know exactly what the escape sequences do to the
terminal because it must hold an image in memory. Otherwise
screen could not restore the image if you switch to another
window. Because of this you have to change screens escape
sequence parser (ansi.c) to pass the XXX graphics sequences to
the terminal. Of course the graphics will be lost if you switch
to another window. Screen will only honour graphics sequences
that are demanded by an overwhelming majority.
Q: For some unknown reason, the fifo in /tmp/screens/S-myname is
gone, and i can't resume my screen session. Is there a way to
recreate the fifo?
A: Screen checks the fifo/socket whenever it receives a SIGCHLD
signal. If missing, the fifo/socket is recreated then. If screen
is running non set-uid the user can issue a 'kill -CHLD
screenpid' directly (it is -CHILD on some systems). Screenpid is
the process-id of the screen process found in a 'ps -x' listing.
But usually this won't work, as screen should be installed set-
uid root. In this case you will not be able to send it a signal,
but the kernel will. It does so, whenever a child of screen
changes its state. Find the process-id (shellpid below) of the
"least important" shell running inside screen. The try 'kill
-STOP shellpid'. If the fifo/socket does not reappear, destroy
the shell process. You sacrify one shell to save the rest. If
nothing works, please do not forget to remove all processes
running in the lost screen session.
Q: When you start "screen" a page of text comes up to start you
off. Is there a way to get rid of this text as a command line
argument or by using a switch of some sort.
A: Just put the following line in your ~/.screenrc:
startup_message off
Many people ask this, although it is in the man page, too :-)
Q: Start "screen emacs" and run emacs function suspend-emacs
(ctrl-z). The window containing emacs vanishes.
A: This is a known bug. Unfortunatly there is no easy fix
because this is specified in the POSIX standard. When a new
window is created Screen opens up a new session because the
window has to get the pty as a controlling terminal (a
session can only have one controlling terminal). With the
setsid() call the process also creates a new process
group. This process group is orphaned, because there is no
process in the session which is not in the process
group. Now if the process group leader (i.e. your program)
gets a TTIN/TTOU/TSTP, POSIX states that the kernel must
send a KILL signal to the process group because there is no
one left to continue the process. Even if screen would
try to restart the program, that would be after it received the
KILL signal which cannot be caught or ignored.
tromey@klab.caltech.edu (Tom Tromey): I've noticed this exact
same problem. I put this in my .emacs file. It seems to work:
;; If running under screen, disable C-z.
(if (and (getenv "STY") (not window-system))
(global-unset-key "\C-z"))
Q: Screen gets the terminal size wrong and messes up.
A: Before you start screen: Check with 'stty -a' what the terminal
driver thinks about rows and columns. Check the environment
variables LINES and COLUMNS. Then from within screen check with
the info command (CTRL-A i) what size screen thinks your terminal
is. If correcting tty driver setting and environment variables
does not help, look up the terminal capability definition. First
the TERMCAP environment variable. If this is not set, look up the
terminals name as defined in the environment variable TERM in
/etc/termcap or in the terminfo database with untic or infocmp.
There may be :li=...: and :co=...: or even :ll=...: entries
(cols#... and lines#... when it's terminfo) defined incorrectly.
Either construct your own TERMCAP environment variables with
correct settings, use screens terminfo/termcap command in your
.screenrc file or have the database corrected by the system
administrator.
Q: Screen messes up the terminal output when I use my favourite ap-
plication. Setting the terminal size does not help.
A: Probably you got the termcap/terminfo entries wrong. Fixing this
is a three stage procedure. First, find out if terminfo or
termcap is used. If your system only has /etc/termcap,
but not /usr/lib/terminfo/... then you are using termcap.
Easy. But if your system has both, then it depends how the appli-
cation and how screen were linked. Beware, if your applica-
tion runs on another host via rlogin, telnet or the like, you
should check the terminfo/termcap databases there. If you cannot
tell if terminfo or termcap is used (or you just want to be
save), the do all steps in stage 3 in parallel for both
systems (on all involved hosts). Second: Understand the basic
rules how screen does its terminal emulation. When screen is
started or reattached, it relies on the TERM environment variable
to correctly reflect the terminal type you have physically
in front of you. And the entry should either exist in the system
terminfo/termcap database or be specified via the TERMCAP en-
vironment variable (if screen is using the termcap system). On
the other end, screen understands one set of control codes. It
relies on the application using these codes. This means applica-
tions that run under screen must be able to adapt their con-
trol codes to screen. The application should use the TERM vari-
able and termcap or terminfo library to find out how to drive
its terminal. When running under screen, the terminal is virtual
and is only defined by the set of control codes that screen
understands. The TERM variable is automatically set to
"screen" and the "screen"-entries should exist in the data-
bases. If your application uses hardcoded control codes rather
than a database, you are on your own. Hint: The codes under-
stood by screen are a superset of the very common definition
named "vt100". Look at the documentation of screen. The
codes are listed there. Third: Have the entry "screen" in-
stalled on all hosts or make sure you can live with "vt100".
Check the codes sent by your application, when the TERM variable
is set to "screen". Do not try to set the TERM variable inside
screen to anything other than "screen" or "vt100" or compati-
ble. Thus your application can drive screen correctly. Also take
care that a good entry is installed for your physical terminal
that screen has to drive. Even if the entry was good enough
for your application to drive the terminal directly, screen may
find flaws, as it tries to use other capabilities while op-
timizing the screen output. The screenrc commands
"termcap" and/or "terminfo" may help to fine-tune capabilities
without calling the supervisor to change the database.
Q: I cannot configure screen. Sed does not work.
A: The regular expressions used in our configure script are too
complicated for GNU sed version 2.03. In this regard it is bug
compatible with Ultrix 3.1 "sed": GNU sed version 2.03 dumps
core with our configure script. Try an older release. E.g. from
ftp.uni-erlangen.de:/pub/utilities/screen/sed-2.02b.tar.gz
Q: When reattaching a session from a different Workstation, the
DISPLAY environment variable should be updated. Even ``CTLR-A
: setenv DISPLAY newhost:0'' does not work as expected.
A: Under unix every process has its own environment. The environ-
ment of the SCREEN process can be changed with the `setenv' com-
mand. This however cannot affect the environment of the
shells or applications already running under screen. Subsequently
spawned processes will reflect the changes. One should be aware
of this problem when running applications from very old shells.
Screen is a means for keeping processes alive.
Q: About once every 5 times I ran the program, rather than getting
a "screen," I got someone elses IRC output/input.
A: What probably happened is that an IRC process was left running on
a pseudo tty in such a way that the kernel thought the tty was
available for reallocation. You can fix this behaviour by
applying the SunOS 4.1.x tty jumbo patch (100513-04).
Q: Screen compiled on SunOS 5.3 cannot reattach a detached session.
A: You are using /usr/ucb/cc, this compiler is wrong. Actually it
links with a C-library that mis-interprets dirent. Try again
with /opt/SUNWspro/bin/cc!
Q: The "talk" command does not work when Screen is active.
A: Talk and several other programs rely on entries in the Utmp-
Database (/etc/utmp). On some systems this Database is world
writable, on others it is not. If it is not, screen must be
installed with the appropriate permissions (user or group s-bit)
just like any program that uses PTYs (rlogin, xterm, ...). When
screen cannot write to utmp, you will see messages on you display
which do not belong to any screen window.
When screen can update utmp, it is not guaranteed that it does as
you expect. First this depends on the config.h file defining
ENABLE_UTMP, LOGINDEFAULT, and perhaps CAREFULUTMP. Second it
depends on the screenrc files (system wide and per user), if utmp
entries are done. Third, you can control whether windows are
logged in with screens ``login'' command.
Q: Seteuid() does not work as expected in AIX. Attempting a multi-
user-attach results in a screen-panic: "seteuid: not owner".
A: This is not a screen problem. According to Kay Nettle
(pkn@cs.utexas.edu) you need the AIX patch PTF 423674.
Q: When I type cd directory (any directory or just blank) from
within one of the windows in screen, the whole thing just freezes
up.
A: You display the current working directory in xterm's title bar,
This may be caused by hardcoded ESC-sequences in the shell prompt
or in an cd alias. In Xterm the coding is
ESC ] n ; string_to_display ^G
where n = 1, 2, 3 selects the location of the displayed string.
Screen misinterprets this as the ansi operating system comment
sequence:
ESC ] osc_string
and waits (according to ansi) for the string terminator
ESC \
Screen versions after 3.5.12 may provide a workaround.
Q: Mesg or biff cannot be turned on or off while running screen.
A: Screen failed to change the owner of the pty it uses. You need to
install screen setuid-root. See the file INSTALL for details.
Q: The cursor left key deletes the characters instead of just moving the
cursor. A redisplay (^Al) brings everything back.
A: Your terminal emulator treats the backspace as "destructive". You
can probably change this somewhere in the setup. We can't think
of a reason why anybody would want a destructive backspace, but
if you really must have it, add the lines
termcap <TERM> 'bc@:bs@'
terminfo <TERM> 'bc@:bs@'
to your ~/.screenrc (replace <TERM> with the terminal type your
emulator uses).
Q: I have an old SysV OS (like Motorola SysV68) and sometimes screen
doesn't reset the attributes correctly. A redisplay (^Al) doesn't
make things better.
A: The libcurses library has a bug if attributes are cleared with
the special ue/se capabilities. As a workaround (other than upgrading
your system) modify 'rmul' (and 'rmso'?) in screen's terminfo entry:
rmul=\E[m, rmso=\E[m

View file

@ -0,0 +1,39 @@
WIP notes on hacking the Screen source.
* Screen commands are handled by the DoAction function in process.c.
The local variable 'nr' is set to an integer value representing the
command to be evaluated; for every command `foo', there is an
integer value RC_FOO for use as nr's value to represent it. Find
the matching case label to follow procesing of the command.
The RC_FOO values are defined in comm.h, which is automatically
generated by comm.sh, based on the names of the commands
themselves (found in comm.c).
* The current display is held in the global variable "display".
Variable names like D_foo are shorthands for display->d_foo (where d_foo
is a member of "struct display").
* Names like D_IS, D_TI, D_SG usually refer to the values of various
termcap features of the current display. These are found in term.h,
which is automatically generated from term.c by term.sh.
* The main input-reading function for handling user input from a display,
is disp_readev_fn in display.c. This also handles automatic transformation
of mouse-tracking codes from display coordinates to screen-window
coordinates, and decodes characters from the display's encoding, passing
it on to the foreground input processor.
Input is passed through ProcessInput in process.c to handle
keybindings (specified by bindkey and such), and then processed by
layer-specific input-processing functions, which you'll find in
instances of struct LayFuncs. For instance, keystrokes are processed
by:
normal windows: WinPrGocess
window in copy-mode: MarkProcess
window list: WListProcess
command input line: InpProcess
* Handling string escapes (in hardstatus and the like), such as %w or
%{= bw}, is done in screen.c, MakeWinMsgEv().

View file

@ -0,0 +1,28 @@
------------------------------
What's new in screen-4.0.3 ?
------------------------------
* zombie command has new option 'onerror'
* buffer overflow in resize.c fixed
* minor docu update
* more robust startup
* use setresuid; SendAttachMsg() for fd-passing added; DoCSI enhanced.
------------------------------
What's new in screen-4.0.0 ?
------------------------------
* new screenrc parser, not 100% compatible.
* screenblanker support: new 'idle', 'blanker', 'blankerprg'
commands.
* zmodem support via the 'zmodem' command.
* nonblock code rewritten, nonblock now understands a timeout.
new command 'defnonblock'.

View file

@ -0,0 +1,102 @@
[If you just got the screen package, it pays to read the file INSTALL]
[This intro only describes the most common features to get you started]
[A full description of all features is contained in the source package]
Short introduction to screen (Version 5.0.1)
Send bugreports, fixes, enhancements, t-shirts, money, beer & pizza to
screen-devel@gnu.org
Screen provides you with an ANSI/vt100 terminal emulator, which can multiplex
up to 10 pseudo-terminals. On startup, it executes $SHELL in window 0.
Then it reads $HOME/.screenrc to learn configuration, keybindings, and
possibly open more windows.
C-a ? (help) Show all keybindings.
C-a c (screen) Create new windows.
C-a SPACE (next) Advance to next window (with wraparound).
C-a C-a (other) Toggle between the current and previously
displayed windows.
C-a 0 (select n) Switch to window n=0 ... 9.
...
C-a 9
C-a w (windows) Show a list of window names in the status line.
C-a a (meta) Send a literal C-a/C-s/C-q to the
C-a s (xoff) process in the window.
C-a q (xon) For instance, emacs uses C-a and C-s.
C-a l (redisplay) Redraw this window.
C-a W (width) Toggle between 80 & 132 columns mode.
C-a L (login) Try to toggle the window's utmp-slot.
C-a z (suspend) Suspend the whole screen session.
C-a x (lockscreen) Execute /usr/bin/lock, $LOCKCMD or a
built-in terminal lock.
C-a H (log) Log stdout of window n to screenlog.n.
C-a C-[ (copy) Start copy mode. Move cursor with h,j,k,l.
Set 2 marks with SPACE or y. Abort with ESC.
(C-[ is ESC.) Preceeding second mark with
an a appends the text to the copy buffer.
C-a C-] (paste) Output copy buffer to current window's stdin.
C-a < (readbuf) Read the copy buffer from /tmp/screen-exchange.
C-a > (writebuf) Write the copy buffer to /tmp/screen-exchange.
C-a d (detach) Detach screen. All processes continue and may
spool output to their pty's, but screen
disconnects from your terminal.
C-a D D (pow_detach) Power detach. Disconnect like C-a d but also
kill the parent shell.
C-a K (kill) Kill a window and send SIGHUP to its process
group. Per default this would be C-a C-k,
but it is redefined in the demo .screenrc
(think of killing a whole line in emacs).
C-a : (colon) Online configuration change.
See the man page or TeXinfo manual for many more keybindings and commands.
screen -r [pid.tty.host|tty.host]
Reattach to a specific detached session. The terminal emulator
reconfigures according to your $TERMCAP or $TERM settings.
When you have multiple screens detached, you must supply the session
name.
screen -R reattaches to a detached session or (if none) creates a new
session.
screen -d [pid.tty.host|tty.host]
Detach a screen session remotely. Has the same effect as typing 'C-a d'
on the controlling terminal. 'screen -D' will power-detach.
screen -list
screen -ls
screen -wipe
Show all available sessions and their status. Use -wipe to remove
DEAD sessions.
If sockets are missing, you may send a SIGCHLD to its 'SCREEN'
process and the process will re-establish the socket (think of
someone cleaning /tmp thoroughly).
screen -h 200
Starts a new screen session and sets the number of lines in the scrollback
buffer to 200. The default is 100 lines.

View file

@ -0,0 +1,108 @@
# Cygwin-specific notes for screen
screen has been reported to work well inside the following terminals in Cygwin:
* mintty
* rxvt
* xterm
If you use screen in a DOS console, you will be able to detach sessions, but
reattaching to them later is likely to fail. Then you'll have to use `screen
-wipe` to clear out your old unusable sessions, and you may have to manually
kill their child processes.
screen may or may not work well with other terminals in Cygwin. Please post
test reports to the Cygwin mailing list.
## Color support
screen version 5 now includes both truecolor (24-bit) and 256-color terminal
support. To determine how many colors your terminal can display now, run
/usr/share/screen/colortest.sh
Instructions at the bottom of the output will help you to determine how many
colors your terminal supports. If you want to get more colors, read on.
### Truecolor
To use truecolor, set
truecolor on
in your ~/.screenrc. (This option is undocumented as of screen version 5.0.1.)
Then kill your screen session (`C-A \`) and start a new one. According to
https://github.com/termstandard/colors, you may also need to set one of the
following in your shell environment:
COLORTERM=truecolor
COLORTERM=24
### 256-color
If truecolor support won't work for you, to get 256-color support you may need
to set your terminal type to a 256-color variant, both outside and inside of
screen. A simple way to do this is by invoking screen as e.g.
TERM=xterm-256color screen -T screen-256color
The correct value of TERM depends on your terminal type, and is believed to be
well described by
case $TERM in
xterm) TERM=xterm-256color ;; # for xterm, PuTTY, MinTTY
rxvt) TERM=rxvt-256color ;; # for rxvt
cygwin) ;; # DOS terminal - fewer than 16 colors are supported
esac
However as of screen version 5, I now get better results by leaving TERM and
term unset. The best way to find out is just to try it.
You might be able to set the above permanently in your environment, i.e. by
putting it into your .bashrc file, without any ill effects. If you know of any
additions or corrections to the above logic, please post the information to the
Cygwin mailing list.
To avoid having to specify '-T screen-256color' every time, you can put
term screen-256color
into your .screenrc or /etc/screenrc file.
## FAT file system warning
If your /tmp directory is stored on a FAT file system, you won't be able to
reattach to screen sessions after you detach from them. The reason is that to
preserve the security of your session, screen requires that restrictive
permissions be set on the directory where it stores its socket files, in
/tmp/uscreens by default. But the FAT file system doesn't support file
permissions at all, so it's incapable of setting the permissions tightly
enough. If this is your case, then when you try to reattach to a detached
session, screen will give you the following unhelpful error message:
There is a screen on:
There is no screen to be resumed.
You can use the 'mount' command to see which type of file system your root
directory is stored on:
mount | grep 'on / '
(or `mount | grep 'on /tmp '` in case you've mounted a separate file system on
/tmp). If the result says the type is fat, fat32, vfat, or some other kind of
fat, then you won't be able to reattach to screen sessions.
To solve this problem, you need to tell screen to store its socket files in a
directory on a file system that does support file permissions, such as NTFS. For
example, you could put the following in your ~/.bash_login file:
export SCREENDIR=/cygdrive/c/WINDOWS/Temp/screen/$USER
assuming that C:/Windows/Temp/screen/$USER is an existing NTFS directory where
you have write permission. Another solution would be to mount an NTFS directory
as your /tmp directory, e.g. by putting
C:/WINDOWS/Temp /tmp some_fs binary 0 0
into /etc/fstab or /etc/fstab.d/$USER. See mount(1).

View file

@ -0,0 +1,7 @@
- display size adaption (Activate)
- process.c cleanup via comm splitting
- writelocks?
- partial?
- type into several windows at once (for cluster admins)
- configurable digraph table
- command line options should overwrite config files.