From 08b581914d0be375598aa83502f424fd23156b38 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Tue, 13 Jun 2023 23:34:13 +0200 Subject: [PATCH] fixup! Add display server. --- display/Makefile | 3 ++ display/display.1 | 2 +- display/displayrc.5 | 77 +++++++++++++++++++++++++++++++++++++++++++ share/man/man5/init.5 | 4 +-- 4 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 display/displayrc.5 diff --git a/display/Makefile b/display/Makefile index 001f087b..8eb7ea2b 100644 --- a/display/Makefile +++ b/display/Makefile @@ -10,6 +10,7 @@ CFLAGS:=$(CFLAGS) -Wall -Wextra PROGRAM=display MANPAGES1 = display.1 +MANPAGES5 = displayrc.5 OBJS=\ connection.o \ @@ -32,6 +33,8 @@ install: all chmod +x $(DESTDIR)$(SYSCONFDIR)/default/displayrc mkdir -p $(DESTDIR)$(MANDIR)/man1 install $(MANPAGES1) $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + install $(MANPAGES5) $(DESTDIR)$(MANDIR)/man5 $(PROGRAM): $(OBJS) $(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $(OBJS) -o $@ $(LIBS) diff --git a/display/display.1 b/display/display.1 index cf64df64..b4d202be 100644 --- a/display/display.1 +++ b/display/display.1 @@ -80,7 +80,7 @@ The display resolution can be changed with the .Xr chvideomode 1 program. .Sh ENVIRONMENT -.Bl -tag -width "HISTFILE" +.Bl -tag -width "DISPLAY_SOCKET" .It Ev DISPLAY_SOCKET .Nm sets diff --git a/display/displayrc.5 b/display/displayrc.5 new file mode 100644 index 00000000..e110f223 --- /dev/null +++ b/display/displayrc.5 @@ -0,0 +1,77 @@ +.Dd June 11, 2023 +.Dt DISPLAYRC 5 +.Os +.Sh NAME +.Nm displayrc +.Nd startup graphical applications +.Sh SYNOPSIS +.Nm ~/.displayrc +.Nm /etc/displayrc +.Nm /etc/default/displayrc +.Sh DESCRIPTION +.Xr display 1 +runs the +.Nm +script to launch the user's startup applications and prepare the desktop +environment according to the user's preferences. +.Pp +.Xr display 1 +continues running after +.Nm +finishes running and any launched applications should be run as background +processes. +.Pp +The +.Nm +script is found by searching for an executable script in the following paths: +.Bl -bullet -compact +.It +.Pa ~/.displayrc +.It +.Pa /etc/displayrc +.It +.Pa /etc/default/displayrc +.El +.Pp +.Nm +is not executed if no script is found. +.Sh ENVIRONMENT +.Nm +is executed with the following environment: +.Bl -tag -width "DISPLAY_SOCKET" +.It Ev DISPLAY_SOCKET +The path of the +.Xr unix 4 socket +where +.Xr display 1 +is listening for connections from applications. +.El +.Sh FILES +.Bl -tag -width "/etc/default/displayrc" -compact +.It Pa ~/.displayrc +The user's +.Nm +script. +.It Pa /etc/displayrc +The system administor provided +.Nm +script. +.It Pa /etc/default/displayrc +The operating system provided +.Nm +script. +.El +.Sh EXAMPLES +Launch a terminal with a text editor, another terminal with the user's default +shell, and launch the asteroids game. +.Bd -literal -offset indent +terminal editor & +terminal & +asteroids & +.Ed +.Sh SEE ALSO +.Xr display 1 , +.Xr terminal 1 , +.Xr profile 5 , +.Xr session 5 , +.Xr shrc 5 diff --git a/share/man/man5/init.5 b/share/man/man5/init.5 index 0453005c..2e4c3688 100644 --- a/share/man/man5/init.5 +++ b/share/man/man5/init.5 @@ -122,7 +122,7 @@ Like but runs the root shell in .Xr terminal 1 inside the -.Xr display 8 +.Xr display 1 graphical user interface environment. This operating system mode is insecure because it boots straight to root access without a password. @@ -145,7 +145,7 @@ Like but runs it in .Xr terminal 1 inside the -.Xr display 8 +.Xr display 1 graphical user interface environment. This operating system mode is insecure because it boots straight to root access without a password.