个人工具

UbuntuHelp:Qingy

来自Ubuntu中文

跳转至: 导航, 搜索

Overview

qingy is a replacement for getty. Written in C, it uses DirectFB to provide a fast, nice GUI without the overhead of the X Windows System. It allows the user to log in and start the session of his choice (text console, gnome, kde, wmaker, ...).

Installation

Needed tools and DirectFB

First off we need to get all the packages that will be needed.

sudo apt-get install build-essential pkg-config libncurses5-dev libssl-dev libx11-dev x11proto-scrnsaver-dev libxss-dev libdirectfb-dev libdirectfb-extra

DirectFB Setup

Ok so now we need to tell the framebuffer about your system, it needs to know your resolution and color depth. Fortunately there is a nice little tool for this called fbset. sudo apt-get install fbset should do the trick. Once apt has installed fbset, you can run it with the command fbset It will give you an output something like;

andy@Tatties:~$ fbset 

mode "1024x768-76"
    # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
    geometry 1024 768 1024 768 16
    timings 12714 128 32 16 4 128 4
    rgba 5/11,6/5,5/0,0/0
endmode  

The output is needed to put in a configuration file called /etc/fb.modes .

Install Qingy

[1] Given that all downloads correctly you can now go download qingy(582K). Once you have downloaded it put it in your home directory ~ . Untar the tar.bz2 and compile;

 
tar -xjf ./qingy-0.9.5.tar.bz2
cd ./qingy-0.9.5/
./configure
make
sudo make install

Now you need to edit a few files to stop agetty spawning like normal during boot. You will need to edit /etc/event.d/tty* where * is 1 to 5 For example

sudo nano -w /etc/event.d/tty1

# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5

stop on shutdown

respawn /sbin/getty 38400 tty1

The bottom line respawn /sbin/getty 38400 tty1 will need to be commented out and a line below reading respawn /usr/local/sbin/qingy tty1 So now the file will read;

# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5

stop on shutdown

#respawn /sbin/getty 38400 tty1
respawn /usr/local/sbin/qingy tty1 '''#This line will become tty2 or 3 or 4 etc'''

Do this for each /etc/event.d/tty. Replacing the numbers relatively. Leave /etc/event.d/tty6 as is. This is our emergency terminal, if you change it you are going to have ALOT to fix!

Remove GDM from login

It is now safe for you to remove GDM from the default runlevel. I would advise using a nice GTK application called bum, which can be installed with the usual sudo apt-get install bum. Once you have installed it, run it as root from a terminal gksudo bum and click the check box next to "GDM Login Screen". So that it is an 'off' state. Apply Changes and you will be dumpped to a Virtual Terminal. You could also use a number of other applications for example rcconf.

Running/Cross fingers

Ok it is time to restart, so log in to the virtual terminal as your user the use the command sudo init 6. After the restart you will hopefully be presented with a nice FrameBuffer login. If you are not, and there is something wrong you can get back to a terminal by pressing [ctrl + alt+ F6].