Files
mcde/programs/dtsystemsettings/ui.h
T
lotherkandClaude Opus 5.5 64bfd2048f mcde: Sharing in System Settings: SSH, SMB, NFS, AFP, AppleTalk
McdeSys gets the services that let others in (mcde_sys_service_state,
mcde_sys_service_set) and one list of shared folders for SMB, NFS and AFP
(mcde_sys_shares, mcde_sys_shares_set: /etc/mcde-shares, and a block
between "# MCDE shares begin" and "... end" in exports, smb.conf and
afp.conf; the rest of each file stays as written).  NetBSD switches
rc.conf and runs the rc.d scripts -- sshd; rpcbind, mountd, nfsd and
nfslocking for NFS; samba, netatalk, atalkd and papd from pkgsrc, whose
example rc.d scripts are copied to /etc/rc.d first, as PKG_RCD_SCRIPTS=YES
would.  Linux uses systemctl (ssh, smbd and nmbd, nfs-server, netatalk;
no AppleTalk).  NetBSD's kernel has AppleTalk (GENERIC: options NETATALK)
and pkgsrc's netatalk4 builds atalkd on NetBSD.  docs/reference/sharing.txt.

The Sharing pane (Internet & Network) shows each service with its switch
and how others reach it (ssh host, smb://host/, host:/folder,
afp://host/), and the shared folders with Add and Remove; as a user it
offers Unlock..., as Accounts does.

Measured: on the Linux host, read only: ssh, smb, nfs installed, enabled,
running; afp and appletalk not installed (the pane on Xvfb says so).  In
the build VM as root: NFS on started rpcbind, mountd, nfsd, statd, lockd;
sharing /tmp/mcdeshare made showmount -e list it for Everyone; NFS off
stopped them; the VM's rc.conf was restored after.  First found there:
mountd will not start without /etc/exports, and statd/lockd are one
script, nfslocking.  Samba and netatalk are not in the makronix set yet.

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

65 lines
2.5 KiB
C

/*
* ui.h -- dtsystemsettings: what the panes share (main.c)
*
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
*/
#ifndef _dtsystemsettings_ui_h
#define _dtsystemsettings_ui_h
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
extern XtAppContext app;
XmRenderTable PaneFont(Widget w, int size, Boolean bold);
Widget Text(Widget parent, const char *name, const char *text);
void SetText(Widget w, const char *text);
Widget Button(Widget parent, const char *label, XtCallbackProc cb,
XtPointer data);
Widget PaneButton(Widget parent, const char *label, XtCallbackProc cb,
XtPointer data);
Widget Table(Widget parent, const char *const *rows, int n, Widget *values);
Pixmap Icon(Widget w, const char *file);
void Spawn(const char *command);
/* a message in a small window; ERROR: an error */
void Message(Widget parent, const char *text, int error);
/* the command line that runs COMMAND as root in a terminal, after su(1)
* asked for the password there ("Unlock..."); into BUF */
void AsRoot(const char *title, const char *command, char *buf, size_t len);
/* the panes in accounts.c and update.c */
Widget MakeAccounts(Widget parent);
Widget MakeUpdate(Widget parent);
/* the value of a resource in the server's RESOURCE_MANAGER, read anew
* (Xlib keeps the string of the connection's start); DEF when none */
void ServerResource(Display *dpy, const char *name, const char *class,
const char *def, char *buf, size_t len);
/* the pane in desktop.c, opened on its desktop or its screen saver page */
Widget MakeDesktop(Widget parent);
Widget MakeScreenSaver(Widget parent);
/* the Wi-Fi part of the Network pane (wifi.c); NULL without a Wi-Fi card */
Widget MakeWifi(Widget parent);
/* dtsystemsettings -join-wifi IF [SSID in hex]: the terminal of "Join..." */
int JoinWifiCommand(const char *ifname, const char *hexssid);
/* the Sharing pane (sharing.c) */
Widget MakeSharing(Widget parent);
/* the Startup pane (startup.c) */
Widget MakeStartup(Widget parent);
/* the time zone in Date & Time (timezone.c) */
Widget MakeZoneChooser(Widget parent);
/* dtsystemsettings -set-timezone ZONE: what the terminal of "Set Time Zone"
* runs */
int SetTimezoneCommand(const char *zone);
/* the panes in appearance.c */
Widget MakeAppearance(Widget parent);
Widget MakeFonts(Widget parent);
/* the panes in input.c */
Widget MakeKeyboard(Widget parent);
Widget MakeMouse(Widget parent);
/* dtsystemsettings -apply-update: what the terminal of "Update Now" runs */
int ApplyUpdate(void);
#endif /* _dtsystemsettings_ui_h */