* Description 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 - 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.
Created attachment 237689 [details] nodm-0.7 ebuild I need help with working out all the dependencies. I've had a look at the Debian package and it lists xinit, x11-common and x11-xserver-utils as dependencies. I've listed xinit in RDEPEND but I'm not sure what the other two packages translate to in Gentoo. So don't be surprised if your running some sort of minimal X setup and nodm doesn't work.
Created attachment 237693 [details] nodm init.d nodm uses it's own init.d script, you'll first need to stop the xdm script and then remove it from any runlevels. I need help with working out a correct depend() for the init.d script. Currently it just depends on local which isn't very good. This will not be an issue if I successfully get nodm to start via the default xdm script just like kdm or gdm.
Created attachment 237695 [details] nodm conf.d There are six conf.d variables available but you mostly likely only need to set 'NODM_USER' and 'NODM_XSESSION'. These set the user to auto login and the X session to start respectively. The 'NODM_MIN_SESSION_TIME' variable is also useful as it sets the minimum time that a session should last to be considered successful. nodm will restart the session if it lasts less than this time. The default is 60 but I've currently set it to 0 to restart immediately if the session (XBMC in my case) crashes or exits.
Hello, The Gentoo Team would like to firstly thank you for your ebuild submission. We also apologize for not being able to accommodate you in a timely manner. There are simply too many new packages. Allow me to use this opportunity to introduce you to Gentoo Sunrise. The sunrise overlay[1] is a overlay for Gentoo which we allow trusted users to commit to and all users can have ebuilds reviewed by Gentoo devs for entry into the overlay. So, the sunrise team is suggesting that you look into this and submit your ebuild to the overlay where even *you* can commit to. =) Thanks, On behalf of the Gentoo Sunrise Team, Michael Weber. [1]: http://www.gentoo.org/proj/en/sunrise/ [2]: http://overlays.gentoo.org/proj/sunrise/wiki/SunriseFaq
Created attachment 240769 [details] nodm-0.7 ebuild Minor update to pkg_postinst message.
Hi. I'm using nodm on my HTPC for some time. I've made my own ebuild for it because i wasn't aware of this one (or even it wasn't here since then). I have a question: why do you want to use another init script for that? Why we cannot use original init.d/xdm? We just need to set DISPLAYMANAGER="nodm" in xdm and voila! Ok, for making it working ootb we need to wrap it into some kind of launcher (nodm cannot fork into background). My idea is to make kind of nodm-wrapper which will source /etc/nodm.conf file with all needed variables set there: # nodm.conf NODM_USER=nobody NODM_X_OPTIONS="vt7 -nolisten tcp" and #!/bin/sh source /etc/nodm.conf /usr/sbin/nodm &
(In reply to comment #6) > I have a question: why do you want to use another init script for that? > Why we cannot use original init.d/xdm? I'm aware that using the xdm script works, but I didn't know how to integrate it with the nodm environment variables. > My idea is to make kind of nodm-wrapper which will source /etc/nodm.conf file > with all needed variables set there: Seems like a great idea. I will try it and report my findings.
Greg, I tested your idea and I can get nodm to start an X session, but not without some problems. - Since we use a wrapper, the xdm script doesn't know the pid of nodm and is then unable to stop or restart it. - It's unintuitive for users to set DISPLAYMANAGER to 'nodm-wrapper'. It needs to be set to 'nodm'. I think some progress has been made, but we need to sort out these issues.
(In reply to comment #8) > - Since we use a wrapper, the xdm script doesn't know the pid of nodm and is > then unable to stop or restart it. Probably doing: exec nodm instead of nodm & Will do the job :) exec replaces current process (our nodm-wrapper script) with new one (the nodm), so pid stays the same and we are able to stop it. > - It's unintuitive for users to set DISPLAYMANAGER to 'nodm-wrapper'. It needs > to be set to 'nodm'. Yep :( One thing comes to my mind: put original nodm somewhere in /usr/libexec, and put our wrapper script in /usr/bin/nodm > I think some progress has been made, but we need to sort out these issues. Yeah!
(In reply to comment #9) But the best thing is to make changes (forking and config loading) inside nodm and (eventually) ask author to apply them.
(In reply to comment #9) Using exec also doesn't work since it then leaves the process in the foreground. We would also need to create the pid file ourselves since nodm doesn't.
(In reply to comment #10) > But the best thing is to make changes (forking and config loading) inside nodm > and (eventually) ask author to apply them. I agree. It would be too much of a hack to get it to work as it is.
Created attachment 263731 [details, diff] xdm support for nodm I got it to work without a wrapper script, but with modifications to the xdm script. I think we have a better chance of getting nodm support into Gentoo's xdm script, than getting the changes we need from upstream. I will contact the Gentoo dev responsible and see if I can get there feedback.
(In reply to comment #13) > Created an attachment (id=263731) [details] > xdm support for nodm > > I got it to work without a wrapper script, but with modifications to the xdm > script. > > I think we have a better chance of getting nodm support into Gentoo's xdm > script, than getting the changes we need from upstream. I will contact the > Gentoo dev responsible and see if I can get there feedback. > And I'll try to hack nodm sourcecode during the weekend to add forking ability ;) It should be trivial thing.
Created attachment 304487 [details] nodm-0.11 ebuild Version bump - New SRC_URI - Removed -Werror from CFLAGS
<rant> Were's the benefit over adding 'x:3:respawn:/bin/su -c "cd ~; /usr/bin/startx" - <username>' to /etc/inittab </rant> On a personal note, find additional starting X woodoo at http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=tree;f=x11-misc/trivdm/files;hb=HEAD
(In reply to comment #16) I find it much simpler. I just need to set the user to login with and X session to start. For my setup I also need to have the boot and X startup messages completely hidden which I can't do with inittab and startx.
Created attachment 308617 [details] nodm conf.d
Created attachment 308619 [details] nodm init.d
Created attachment 308621 [details] nodm-0.11 ebuild Changes: - Upstream dropped xinit dependency. - Use system-local-login for pam instead of system-auth. This is useful when the consolekit is installed and session is launched with ck-launch-session. The session will now be marked as local and active.
Created attachment 308623 [details, diff] xdm support for nodm