Qingy, by Michele Noberasco


My other projects




SourceForge Logo

Valid XHTML 1.0!

Just like nearly every other linux program, do this (as root):
  1. Unpack tarball and cd to dir.
  2. ./configure
  3. make
  4. make install
This should have you up and running with qingy. There are many arguments you can pass to ./configure, that affect the way qingy will be compiled/installed. Use ./configure --help to get a list of the options available.

You also have to modify your /etc/inittab file. You should find in it a section that goes like this:

c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux

and modify it as follows:

c1:12345:respawn:/usr/local/sbin/qingy tty1
c2:12345:respawn:/usr/local/sbin/qingy tty2
c3:12345:respawn:/usr/local/sbin/qingy tty3
c4:12345:respawn:/usr/local/sbin/qingy tty4
c5:12345:respawn:/usr/local/sbin/qingy tty5
c6:12345:respawn:/sbin/agetty 38400 tty6 linux

After that you can either reboot your system or use the following commands (as root):
init Q
killall agetty

where agetty is the name of your previous *getty. After this, either logout or change terminal to see qingy in all it's glory!

I suggest you leave at least one terminal with your old *getty, so that in case of problems or misconfiguration (remember that qingy is beta software, so there may well be some bugs) you have at least one surely working terminal.

-Use TAB to jump to the next section
-Use SHIFT-TAB to jump to the previous section
-You can also use your mouse and click a section
-Type as you always did in previous life ;-) (*)
-Use UP and DOWN arrows (or your mouse) to browse sessions
-Click on POWER and RESET buttons and you will, respectively, poweroff and reboot
-The above can also be obtained via ALT-P and ALT-R
-Press ENTER to log in
-Press CTRL-ESC two times to deactivate DirectFB and get a text login
-Press ALT-Fn (or CTRL-ALT-Fn) to switch to the nth tty(**)
-If you log into, say, WindowMaker, and then change VT, WM will wait for you to switch back to the previous VT

(*) you can use all the usual LEFT, RIGHT, HOME, END, DEL, BACKSPACE keys to edit your text
(**) there is no need to enable VT switching in DirectFDB.
Program options

Output of qingy -h:

qingy version 1.0.0

Usage: qingy <ttyname> [options]


-t, --text-mode
Perform a text-mode login prompt (no graphics).
-f <device>, --fb-device <device>
Use <device> as framebuffer device.
-p, --hide-password
Do not show password asterisks.
-l, --hide-lastuser
Do not display last user name.
-d, --disable-lastuser
Do not remember last user name.
-n, --no-shutdown-screen
Close DirectFB mode before shutting down. This way you will see system shutdown messages.
-r <xres>x<yres> --resolution <xres>x<yres>
Do not detect framebuffer resolution, use this one instead.
-h, --help
Print this help message.

qingy configuration file is /etc/qingy/settings, tweak it to fit your needs/likes. There are many options there that you can customize, each of them preceded by a comment explaining it. Here is a tipical config file example:

# Directory containing X sessions
x_sessions = "/etc/X11/Sessions/"
# Directory containing text mode sessions
text_sessions = "/etc/qingy/sessions/"
# Directory where qingy should put its temporary files
temp_files_dir = "/var/lib/misc"

# Full path to the 'xinit' executable
xinit = "/usr/X11R6/bin/xinit"

# Parameter we should pass to the X server
x_args = "-nolisten tcp"

# How verbose should qingy be?
# Possible values are debug, error
# Default value is error
log_level = error

# Where should qingy messages be logged?
# Values can be one or more of the following:
# console, file, syslog
# Default value is console
# log_facilities = console, file
log_facilities = console

# Offset to search for an available X server number.
# This number affects the DISPLAY env variable.
# Default is 1, setting it to 0 will make buggy OpenGL implementations
# (like the ATI one) work with qingy, but it will also make impossible
# to start an X server from console using startx without passing it
# extra parameters.
#x_server_offset = 1

# Where should we start the X server?
# Accepted values are:
#   qingy_tty (default) to start it in the same tty qingy is running in
#   unused_tty to start it into an unused tty
x_server_tty = qingy_tty

# Scripts that should be executed just before/after qingy GUI is fired up/shut down
# pre_gui_script = "/etc/qingy/pre_GUI.sh"
# post_gui_script = "/etc/qingy/post_GUI.sh"

# Where are the screen savers?
screensavers_dir = "/usr/lib/qingy/screensavers"

# How much should we wait (in minutes) before the screen saver is fired up?
# A value of 0 disables screensaver completely.
screensaver_timeout = 5

# How much should we wait (in minutes) before the screen enters power saving mode?
# A value of 0 disables the feature
screen_powersaving_timeout = 30

# screensaver "pixel"
screensaver "photos" =

# Where are the themes?
themes_dir = "/usr/share/qingy/themes"

# What theme do you want (you can also specify 'random')
theme = "rouge"
#theme = "default"

# Who is allowed to shut down the system?
# Allowed options are 'everyone', 'root', 'noone'
# shutdown_policy = everyone

# How should latest user be calculated?
# global means get latest user that logged in using qingy from whichever tty
# tty means get latest user that logged in using current tty
# default policy is global
#last_user_policy = global

# How should latest user session be calculated?
# user means get last session of each user
# tty means get last session of current tty
# default policy is user
#last_session_policy = user

# What happens when we press the 'sleep' button?
sleep = "/usr/local/sbin/hibernate"

# wether we should clear background image during dialogs (default is no)...
# this is the default setting, it gets overridden if the theme you are using
# sets the same setting differently...
clear_background = yes

# wether to allow session locking; if you enable this, when you try to
# switch to a qingy-controlled tty whose owner is not your current
# user, you will be asked for the password of that user before being
# allowed to continue. If you are root, of course, you can switch
# to any tty you chose to. Default setting is 'no'.
#lock_sessions = yes

# whether to allow session timeout; if you enable this, after the amount
# of minutes specified in idle_timeout variable, idle_action will be
# performed. Allowed actions are:
# lock will lock user session asking you for your password
# logout will close your session
#idle_timeout = 30
#idle_action = lock

# How many times should we try to fire app qingy interface
# before reverting to text mode? Default is 0...
#retries = 1

# these options are valid only if qingy is started from tty3
tty = 3
theme = random
screensaver "running_time"="%H:%M:%S"
qingy_DirectFB = "/root/Documenti/programmazione/qingy/src/DirectFB/qingy-DirectFB"

# Should we auto log in?
# Totally insecure, but very convenient ;-)
# Note that this section must be put inside a tty=n{} block
# username = "myuser"
# # You can also use 'session=lastsession' to automatically choose last user session
# session = "wmaker"
# #session = lastsession
# # if set to 'no', qingy will autologin only once every system restart
# relogin = no

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 mode

Also, remember that info qingy is your friend, or would be if it was not so outdated...

Themes sit in /usr/share/qingy/themes, if you want to write a new one take a look at theme default (default/theme): it should be self-explanatory.