<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/server.c, branch 1.19.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.19.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.19.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2024-08-02T06:28:13Z</updated>
<entry>
<title>Remove a number of unused includes</title>
<updated>2024-08-02T06:28:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-01T18:11:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a9e462d952ca1e0367e9e6eb6ee00a0cda7e8c9b'/>
<id>urn:sha1:a9e462d952ca1e0367e9e6eb6ee00a0cda7e8c9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support for opening an existing PTY</title>
<updated>2024-03-14T06:31:03Z</updated>
<author>
<name>Alyssa Ross</name>
<email>hi@alyssa.is</email>
</author>
<published>2021-12-10T17:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=86894a1cd29f8fb3e5a8487b4ce2d2c1b4cf57a9'/>
<id>urn:sha1:86894a1cd29f8fb3e5a8487b4ce2d2c1b4cf57a9</id>
<content type='text'>
Virtual machine monitor programs (e.g. QEMU, Cloud Hypervisor) expose
guest consoles as PTYs.  With this patch, foot can access these guest
consoles.

Usually, the program used for accessing these PTYs is screen, but
screen is barely developed, doesn't support resizing, and has a bunch
of other unrelated stuff going on.  It would be nice to have a
terminal emulator that properly supported opening an existing PTY.
The VMM controls the master end of the PTY, so to the other end (in
this case foot), it just behaves like any application running in a
directly-opened PTY, and all that's needed is to change foot's code to
support opening an existing PTY rather than creating one.

Co-authored-by: tanto &lt;tanto@ccc.ac&gt;
</content>
</entry>
<entry>
<title>Replace unchecked allocations with calls to xmalloc.h functions</title>
<updated>2024-01-25T07:03:50Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-01-25T07:03:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=91b22ae21acd0b3171814b47b0dead027f8da779'/>
<id>urn:sha1:91b22ae21acd0b3171814b47b0dead027f8da779</id>
<content type='text'>
</content>
</entry>
<entry>
<title>slave: don't skip setting environment variables when using a custom environment</title>
<updated>2024-01-11T15:37:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-01-09T15:50:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9da7152f834384a354710fcc8f99a6f83e5dfc12'/>
<id>urn:sha1:9da7152f834384a354710fcc8f99a6f83e5dfc12</id>
<content type='text'>
When launching footclient with -E,--client-environment the environment
variables that should be set by foot, wasn't.

Those variables are:

* TERM
* COLORTERM
* PWD
* SHELL

and all variables defined by the user in the [environment] section in
foot.ini.

In the same way, we did not *unset* TERM_PROGRAM and
TERM_PROGRAM_VERSION.

This patch fixes it by "cloning" the custom environment, making it
mutable, and then adding/removing the variables above from it.

Instead of calling setenv()/unsetenv() directly, we add the wrapper
functions add_to_env() and del_from_env().

When *not* using a custom environment, they simply call
setenv()/unsetenv().

When we *are* using a custom environment, add_to_env() first loops all
existing variables, looking for a match. If a match is found, it's
updated with the new value. If it's not found, a new entry is added.

del_from_env() loops all entries, and removes it when a match is
found. If no match is found, nothing is done.

The mutable environment is allocated on the heap, but never free:d. We
don't need to free it, since it's only allocated after forking, in the
child process.

Closes #1568
</content>
</entry>
<entry>
<title>config: config_free(): pass conf struct by pointer, not by-value</title>
<updated>2022-04-12T13:21:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-12T11:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=99db7aa7cfe55c2485c31e9f0fefd459fc1c09f2'/>
<id>urn:sha1:99db7aa7cfe55c2485c31e9f0fefd459fc1c09f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: add -E,--client-environment</title>
<updated>2022-04-12T13:07:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-04-11T10:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d02124902b4e27c3ed3ef48442ce17c5e0af9d56'/>
<id>urn:sha1:d02124902b4e27c3ed3ef48442ce17c5e0af9d56</id>
<content type='text'>
When this option is used, the child process in the new terminal
instance will inherit its environment from the footclient process,
instead of the foot server’s.

Implemented by sending (yet another) dynamic string list as part of
the client -&gt; server setup packet. When the new option is *not* used,
the setup packet is now 2 bytes larger than before.

On the server side, the slave process now uses execvpe() instead of
execvp(). There’s plumbing to propagate a new ‘envp’ argument from
term_init() all the way down to slave_exec(). If ‘envp’ is NULL, we
use ‘environ’ instead (thus matching the old behavior of execvp()).

Closes #1004
</content>
</entry>
<entry>
<title>Make foot able to receive a socket from its parent</title>
<updated>2022-02-26T15:09:30Z</updated>
<author>
<name>Max Gautier</name>
<email>mg@max.gautier.name</email>
</author>
<published>2022-01-15T15:58:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=88a0f7397c5c72f3a6a70badff8e3c3c792aeb4f'/>
<id>urn:sha1:88a0f7397c5c72f3a6a70badff8e3c3c792aeb4f</id>
<content type='text'>
If the argument to --server is parsed as a number, consider it to be a
file descriptor, and use that as a socket.
This is necessary to be able to use socket activation with the server
mode of foot.
</content>
</entry>
<entry>
<title>foot/client: implement xdga client activation</title>
<updated>2021-11-01T01:52:29Z</updated>
<author>
<name>Ronan Pigott</name>
<email>rpigott@berkeley.edu</email>
</author>
<published>2021-10-29T00:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8'/>
<id>urn:sha1:99d5bf64bca5daa70e3e8c5a4d63a257ba7e6fb8</id>
<content type='text'>
This is an application of the xdg activation protocol that will allow
compositors to associate new foot toplevels with the command that
launched them.

footclient receives an activation token from the launcher which the
compositor can use to track application startup. It passes the token
to the foot server, which then activates the new window with the token
to complete the startup sequence.
</content>
</entry>
<entry>
<title>server: no need to clone the config to handle -N,--no-wait</title>
<updated>2021-09-05T07:28:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-09-05T07:28:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f39a62fa5e9207a6f8c16066527c68ca9a5524a6'/>
<id>urn:sha1:f39a62fa5e9207a6f8c16066527c68ca9a5524a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server: verify primary font is monospaced</title>
<updated>2021-08-31T17:58:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-31T17:52:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1233e000f02ce664134fbbba7b46b710f544436d'/>
<id>urn:sha1:1233e000f02ce664134fbbba7b46b710f544436d</id>
<content type='text'>
... unless we’re re-using the main conf as-is, in which case we will
already have done this (and the conf’s user-notification list will
already contain a warning).
</content>
</entry>
<entry>
<title>term: consolidate shutdown related state into an anonymous struct</title>
<updated>2021-07-31T17:08:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-31T17:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=03f952cf4dcf45d909ce209838a3beb4304358e5'/>
<id>urn:sha1:03f952cf4dcf45d909ce209838a3beb4304358e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server: the terminal now purges SHM pixmaps on its own</title>
<updated>2021-07-11T09:54:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-11T09:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8290cebc09c74ac0969ed2692a8de08ca134871c'/>
<id>urn:sha1:8290cebc09c74ac0969ed2692a8de08ca134871c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server: make sure ‘overrides’ have been initialized in all error paths</title>
<updated>2021-06-23T13:38:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T13:38:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ef349bfea26f63456a6cf6ebd3bc8d26fb3ca3d5'/>
<id>urn:sha1:ef349bfea26f63456a6cf6ebd3bc8d26fb3ca3d5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server: avoid “member access within misaligned address” ASAN warning</title>
<updated>2021-06-23T13:12:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T12:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=04d42662c78823fbb2e71c7a481c86293a031c9a'/>
<id>urn:sha1:04d42662c78823fbb2e71c7a481c86293a031c9a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: send overrides for everything that is publicly visible in the conf</title>
<updated>2021-06-23T13:12:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T12:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=136d60606a1e01eb68ed984de63b7a55f8966075'/>
<id>urn:sha1:136d60606a1e01eb68ed984de63b7a55f8966075</id>
<content type='text'>
Send a generic “overrides” list to the server, containing options in
text, on the format “section.key=value”.

This reduces the size of the base client/server protocol packet, as
well as opens up for a generic -o,--override command line option (not
yet implemented).
</content>
</entry>
<entry>
<title>server: use config_clone() + config_override_apply()</title>
<updated>2021-06-23T13:12:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T11:18:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fa5cde6ce1a7c755c1d8215abdf46e5ec728392c'/>
<id>urn:sha1:fa5cde6ce1a7c755c1d8215abdf46e5ec728392c</id>
<content type='text'>
When the connecting client overrides config options, clone the
server’s configuration, and then convert the overridden options to
config overrides, and apply them using config_override_apply().

When destroying the client, free the cloned config using the regular
config_free().
</content>
</entry>
<entry>
<title>server: don’t clone the config unless we’re going to modify it</title>
<updated>2021-06-17T16:11:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-17T16:11:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7d2770f154906a3452867f15af74008057430265'/>
<id>urn:sha1:7d2770f154906a3452867f15af74008057430265</id>
<content type='text'>
</content>
</entry>
<entry>
<title>main/client: change exit code</title>
<updated>2021-05-04T08:41:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-01T08:46:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=da923100cad1000252c87b02a4132ce5878a28ec'/>
<id>urn:sha1:da923100cad1000252c87b02a4132ce5878a28ec</id>
<content type='text'>
* foot exits with -26/230
* footclient exits with -36/220

This is to give each application a range of exit codes. Currently
unused, but we may want to change this in the future.
</content>
</entry>
<entry>
<title>foot/footclient: use a custom exit code when foot/footclient fail to run</title>
<updated>2021-05-04T08:40:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-30T20:47:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a1b41bd186147f3f028030e9079821d0bfa7b3f6'/>
<id>urn:sha1:a1b41bd186147f3f028030e9079821d0bfa7b3f6</id>
<content type='text'>
Normally, foot and footclient uses the exit code from the client
application (i.e. the shell).

However, foot (or footclient) itself may fail to run; if run outside
of a Wayland session, or no fonts are installed, or the client
application/shell cannot be found (“foot lsdjfldsjf”) etc.

Up until now, there has been no way to differentiate these kind of
failures from the client application exiting with code 1.

This patch changes foot’s failure exit code to -27/229, and
footclient’s to -28/228. Note that footclient will exit with foot’s
-27/229 if footclient ran successfully, but the foot server failed to
instantiate a new window.

Closes #466.
</content>
</entry>
<entry>
<title>fix code style issues and memory leak</title>
<updated>2021-03-13T11:01:38Z</updated>
<author>
<name>Felipe Trzaskowski</name>
<email>felipe.trzaskowski@gmail.com</email>
</author>
<published>2021-03-13T10:41:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2dc13cc13b0a8367c12dd217e3e5e08176e2e7ce'/>
<id>urn:sha1:2dc13cc13b0a8367c12dd217e3e5e08176e2e7ce</id>
<content type='text'>
</content>
</entry>
</feed>
