[pkg-fso-commits] [SCM] Automatic Display Manager branch, pamhelper, updated. debian/0.1-49-g86faae2

Enrico Zini enrico at enricozini.org
Mon Feb 23 16:41:14 UTC 2009


The following commit has been merged in the pamhelper branch:
commit 10b16b0b88553ebeb7cd8b05048afd201e98e789
Author: Enrico Zini <enrico at enricozini.org>
Date:   Mon Feb 23 14:52:54 2009 +0000

    Autotoolized
    
    Currently does not generate nodm-session.  I am going to replimplement that function using an environment variable

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..d3b32da
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,2 @@
+Enrico Zini <enrico at enricozini.org>
+Joachim Breitner <nomeata at debian.org>
diff --git a/Makefile b/Makefile
deleted file mode 100644
index f85232b..0000000
--- a/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-all: nodm nodm-session
-
-nodm: nodm.c
-	gcc -o $@ $< -lpam -lpam_misc -Wall
-
-nodm-session: nodm
-	ln -fs nodm nodm-session
-
-clean:
-	rm -f nodm
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..cb430bc
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,8 @@
+## Process this file with automake to produce Makefile.in
+
+bin_PROGRAMS = nodm
+
+nodm_SOURCES = nodm.c
+nodm_LDFLAGS = $(PAM_LIBS)
+
+EXTRA_DIST = test_nodm TODO
diff --git a/README b/README
new file mode 100644
index 0000000..630ec89
--- /dev/null
+++ b/README
@@ -0,0 +1,60 @@
+ * README for nodm
+
+nodm is a minimal display manager that simply logs in as a given user and
+starts an X session, without asking for username or password.
+
+On a normal computer, using nodm is a big security issue because it would give
+anyone access to the computer.
+
+However, there are cases where automatic login is needed: for example in an
+embedded system such as a mobile phone, or in a kiosk setup, or in a control
+panel for industrial machinery.  For those cases, nodm is simple to setup,
+lightweight, and it should do exactly the right thing.
+
+
+ * Features
+
+nodm is as small as it could be, and tries to provide the minimum amount of
+features needed to do a good job, following as much as possible the principle
+of least surprise.  This is what is offered:
+
+ - Automatic login with a fixed user, doing all that needs to be done like
+   setting up the session via PAM, updating lastlog, logging to syslog.
+ - X is started via /usr/bin/xinit and a standard X session script (by default,
+   /etc/X11/Xsession).
+ - The session is restarted when it exits.
+ - If a session exits too soon, nodm will wait a bit before restarting.  The
+   waiting time go as follow:
+    - The first time the session exits too soon, restart immediately
+    - The second and third time, wait 30 seconds
+    - All remaining times, wait 1 minute.
+   Once a session lasts long enough, the waiting time goes back to zero.
+
+nodm does NOT currently fork and run in the background like a proper daemon:
+most distributions have tools that do that, and nodm plays just fine with them.
+This is not a particular design choice: quite simply, so far no one has felt
+the need to implement it.
+
+
+ * Configuration
+
+Configuration is made via 5 environment variables:
+
+NODM_USER
+  Controls the user that is used to automatically log in.
+
+NODM_X_OPTIONS
+  Options to pass to the X server (for example: "vt7 -nolisten tcp")
+
+NODM_MIN_SESSION_TIME
+  Minimum time (in seconds) that a session should last in order for nodm to
+  decide that it has not quit too soon.  If an X session will run for less than
+  this time, nodm will wait an increasing bit of time before restarting it
+  (default: 60).
+
+NODM_XINIT
+  Path to the xinit program (default: /usr/bin/xinit)
+
+NODM_XSESSION
+  Path to the X session script (default: /etc/X11/Xsession)
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..0aafc3a
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,34 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(nodm, 0.2, [enrico at enricozini.org, nomeata at debian.org])
+AC_CONFIG_SRCDIR([configure.ac])
+AC_CONFIG_AUX_DIR([config])
+AM_INIT_AUTOMAKE([-Wall std-options foreign])
+AM_CONFIG_HEADER(config.h)
+
+dnl AC_GNU_SOURCE
+dnl AM_MAINTAINER_MODE
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_ISC_POSIX
+
+dnl Checks for header files.
+AC_HEADER_STDC
+
+dnl Checks for libraries.
+
+AC_CHECK_LIB(pam, pam_start,
+	[ PAM_LIBS="-lpam" ],
+	AC_MSG_ERROR(libpam is missing)
+)
+
+AC_CHECK_LIB(pam_misc, main,
+	[ PAM_LIBS="$LIBPAM -lpam_misc" ],
+	AC_MSG_ERROR(libpam_misc is missing)
+)
+AC_SUBST(PAM_LIBS)
+
+AC_CONFIG_FILES([
+	Makefile
+])
+AC_OUTPUT

-- 
Automatic Display Manager



More information about the pkg-fso-commits mailing list