From 9492ee4ffe7afa9671bed3c00a34993ce321f98b Mon Sep 17 00:00:00 2001 From: lotherk Date: Tue, 17 Nov 2026 07:11:29 +0000 Subject: [PATCH] dtchat: install the program, headless mode and manual, and list them in the PLIST (T10.6) bin_PROGRAMS now installs dtchat and dtchat-headless; man_MANS installs dtchat.1 (the roff source was renamed from dtchat.man because automake treats .man as section m). The PLIST gains the lines for bin/dtchat, bin/dtchat-headless, app-defaults/C/Dtchat, the three Dtchat icons, appconfig/types/C/dtchat.dt, appmanager/C/Internet/Dtchat, the C and de_DE.UTF-8 dtchat.cat and dt/man/man1/dtchat.1. Verification (make mcde-host MCDE_DIRS=install, mcde-plist-check, pkg_add/pkg_delete) is pending: a foreign release chain holds the lock (pid 141722). --- pkgsrc/PLIST | 11 +++ programs/dtchat/Makefile.am | 6 +- programs/dtchat/dtchat.1 | 144 ++++++++++++++++++++++++++++++++++++ 3 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 programs/dtchat/dtchat.1 diff --git a/pkgsrc/PLIST b/pkgsrc/PLIST index f7eb3f48..a8102b9c 100644 --- a/pkgsrc/PLIST +++ b/pkgsrc/PLIST @@ -3,6 +3,7 @@ bin/startcde dt/app-defaults/C/Dt dt/app-defaults/C/Dtbuilder dt/app-defaults/C/Dtcalc +dt/app-defaults/C/Dtchat dt/app-defaults/C/Dtcm dt/app-defaults/C/Dtcreate dt/app-defaults/C/Dtfile @@ -102,6 +103,7 @@ dt/appconfig/appmanager/C/Graphics/inkscape dt/appconfig/appmanager/C/Graphics/okular dt/appconfig/appmanager/C/Graphics/xv dt/appconfig/appmanager/C/Information/OpenDtIntro +dt/appconfig/appmanager/C/Internet/Dtchat dt/appconfig/appmanager/C/Internet/chromium dt/appconfig/appmanager/C/Internet/firefox dt/appconfig/appmanager/C/Internet/nxclient @@ -1473,6 +1475,9 @@ dt/appconfig/icons/C/Dthtop.t.bm dt/appconfig/icons/C/Dthtop.t.pm dt/appconfig/icons/C/Dthtop.t_m.bm dt/appconfig/icons/C/Dthvol.m.bm +dt/appconfig/icons/C/Dtchat.l.pm +dt/appconfig/icons/C/Dtchat.m.pm +dt/appconfig/icons/C/Dtchat.t.pm dt/appconfig/icons/C/Dthvol.m.pm dt/appconfig/icons/C/Dthvol.m_m.bm dt/appconfig/icons/C/Dthvol.t.bm @@ -2463,6 +2468,7 @@ dt/appconfig/types/C/dreamchess.dt dt/appconfig/types/C/dt.dt dt/appconfig/types/C/dtappman.dt dt/appconfig/types/C/dtbuilder.dt +dt/appconfig/types/C/dtchat.dt dt/appconfig/types/C/dtcm.dt dt/appconfig/types/C/dtfile.dt dt/appconfig/types/C/dthelp.dt @@ -2543,6 +2549,8 @@ dt/bin/dtbackup dt/bin/dtbar ${PLIST.appbuilder}dt/bin/dtbuilder dt/bin/dtcalc +dt/bin/dtchat +dt/bin/dtchat-headless dt/bin/dtchooser dt/bin/dtcm dt/bin/dtcm_delete @@ -2771,6 +2779,7 @@ dt/lib/nls/msg/C/dtact.cat dt/lib/nls/msg/C/dtbar.cat dt/lib/nls/msg/C/dtbuilder.cat dt/lib/nls/msg/C/dtcalc.cat +dt/lib/nls/msg/C/dtchat.cat dt/lib/nls/msg/C/dtcm.cat dt/lib/nls/msg/C/dtcodegen.cat dt/lib/nls/msg/C/dtconfig.cat @@ -2827,6 +2836,7 @@ ${PLIST.docs}dt/man/man1/dtappintegrate.1 ${PLIST.docs}dt/man/man1/dtbuilder.1 ${PLIST.docs}dt/man/man1/dtcalc.1 ${PLIST.docs}dt/man/man1/dtchooser.1 +${PLIST.docs}dt/man/man1/dtchat.1 ${PLIST.docs}dt/man/man1/dtcm.1 ${PLIST.docs}dt/man/man1/dtcm_delete.1 ${PLIST.docs}dt/man/man1/dtcm_editor.1 @@ -7711,6 +7721,7 @@ ${PLIST.nls}dt/lib/nls/msg/de_DE.UTF-8/dt.cat ${PLIST.nls}dt/lib/nls/msg/de_DE.UTF-8/dtact.cat ${PLIST.nls}dt/lib/nls/msg/de_DE.UTF-8/dtbar.cat ${PLIST.nls}dt/lib/nls/msg/de_DE.UTF-8/dtcalc.cat +${PLIST.nls}dt/lib/nls/msg/de_DE.UTF-8/dtchat.cat ${PLIST.nls}dt/lib/nls/msg/de_DE.UTF-8/dtcm.cat ${PLIST.nls}dt/lib/nls/msg/de_DE.UTF-8/dtconfig.cat ${PLIST.nls}dt/lib/nls/msg/de_DE.UTF-8/dtcopy.cat diff --git a/programs/dtchat/Makefile.am b/programs/dtchat/Makefile.am index c88087c9..a2e89c20 100644 --- a/programs/dtchat/Makefile.am +++ b/programs/dtchat/Makefile.am @@ -1,7 +1,9 @@ MAINTAINERCLEANFILES = Makefile.in -bin_PROGRAMS = dtchat -noinst_PROGRAMS = dtchat-demo dtchat-irc dtchat-headless +bin_PROGRAMS = dtchat dtchat-headless +noinst_PROGRAMS = dtchat-demo dtchat-irc + +man_MANS = dtchat.1 dtchat_CPPFLAGS = -I$(top_srcdir)/include \ -I$(top_srcdir)/lib/libDtChat -I$(top_builddir)/lib/libDtChat \ diff --git a/programs/dtchat/dtchat.1 b/programs/dtchat/dtchat.1 new file mode 100644 index 00000000..e47b90fe --- /dev/null +++ b/programs/dtchat/dtchat.1 @@ -0,0 +1,144 @@ +.TH DTCHAT 1 "17 November 2026" "MCDE" "MCDE User Commands" +.SH NAME +dtchat, dtchat-headless \- chat over IRC, XMPP, the local network, and +Telegram or WhatsApp through their helpers +.SH SYNOPSIS +.B dtchat +.RB [ \-\-demo ] +.RB [ \-\-local +.RB [ \-\-config +.IR dir ] +.RB [ \-\-listen +.IR [host:]port ] +.RB [ \-\-peer +.IR host:port ] +.RB [ \-\-downloads +.IR dir ] ] +.RB [ \-\-smoke-test ] +.PP +.B dtchat-headless +.RB [ \-\-config +.IR dir ] +.RB [ \-\-listen +.IR [host:]port ] +.RB [ \-\-peer +.IR host:port ] ... +.SH DESCRIPTION +.B dtchat +is MCDE's chat program: a Motif window with the roster on the left and the +conversation on the right. It talks to IRC and XMPP through adapter +processes and to another dtchat on the same network with a local TLS +connection; Telegram and WhatsApp are separate helper packages. +.PP +The local mode is started with +.BR \-\-local . +It loads or creates the identity in +.I ~/.dt/dtchat/identity.json +(an Ed25519 key, a self-signed certificate and its SHA-256 pin), listens on a +TLS port and connects to the peers named with +.BR \-\-peer . +The Nearby section lists the peers it has seen or paired with. A first +contact shows a six-digit code: compare it on both machines and choose +\fBCodes match\fR; only then is the peer's pin stored in +.IR peers.json . +A changed pin blocks the peer until a new code is confirmed. Text is allowed +before pairing; files only after it. +.PP +.B dtchat-headless +runs the same local protocol without a display. Events are one JSON object +per line on standard output, commands are JSON lines on standard input: +.PP +.RS +.nf +{"event":"ready","listen":4711,...} +{"event":"message","from":"","text":"hello"} +{"cmd":"send","peer":"host:port","text":"hello"} +{"cmd":"quit"} +.fi +.RE +.SH OPTIONS +.TP +.B \-\-local +Start the local peer mode in the window (identity, listener, links). +.TP +.BI \-\-config " dir" +The state directory (default +.IR ~/.dt/dtchat ). +It is 0700; identity.json, peers.json, accounts.json and secrets.json are +0600. +.TP +.BI \-\-listen " [host:]port" +The local listener. The default is 127.0.0.1 on an ephemeral port; name a +LAN address explicitly to accept peers from the network. +.TP +.BI \-\-peer " host:port" +A peer to connect to (repeatable). +.TP +.BI \-\-downloads " dir" +Where received files are written (default: the state directory). Files are +written as NAME.part, verified (size and SHA-256) and renamed without +overwriting. +.TP +.B \-\-demo +Show the demo echo adapter and the sample conversations; no network. +.TP +.B \-\-smoke-test +Map the window, run the built-in checks (selection, transcript, dialogs, +Nearby) and exit 0 or 1. Used by make tests. +.TP +.B \-\-perf-test +Build 50 conversations with 10,000 messages, select the last one and print +startup, selection, CPU, RSS and PSS. For the performance check. +.SH ENVIRONMENT +.TP +.B DISPLAY +The X display for +.BR dtchat . +.TP +.B DTCHAT_TLS_CA +A CA file for the IRC adapter (a private CA or a test server); the normal +chain and host name verification applies otherwise. +.SH FILES +.TP +.I ~/.dt/dtchat +The state directory (0700). +.TP +.I ~/.dt/dtchat/identity.json +The Ed25519 identity: public and private key, certificate, pin. Losing it +changes the identity; a copy is the backup. +.TP +.I ~/.dt/dtchat/peers.json +The pinned peers and their blocked state. +.SH EXAMPLES +Run the demo without a network: +.PP +.RS +dtchat \-\-demo +.RE +.PP +Two machines on the same LAN: +.PP +.RS +.nf +machine A: dtchat \-\-local \-\-listen 0.0.0.0:4711 +machine B: dtchat \-\-local \-\-peer A.local:4711 +.fi +.RE +.PP +Headless smoke test of the local protocol: +.PP +.RS +.nf +dtchat-headless \-\-config /tmp/a \-\-listen 127.0.0.1:0 > a.log & +dtchat-headless \-\-config /tmp/b \-\-peer 127.0.0.1:PORT > b.log & +.fi +.RE +.SH SEE ALSO +The adapter protocol in +.IR docs/reference/dtchat-adapter-protocol.txt , +the local protocol in +.IR docs/reference/dtchat-local-protocol.txt , +the security review in +.IR docs/reference/dtchat-security-review.txt . +.SH LICENSE +CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.