qingy

From Gentoo Wiki
Jump to:navigation Jump to:search

Qingy (Qingy Is Not GettY) is a replacement for getty. Written in C, it uses DirectFB to provide a GUI without the overhead of the X Windows System. It allows the user to log in and start the session of choice (text console, GNOME, KDE, wmaker, etc.).

Note
DirectFB is no longer in available in Portage as per bug #606194. All that remains now is a text mode login.

Installation

USE flags

USE flags for sys-apps/qingy A DirectFB getty replacement

X Add support for X11
crypt Add support for encryption -- using mcrypt or gpg where applicable
emacs Add support for GNU Emacs
gpm Add support for sys-libs/gpm (Console-based mouse driver)
pam Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
static !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically

Emerge

root #emerge --ask qingy

Configuration

Keypair

qingy requires keypairs to run. To generate keys:

root #qingy-keygen

inittab

After successful installation edit the /etc/inittab file and replace following section:

FILE /etc/inittab
...
# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux
...

with following entries:

FILE /etc/inittab
...
# TERMINALS
c1:12345:respawn:/sbin/qingy tty1
c2:12345:respawn:/sbin/qingy tty2
c3:12345:respawn:/sbin/qingy tty3
c4:12345:respawn:/sbin/qingy tty4
c5:12345:respawn:/sbin/qingy tty5
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
...
Note
Leave the 6-th terminal tty6 assigned to agetty. Pressing Ctrl+Alt+F6 will get the agetty spawned terminal, just in case something goes wrong at least one working terminal will be available.

Configuration file

This is default qingy's configuration as shipped with Gentoo:

FILE /etc/qingy/settings
x_sessions = "/etc/X11/Sessions/"
text_sessions = "/etc/qingy/sessions/"
temp_files_dir = "/var/lib/misc"

xinit = "/usr/bin/xinit"
x_args = "-nolisten tcp -br"

log_level = error
log_facilities = console

x_server_tty = qingy_tty

pre_gui_script  = "/etc/qingy/pre_GUI.sh"
post_gui_script = "/etc/qingy/post_GUI.sh"

themes_dir = "/usr/share/qingy/themes"
theme = gentoo

keybindings
{
        prev_tty    = "win"      # switch to left tty
        next_tty    = "menu"     # switch to right tty
        poweroff    = "ALT-p"    # shutdown your system
        reboot      = "ALT-r"    # restart your system
        screensaver = "ALT-s"    # activate screen saver
        sleep       = "ALT-z"    # put machine to sleep
#       kill        = "CTRL-c"   # kill qingy
        text_mode   = "CTRL-ESC" # Revert to text mod
}

Display managers

Remove xdm and display-manager from the default startup level, otherwise they will fight with qingy for screen control at system boot. This sometimes results in nasty results.

root #rc-update del xdm default
root #rc-update del display-manager default

Starting qingy

Now either reboot the system or use following commands:

root #init Q
root #killall agetty

After successful authentication qingy will list contents of /etc/X11/Xsession/ directory:

 Welcome, ${LOGNAME}, please select a session...
 (a) dwm
 (b) fvwm
 (c) Your .xsession
 (d) Text: Console
 Your choice (just press ENTER for 'Text: Console'):

Different Xsessions can be started in each tty, which works fine. Use the Ctrl+Alt+F1 through F6 key combinations to switch between different X sessions.

Troubleshooting

If qingy hangs making it impossible to login press Ctrl+Alt+F6 to get the agetty spawned terminal and login from there.

See also

External resources