You are not logged in.

#1 2012-06-15 17:55:41

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

NCDM - NCurses Display Manager [Alpha software, use with caution!]

NCurses Display Manager (NCDM) is, well, a display manager written in python. It also manages commandline sessions, so display or desktop probably is not the right word for the D part of the acronym. However, it is very much in an alpha state, so if you want to test it, put it on a computer where you're fine with it making mistakes.

Github page
Aur Page - Versioned
Aur Page - Git

Features:

  • Allow setting a background image for NCDM if it is provided and the TERM variable supplied IS fbterm NEW

  • Now you can set TERM from the /etc/inittab line for it. If you dont' know what you want, you should set it to linux (as the first argument to the wrapper) NEW

  • Disable root login if needed NEW

  • Allow select users to only log in once NEW

  • Allow customization of session list on a per user basis. See sys.cfg for more details.

  • List CLI and GUI sessions in *.csv files with the format "Name","Command". (The header MUST be there)

  • Autodetect available GUI sessions based on what is in /usr/share/xsessions and /etc/X11/sessions.

  • PAMless authentication.

  • List active sessions and switch between them.

  • Configure commands for hibernate, suspend, shutdown, and restart buttons

  • Color scheme configuration

  • Optional FBTerm and Consolekit support

  • Custom banner to welcome users

  • Always has an option for a login shell if cli.csv does not exist.

Dependencies:

  • python-urwid

  • Core python modules: crypt, spwd, pwd, grp, os, re, subprocess, platform, glob, csv

  • grep

  • xorg-xinit

  • xorg-sessreg

  • coreutils

  • kbd (for opening a virtual terminal and launching the cli session on there using openvt)

Optional dependencies:

  • python-dbus

  • consolekit

  • fbterm

  • fbv

Todo:

  • Port to python 3 once kinks are worked out. There is a branch that has the untested port in the github repo titled python3.

  • Register sessions programatically with python-utmp? So far the commented out code using python-utmp doesn't work
        (See http://korpus.juls.savba.sk/~garabik/so … README.txt. Somehow, it writes to wtmp only on my machine with the python-utmp code)
    Turned out it was a bit of a durp up on my end. I'll probably put it in later, but sessreg is pretty handy for this too.

  • Add custom markup support for banner?

  • Add more places for theming?

  • Remote login support? Pretty iffy.

  • Code in the portion to limiting users to one login through this

After installation: Read the post_install instructions very carefully. This could mess up your system.

Known bugs:

  • I know it has to do with the active sessions panel and seeing which tty some X display was on after a user logged in, but I keep missing the opportunity to do a ps aux and a who to check what I need to edit.

  • Somehow, startkde causes it to hang after it launches, forcing a restart of it to get it to be usable again. Restarting the hung NCDM also somehow kills the dbus session for it.

  • Somehow messes up UTF8 characters for ALL the ttys, not just its own. False alarm, see this.

Screenshots can be found on the NCDM wiki
____
Regarding the background image setup:
For most people, you would want to have a line for NCDM like this:

c1:12345:respawn:/usr/bin/ncdm tty1 linux

To add a background image, simply change that line to something like this:

c1:12345:respawn:/usr/bin/ncdm tty1 fbterm /path/to/your/image.ext

[EDIT] Due to some recent change, if you want to add a background image manually now for the login manager, specify it as FBIMG in /etc/ncdm/sys.cfg and remove it from your inittab line.

If logging into CLI sessions and switching sessions don't work for you after you enable fbterm support, do the following:

sudo setcap cap_dac_read_search,cap_sys_tty_config+ep /usr/bin/chvt #for switching sessions
sudo setcap cap_dac_read_search,cap_sys_tty_config+ep /usr/bin/openvt #for opening CLI sessions

For more information, see the Arch Wiki page on file capabilities

Last edited by ShadowKyogre (2012-06-23 04:38:38)


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

#2 2012-06-20 21:52:44

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

Re: NCDM - NCurses Display Manager [Alpha software, use with caution!]

After getting the tweaks worked out in PAM authentication, the PAM-enabled version of this is up at ncdm-pam-git. This depends on pypam2, which is also uploaded on here: pypam2. For the most optimal experience, once should use, pam-lastlogutmp, a patched version of pam which allows pam_lastlog to write to utmp as well as the other places it usually writes (it isn't an official dependency since I'm still waiting to see if the PAM developers upstream will accept the patch).

The code will soon be ported to python 3 now that everything seems to be working in both the pam and non-pam versions.

[EDIT] Both the pam and non-pam versions have been ported to python3. Instead of pypam2, you should install pypam for the pam version.

[EDIT] Both the pam and non-pam versions have been updated to log /var/log/ncdm.log for program operations (including silly mistakes I probably haven't caught yet) and /var/auth/auth.log for authentication operations (only for the non-pam version since pam takes care of auth logging).

Last edited by ShadowKyogre (2012-06-21 22:39:11)


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

#3 2012-06-23 00:58:34

Diaz
Member
From: Portugal
Registered: 2008-04-16
Posts: 366

Re: NCDM - NCurses Display Manager [Alpha software, use with caution!]

I have been waiting for something like this for ages wink
I don't really have time to check it now nor in the next week or so, but at least I want to encourage to keep working on it.

Have fun smile

Last edited by Diaz (2012-06-23 00:58:50)

Offline

#4 2012-06-23 03:32:01

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

Re: NCDM - NCurses Display Manager [Alpha software, use with caution!]

Diaz wrote:

I have been waiting for something like this for ages wink
I don't really have time to check it now nor in the next week or so, but at least I want to encourage to keep working on it.

Have fun smile

Thank you very much, that means a lot to me smile. Right now, I think it's at a point where I can settle down and rest, but I think there might be a few things I still want to do including the stuff in the TODO (which is kind of iffy). One of them is probably more independence from /etc/login.defs, but that's probably going to be on every Linux system. Another one is probably feature parity to /bin/login for the PAMless version, since the PAM version can simply have /etc/pam.d/ncdm configured to have whatever policies one wants.

Hopefully you'll have time to check it out later smile.


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

#5 2012-06-23 03:49:37

n1x4
Member
From: Chernobyl
Registered: 2012-02-17
Posts: 149
Website

Re: NCDM - NCurses Display Manager [Alpha software, use with caution!]

Excellent.. I will definitely give this a go in the AM!!


||github||

Offline

#6 2012-06-25 00:13:13

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

Re: NCDM - NCurses Display Manager [Alpha software, use with caution!]

n1x4 wrote:

Excellent.. I will definitely give this a go in the AM!!

Thanks :D. Also, I just want to let everyone know that I decoupled things a little more regarding the backend and the NCurses GUI, meaning that it could be possible to hook up different interfaces to it (though the backend and the interface are still in main.py, but that might change).

[edit] Working on the backend more now, along with a cmd-based interface that'll make python-urwid an optional dependency once I get that through. There's another interface type that I'm working on, but...it'd kind of make the NC part of the acronym for naught if I were to put it on the repo.

Last edited by ShadowKyogre (2012-06-26 01:24:37)


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

#7 2012-06-28 22:40:13

ShadowKyogre
Member
From: Hell! XP No... I'm not telling
Registered: 2008-12-19
Posts: 476
Website

Re: NCDM - NCurses Display Manager [Alpha software, use with caution!]

Double posting to let everyone know I'm a bit stuck on how to deal with faillog entries in the PAMless version, as I'm stuck between deciding whether to code updating the faillog entries as an internal python module it will use or write an external binary just to deal with updating it and checking it. There seems to be no python bindings for accessing /var/log/faillog. In the mean time, I'm going to work on some other projects that I just ported to python3 and the PAM using version to rearrange the conversation functions a bit to better support PAM.


For every problem, there is a solution that is:
Clean
Simple and most of all...wrong!
Github page

Offline

Board footer

Powered by FluxBB