Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

xlsh - eXtended Login Shell
(c) 2011 Michał Siejak

A simple login shell with readline functionality and PAM integration.
 * When run stand-alone on a virtual console it can replace standard "login" program.
 * When run in cooperation with X daemon component (xlshd) it can replace XDM/GDM/KDM.

Full documentation can be found here:

 * Small and simple, written entirely in C.
 * Easily hackable because of compact codebase (~1000 source lines).
 * Uses PAM for authorization and session management.
 * Ability to select non-default shell/window manager during logon.
 * Entirely keyboard driven display manager replacement (when used with xlshd)
   without the need for any fat libraries or GUI toolkits.
 * Defaults configured before compilation, some of them can be changed by
   setting few environment variables.
 * Single shell script file (/etc/xlsh/xlshrc) for customizing how
   xlshd launches xlsh.
 * Introduces a concept of "pre-login shell" known from GNU/HURD.
 * Only *three* important commands: 'login', 'reboot' and 'shutdown'.
 * New commands can be easily added (if you need any) by editing xlsh.c
 * Username autocompletion on TAB.
 * Zenburn color scheme by default (when run under X).

The only build dependencies are: make, a decent C compiler, libreadline and libpam.
Configuration options can be edited in include/config.h before compiling.

Runtime dependencies for xlshd are: standard X11 distribution with xterm and
(optionally) xdotool for enforcing terminal window focus on multi-monitor setups.

When using xlsh as "login" replacement remember to tell your getty program to not
ask for username. When using xlshd from inittab specify -f flag so it won't fork
into background.

Example lines from my inittab file:

# xlsh on virtual console #1 (tty1)
c1:2345:respawn:/sbin/agetty -8 -s 38400 -n -l /usr/local/sbin/xlsh tty1 linux
# xlshd starting X server and xterm/xlsh on runlevel 5
x:5:respawn:/usr/local/sbin/xlshd -f

Thanks goes to Mateusz Hromada for testing and providing useful patches. ;-)

Please report any bugs or issues either via github or via mail to:

Recent activity


Commits by jjacky were pushed to jjacky/xlsh-jjk

0906dbb - signals (SIGINT, SIGHUP) are blocked and not restored upon login, thus remain blocked (in other processes) after user logged in, fixed
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.