Commit Graph
8 Commits
Author SHA1 Message Date
lotherk 3eddc96fbe dtfile: the network list asks again when the first browse is empty (t0305)
The empty computer list was not the layout: with MCDE_NET_DEBUG the browse in
the view reports n=3, an XmList that is managed with 3 items, 136x181 and
visibleItemCount 10, and clicking a host fills the right list (SFTP, SSH,
SMB).  The earlier empty window was the first browse after the start: it can
come back before avahi has resolved the services it found (only the "+"
lines, no "=" ones), and the view kept the empty result until Refresh.

Browse now asks once more after two seconds when it found no computer, and
Refresh resets that so a manual refresh may retry too.  The debug line (n,
list and item count, geometry) stays behind MCDE_NET_DEBUG.

Measured (Xvfb :78, avahi-publish of mcdetest on kitt.local, HOME with an
empty Network folder, ttsession): list "N95, lotherk's MacBook Air, KITT",
note "3 computers found."; KITT selected shows Files (SFTP), Terminal (SSH),
SMB; Terminal (SSH) runs the dtterm stub with
	-title KITT -e ssh -- kitt.local
-- from the network view, no shell, the host after "--".  Screenshots
/tmp/opencode/netview-window.png and netview-ssh.png; make mcde-linux
MCDE_DIRS="install programs/dtfile" exit=0.
2026-11-16 13:33:42 +00:00
lotherkandClaude Sonnet 5.5 cc770d000e dtfile: a mount no longer freezes the window; Connecting dialog, Cancel, Dtfile*connectTimeout (t0080 item 4)
mcde_sys_net_mount ran in the Xt callback and waited for sshfs/mount_afp
without a limit: a server that is gone froze the window for as long as the
tool lived (measured: the call returns after 20.0 s with a tool that sleeps
20 s; with one that never ends, never).

McdeSys: mcde_sys_net_mount_start/_job_fd/_job_finish/_job_cancel.  The tool
runs under a runner process (its own process group) that writes the answer
to a pipe: dtfile sets SIGCHLD to SIG_IGN (Main.c), where waitpid gives no
status.  mcde_sys_net_mount and _start share one plan (MountPlanFor).
test_job (make check, 5 of 5 pass) covers success, failure, a missing tool,
a password on stdin, and cancel with the tool AND what it started gone, with
SIGCHLD default and ignored; without the group kill it fails (mutant run).

dtfile: _McdeNetMount (NetView.c) for all three mounts (network view,
Connect to Server, column view): a modal "Connecting ..." dialog with Cancel
(also close button and Escape), the descriptor as Xt input (no timer
polling), one time-out, Dtfile*connectTimeout, 20 s, 3..600 (app-defaults,
man page).

Measured (real dtfile on Xvfb, fake sshfs that sleeps 40 s, connectTimeout
4): the dialog shows and repaints when moved; the time-out gives "Could not
connect: The server did not answer within 4 seconds.", Escape gives
"Could not connect: Cancelled."; sleep processes while connecting 1, after
the time-out 0, after Escape 0; no dialog left.  One first run showed a 40 s
stall of the whole session after Return (import blocked too); not
reproduced in three further runs, cause unknown.  Cross compile for NetBSD
(x86_64--netbsd-gcc, the build's flags): netmount.c and NetView.c without a
warning; common.c's old settimeofday declaration warning is not new.  Not
done: the NFS and AFP tools (only sshfs was faked), the afp://10.255.255.1/
case of the task with a real mount_afp.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 00:28:27 +00:00
lotherkandClaude Sonnet 5.5 d53ea094e7 licence: CNCL for what Makronix wrote itself
LICENSE at the root; the 103 files new in ext/src/mcde (none was in the CDE
import) carry the CNCL line instead of the LGPL notice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 11:48:02 +00:00
lotherk de97c91087 MCDE dtfile: Connect to Server as a dialog of its own (t0147)
Command+K and the network view's "Connect to Server:" now open the
reference's dialog: "Server Address:" with the field, "+" that keeps the
address, an option menu of the servers used before, "Favorite Servers:" as
a list with Remove, and Browse (the network view, as before) and Connect
(Return).  The favourites are one address a line in ~/.dt/servers, the
history the last ten in ~/.dt/servers.recent, newest first; the field opens
with the newest.

Connect accepts sftp://, nfs:// and afp:// (an address without a scheme is
an sftp one) and mounts through the network view's parse and MountPoint +
mcde_sys_net_mount, so the mount points stay ~/Network/HOST[/NAME]; the
dialog names the reason under the field and keeps the address when it
fails, and remembers the address and goes to the folder when it works.

Measured under Xvfb with xdotool: "sftp://beispiel.local/x" typed and "+"
writes it into ~/.dt/servers (cat) and the list shows it;
"nfs://127.0.0.1/nope" and Return leaves the dialog open with "Could not
connect: /sbin/mount_nfs did not succeed (status 32)."; the picture
(docs/screenshots/leopard/Finder-Connect-to-Server-mcde.png) shows the
dialog with two favourites and the address from the history.

Open: the Recent menu is an option menu filled when it opens
(FillHistory), but a click on it did not post in the Xvfb session, so the
menu was not shown in a picture -- a cascade button outside a menu bar did
not post either.  No "?" help button, no smb:// (mount_smbfs and nsmb.conf
are a task of their own), and a server that wants a password is still the
network view's password dialog, not this one's.
2026-11-14 08:28:14 +00:00
lotherkandClaude Opus 5.5 40f0cdaaee MCDE: no ssh option injection from mDNS -- McdeSys keeps only good host names, dtfile starts ssh without a shell
Review 2026-11-13 (tasksd t0076): dtfile's network view ran
system("dtterm -title '%s' -e ssh '%s' &") with the mDNS service name and
host target, and its comment said McdeSys had checked the host -- it had
not: mcde_sys_net_add() only copied it.  A host advertising _ssh._tcp with
the target "-oProxyCommand=..." reached ssh as an option, and ssh runs a
ProxyCommand through a shell.

- netmount.c mcde_sys_net_add(): GoodHost() once for every name from the
  network (no leading -, letters/digits/. - _ : only); control characters
  in the free-text service name become ?.
- NetView.c: SshTerminal() forks and execs dtterm -e ssh -- HOST, no shell,
  detached by a second fork (daemon(3) pattern); no system() is left in
  the MCDE programs.
- test_netmount (make check): 12 host names, kept or dropped as expected,
  and the control character; PASS with test_sysinfo
  (build/logs/mcde-linux-netview-2026-11-13.log; dtfile builds).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:38:53 +00:00
lotherkandClaude Sonnet 5.5 edb0e6949c MCDE: Mac OS X keyboard shortcuts through the desktop (Cmd+space dtlaunch, f.mcde_app, bar commands, dtterm/dtfile keys); fuse-afpfs-ng dropped from the build
The makronix set list is regenerated (46569 entries,
build/logs/x-userland-2026-11-13d.log); mcde-host exit=0
(build/logs/mcde-host-2026-11-13c.log).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 12:05:06 +00:00
lotherkandClaude Opus 5.5 ee91a9ffbc mcde: readable computer names in the network view; Remote Login's title
The names the computers announce are UTF-8; CDE's ISO 8859-1 interface
fonts showed a typographic quote as three wrong characters.  The usual
punctuation becomes ASCII before it is shown.  dtremotelogin names its
window "Remote Login", then after the computer, with an xterm title
sequence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:20:31 +00:00
lotherkandClaude Opus 5.5 6de349e604 mcde: dtfile: Network, a browser for the computers around
"Network" in the sidebar shows, in place of the work area: the
computers that announce themselves by DNS-SD (McdeSys), what the chosen
one offers -- its files by SFTP, a terminal by SSH, its NFS exports, its
SMB shares (listed; NetBSD has no SMB client that mounts) -- and
"Connect to Server:" for sftp://, nfs:// and afp:// addresses.  A share
is mounted on ~/Network/HOST[/NAME] and opened in the window; a server
that wants a password gets a dialog whose field shows stars, and the
mount is tried again with it.  Finding takes a few seconds and runs once
the view is drawn; going to any folder leaves the view.

Measured on Xvfb (build/mcde-shots/df-*.png): Network found the 4
computers of the LAN, by the names they give; KITT listed its SMB share
"nobody"; Connect to sftp://localhost without a key asked for the
password (nothing mounted).  Through McdeSys on the host:
sftp://127.0.0.1/.../www mounted with the user's key, its files were
there, and it was unmounted again.  Not measured: NFS and AFP mounts,
and anything of this on NetBSD past the build (no LAN in the VM).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:54:19 +00:00