A daemon that spawny sessions.
Clone or download
Latest commit 8341e95 Apr 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci back to the normal image Sep 17, 2017
data not needed anymore! Sep 17, 2017
src
subprojects let there be meson! Sep 12, 2017
.gitignore
AUTHORS added authors and copying file Nov 20, 2015
COPYING added authors and copying file Nov 20, 2015
README.md
meson.build relase mode Sep 20, 2017

README.md

spawny

CircleCI

Spawny presents a daemon which can prompt for logins on ttys. It is splitted up into multiple subsystems

Installation

To build the software you can just create a bin directory like build,

mkdir build

After that you can build and install the software by doing:

cd build

meson ..

ninja all

sudo ninja install

To get the sp-daemon to run on your system you need to enable and start the sp-daemon.socket unit by calling: systemctl enable sp-daemon.socket and systemctl start sp-daemon.socket

If you want to automatically get a greeter on system start you need to enable the sp-greeter-start unit by calling:

systemctl start sp-greeter-start.socket

sp-daemon

The daemon opens a socket and listens there for requests. If someone requests a new session or the displaying of a greeter, the following steps are done:

  • A new process is forked.
  • The new process calls setsid() so its a new session
  • A new tty console is opened and added, the process is attached as leader
  • The user is logged in using pam
  • Waiting for its new session to be activated
  • Starts up the greeter or the session-template which was applied

The daemon also loads its session-templates from /usr/share/xsessions, /usr/share/wayland-sessions and offers a tty template which just starts the users bash

A different greeter from the sp-fallback-greeter can be configured in the config file.

sp-fallback-greeter

This is a greeter that just uses the command line interface. It is used as fallback for the case a configured greeter crashes 3 times, or cannot be started / found.

The fallback greeter looks like that:

Fallback greeter

sp-greeter-set

Will set the passed greeter as the one that will get started after a sp-greeter-start call.

sp-greeter-start

Requests the daemon to start a greeter on the same seat where this process is in.

libsp_client

A little shared object library that abstracts the communication with the deamon. It can be used by other greeters, it is also used by sp-greeter-start and sp-fallback-greeter.

sp-protocol

The whole repository needs a few protobuf files to work correctly. This little static library brings in the generated files from the protobuf files and a few other functions that are used by the sp-daemon and the libsp_client.

sp-user-db(-utils)

There is one problem with the /etc/passwd file on linux systems. It is very static and you cannot add any additional data to them. For something like spawny and a graphical greeter it could be very usefull to have a user configured icon or prefered template to use. Those are the packages that are implementing that