fixup! Add display server.

This commit is contained in:
Jonas 'Sortie' Termansen 2023-06-11 21:46:00 +02:00
parent 485e932deb
commit 7afc8f50df
5 changed files with 176 additions and 18 deletions

View File

@ -9,6 +9,7 @@ CFLAGS?=$(OPTLEVEL)
CFLAGS:=$(CFLAGS) -Wall -Wextra
PROGRAM=display
MANPAGES1 = display.1
OBJS=\
connection.o \
@ -29,6 +30,8 @@ install: all
mkdir -p $(DESTDIR)$(SYSCONFDIR)/default
printf '#!sh\nexec terminal\n' > $(DESTDIR)$(SYSCONFDIR)/default/displayrc
chmod +x $(DESTDIR)$(SYSCONFDIR)/default/displayrc
mkdir -p $(DESTDIR)$(MANDIR)/man1
install $(MANPAGES1) $(DESTDIR)$(MANDIR)/man1
$(PROGRAM): $(OBJS)
$(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $(OBJS) -o $@ $(LIBS)

146
display/display.1 Normal file
View File

@ -0,0 +1,146 @@
.Dd June 11, 2023
.Dt DISPLAY 8
.Os
.Sh NAME
.Nm display
.Nd desktop environment
.Sh SYNOPSIS
.Nm
.Op Ar session ...
.Sh DESCRIPTION
.Nm
is a desktop environment and windowing system compositor.
Applications talk to the
.Nm
server process to receive user input and show their graphical user interfaces
in windows.
.Pp
The user's preferred startup applications are launched on startup by launching
the
.Xr session
program (if set) or otherwise the
.Xr displayrc 5
script in the background.
.Pp
.Nm
exits when Control + Alt + Delete is pressed.
.Pp
The keyboard shortcuts are as follows:
.Bl -tag -width "Control + Alt + Delete"
.It Alt + F4
Quit the current window.
.It Alt + F10
Maximize (or restore) the current window.
.It Alt + Tab
Switch to the next window.
.It Alt + Click + Drag
Drag the current window.
.It Control + Alt + Delete
Exit the desktop environment.
.It Control + Alt + T
Launch the
.Xr terminal 1
application.
.It Super + Left
Tile the current window leftwards.
.It Super + Right
Tile the current window rightwards.
.It Super + Up
Tile the current window upwards.
.It Super + Down
Tile the current window downwards.
.It F11
Grab input for the current window.
.It F12
Release the input grab on the current window.
.El
.Pp
Windows can be resized by dragging their edges.
Windows can be tiled by dragging them to the left, right, top, and bottom edges.
.Pp
The keyboard layout can be changed with the
.Xr chkblayout 1
program.
The display resolution can be changed with the
.Xr chvideomode 1
program.
.Sh ENVIRONMENT
.Bl -tag -width "HISTFILE"
.It Ev DISPLAY_SOCKET
.Nm
sets
.Ev DISPLAY_SOCKET
to the path of the
.Xr unix 4
socket where it listens for connections from applications.
Applications use
.Ev DISPLAY_SOCKET
to connect to
.Nm
or
.Pa /run/display
by default.
.El
.Sh FILES
.Bl -tag -width 12345678 -compact
.It Pa ~/.displayrc , /etc/displayrc , /etc/default/displayrc
.Xr displayrc 5
script that spawns the user's preferred startup applications.
.It Pa /run/display
.Xr unix 4
socket where
.Nm
listens for connections from applications, as advertised in the
.Ev DISPLAY_SOCKET
environment variable.
.El
.Sh ASYNCHRONOUS EVENTS
.Bl -tag -width "SIGTERM"
.It Dv SIGTERM
Request daemon termination.
.El
.Sh EXIT STATUS
.Nm
runs as a
.Xr daemon 7
until stopped by
.Dv SIGTERM ,
the user explicitly exits the desktop environment, or an application asks
it to exit.
.Nm
signals readiness on the
.Ev READYFD
file descriptor when the display server is ready to receive connections from
applications.
.Nm
will exit non-zero on any fatal startup error.
.Sh EXAMPLES
.Nm
can be selected as the user's graphical user interface with this executable
.Pa ~/.session
script:
.Bd -literal -offset indent
#!/bin/sh
exec display
.Ed
.Pp
.Xr chkblayout 1 ,
.Xr chvideomode 1 ,
.Xr display 1
will run the
.Xr displayrc 5
script on startup, which can be used to start applications.
.Sh SEE ALSO
.Xr terminal 1 ,
.Xr displayrc 5 ,
.Xr session 5
.Sh BUGS
The following features are not yet implemented:
.Bl -bullet -compact
.It
Windows cannot be minimized.
.It
Applications cannot receive mouse events.
.It
The wallpaper is random and cannot be controlled.
.El

View File

@ -50,7 +50,7 @@ exec display
.Xr display 1
will run the
.Xr displayrc 5
script on startup, which can be used to start programs.
script on startup, which can be used to start applications.
.Ss Trianglix
.Xr trianglix 1
can be selected as the user's triangle environment with this executable

View File

@ -527,6 +527,7 @@ fragment instead.
.Sh SEE ALSO
.Xr chkblayout 1 ,
.Xr chvideomode 1 ,
.Xr display 1 ,
.Xr man 1 ,
.Xr fstab 5 ,
.Xr group 5 ,

View File

@ -14,26 +14,34 @@ The installation process is covered in
Bootable cdrom releases will offer the options of running a live environment,
installing the operating system, or upgrading an existing installation.
.Pp
You will be presented a with standard Unix command line environment upon login or
booting the live environment.
.Ss Shutdown
.Xr init 8
spawns a session after boot.
This is
.Xr login 8
if the system is booted in multi-user mode.
This is a root shell if booted in single-user mode.
You will be presented with a graphical Unix-like command line environment upon
login or booting the live environment.
.Ss Desktop Environment
The
.Xr display 1
desktop environment is automatically started when booting the live environment
or after logging into an installation.
.Pp
To power off the computer login as user
.Sy poweroff
or run
The desktop environment can be exited by pressing Control + Alt + Delete,
which will return to the login screen (in installations) or power off the
computer (in the live environment).
.Pp
A new
.Xr terminal 1
can be launched by pressing Control + Alt + F1.
.Pp
See
.Xr display 1
for all the available keyboard shortcuts.
.Ss Shutdown
To power off the computer, run
.Xr poweroff 8
after logging in.
To reboot the computer login as user
.Sy reboot
or run
or login as
.Sy poweroff .
To reboot the computter, run
.Xr reboot 8
after logging in.
or login as
.Sy reboot .
.Ss Keyboard Layout
The kernel has a default US keyboard layout compiled into it.
.Pp