Difference between revisions of "Qingy"

From ArchWiki
Jump to: navigation, search
m (Changing the systemctl mask target)
(37 intermediate revisions by 24 users not shown)
Line 1: Line 1:
{{i18n_links_start}}
+
[[Category:Display managers]]
{{i18n_entry|English|Qingy}}
+
[[tr:Qingy]]
{{i18n_entry|Türkçe|Qingy (Türkçe)}}
+
[http://qingy.sourceforge.net/ Qingy] is a replacement for [[Getty]] and login-managers like slim, kdm gdm and so on, using [http://www.directfb.org DirectFB] to provide a fast, nice GUI without the overhead of the X Window System. It allows users to log in and start the session of their choice (text console, gnome, kde, wmaker, etc.). Running several X sessions is also possible.
{{i18n_links_end}}
+
[[Category:Boot process (English)]]
+
[[Category:Display managers (English)]]
+
[[Category:Eye candy (English)]]
+
[[Category:HOWTOs (English)]]
+
 
+
==What is qingy?==
+
 
+
[http://qingy.sourceforge.net/ Qingy] is a replacement for getty and login-managers like slim, kdm gdm and so on, using [http://www.directfb.org DirectFB] to provide a fast, nice GUI without the overhead of the X Window System. It allows users to log in and start the session of their choice (text console, gnome, kde, wmaker, etc.). Running several X sessions is also possible.
+
  
 
==How to get qingy?==
 
==How to get qingy?==
 
 
First you need a working DirectFB.
 
First you need a working DirectFB.
I'm recommending [http://wiki.archlinux.org/index.php/Uvesafb Uvesafb].
+
I'm recommending [[Uvesafb]] but if you have some graphical issues with it use vesafb. Qingy may not work with [[KMS]].
  
 
A package is available in the [community] repo. To install:
 
A package is available in the [community] repo. To install:
Line 25: Line 15:
 
A package of several various themes is available in AUR:
 
A package of several various themes is available in AUR:
  
*[http://aur.archlinux.org/packages.php?do_Details=1&ID=5501 qingy-themes]
+
*[https://aur.archlinux.org/packages.php?do_Details=1&ID=5501 qingy-themes]
  
 
==Replace *getty with qingy==
 
==Replace *getty with qingy==
 +
===Systemd===
 +
Simply enable qingy@.service on the tty that you want it on and remove getty from that tty:
 +
# systemctl enable qingy@ttyX
 +
# systemctl disable getty@ttyX
 +
where X is the tty you want qingy to be on. Do this as many times as needed.
 +
 +
Also, you need to mask the qingy service with:
 +
# systemctl mask getty@ttyX
 +
for each of the ttys you enabled qingy on.
 +
 +
===Initscripts===
 
To use qingy, you'll need to edit /etc/inittab.
 
To use qingy, you'll need to edit /etc/inittab.
  
 
Replace:
 
Replace:
  c1:2345:respawn:/sbin/agetty -8 38400 vc/1 linux
+
  c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
  c2:2345:respawn:/sbin/agetty -8 38400 vc/2 linux
+
  c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
  c3:2345:respawn:/sbin/agetty -8 38400 vc/3 linux
+
  c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
  c4:2345:respawn:/sbin/agetty -8 38400 vc/4 linux
+
  c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
  c5:2345:respawn:/sbin/agetty -8 38400 vc/5 linux
+
  c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux  
  c6:2345:respawn:/sbin/agetty -8 38400 vc/6 linux
+
  c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux  
  
by:
+
with:
 
  c1:2345:respawn:/sbin/qingy tty1
 
  c1:2345:respawn:/sbin/qingy tty1
 
  c2:2345:respawn:/sbin/qingy tty2
 
  c2:2345:respawn:/sbin/qingy tty2
Line 48: Line 49:
 
Qingy's author suggest to keep agetty on a console (here on console 6) as a safety measure as qingy is still beta software.
 
Qingy's author suggest to keep agetty on a console (here on console 6) as a safety measure as qingy is still beta software.
  
Because qingy uses tty0-9 insead of vc/1-6 so you need add tty to /etc/securetty :
+
 
#
+
# /etc/securetty
+
#
+
console
+
vc/1
+
vc/2
+
vc/3
+
vc/4
+
vc/5
+
vc/6
+
tty0
+
tty1
+
tty2
+
tty3
+
tty4
+
tty5
+
tty6
+
tty7
+
  
 
==Configuring qingy==
 
==Configuring qingy==
Line 72: Line 55:
 
You can configure qingy by editing /etc/qingy/settings.
 
You can configure qingy by editing /etc/qingy/settings.
  
The default settings for X specifics are fine so only edit them if you really know what you are doing.
+
The default settings for X are fine so only edit them if you really know what you are doing.
 
  # Full path to the X server
 
  # Full path to the X server
 
  #x_server = "/usr/bin/Xorg"
 
  #x_server = "/usr/bin/Xorg"
Line 85: Line 68:
  
 
All other options are well explained.
 
All other options are well explained.
 +
 +
You may need to set the path to the X server e.g.
 +
# Full path to the X server
 +
x_server = "/usr/bin/X"
  
 
==Starting X==
 
==Starting X==
 +
 +
Please do note that .xinitrc is different from .xsession. The default login script, .xinitrc, works with startx, but graphical login managers generally do not look for .xinitrc. Instead, they look for a file named .xsession in your home directory.
  
 
If you want to start X with qingy you need to edit your .xsession.
 
If you want to start X with qingy you need to edit your .xsession.
Line 97: Line 86:
 
  exec bash --login -c 'openbox-session'
 
  exec bash --login -c 'openbox-session'
  
The start of the window manager using a login shell is needed because qingy starts the X-session directly without the help of a shell.
+
The start of the window manager using a login shell is needed because qingy starts the X-session directly without the help of a shell. This causes issues like no umlauts in xterm and malfunction of control keys like "Home", "End", "Del" and so on in the terminal.
This causes issues like no umlauts in xterm and malfunction of control keys like "Home", "End", "Del" and so on in the terminal.
+
 
 +
For more details, visit the Ubuntu CustomXSession wiki at [https://wiki.ubuntu.com/CustomXSession]
 +
 
 +
If you want your X sessions to be started in an active state, you may need to add the following lines to the end of /etc/pam.d/qingy.
 +
session    optional /lib/security/pam_loginuid.so
 +
session    optional /lib/security/pam_ck_connector.so
 +
 
 +
Active sessions allow you to access network controles, shutdown/susspend/hibernate funtionality, and drives you wish to mount via your DE/WM. You may check the status of your X session with the ck-list-sessions command. If the "active" value is set to "TRUE", than your session is active and you should have said funtionality. If not, your session should lack the privilages needed.
 +
 
 +
==Adding a session entry==
 +
 
 +
If you've changed the variable x_sessions or text_session in the config file of qingy replace the following paths with the path you've set.
 +
 
 +
===Text mode session===
 +
 
 +
Create a file /etc/qingy/sessions/<sessionname>.
 +
 
 +
The file name is shown as entry in the session list.
 +
 
 +
The file should be a shell script. For an example have a look into /etc/qingy/sessions/emacs.
 +
 
 +
===X mode session===
 +
 
 +
Create the folder /etc/X11/Sessions/ and save a new script file into it. (see Text mode session)
 +
 
 +
The name of the file is shown in the session list.
  
 
==Troubleshooting==
 
==Troubleshooting==
Line 104: Line 118:
 
=== Synaptic touchpad and keyboard issue ===
 
=== Synaptic touchpad and keyboard issue ===
  
Qingy (and quite possibly other DirectFB applicationss) has some issues using Synaptics touchpad. Also the keyboard can behave strangely (like if each keys were pressed twice).
+
Qingy (and quite possibly other DirectFB applications) has some issues using Synaptics touchpad. Also the keyboard can behave strangely (like if each keys were pressed twice).
  
 
This can be solved by adding:
 
This can be solved by adding:
  disable-module=linux_input
+
 
 +
*If each keypress was doubled
 +
  disable-module=keyboard
 +
*If mouse acts funny
 +
disable-module=ps2mouse
 +
disable-module=serialmouse
 +
 
 
to /etc/directfbrc. If the file does not exist, create it. This will enable you to use your touchpad, however some extra functionality like tapping or tap-dragging might not work.
 
to /etc/directfbrc. If the file does not exist, create it. This will enable you to use your touchpad, however some extra functionality like tapping or tap-dragging might not work.
 +
 +
On computers with several pointing devices, such as the Lenovo ThinkPad, it may be necessary to add the line:
 +
 +
disable-module=linux_input
 +
 +
to /etc/directfbrc. This should correct both the mouse and keyboard issues.
 +
 +
=== ConsoleKit locks tty ===
 +
 +
If you use ck-launch-session to start your session, then console-kit-daemon will lock currently active tty on it's first start. This is especially nasty if you use x_server_tty=qingy_tty parameter: tty you've logged in first becomes disposable.
 +
 +
There is a bug about this behavior [https://bugs.freedesktop.org/show_bug.cgi?id=29920] and a workaround: start console-kit-daemon on some useless tty, i.e. 63 by adding this to /etc/rc.local:
 +
 +
openvt -c 63 -f -- console-kit-daemon --no-daemon &

Revision as of 12:43, 13 November 2012

Qingy is a replacement for Getty and login-managers like slim, kdm gdm and so on, using DirectFB to provide a fast, nice GUI without the overhead of the X Window System. It allows users to log in and start the session of their choice (text console, gnome, kde, wmaker, etc.). Running several X sessions is also possible.

How to get qingy?

First you need a working DirectFB. I'm recommending Uvesafb but if you have some graphical issues with it use vesafb. Qingy may not work with KMS.

A package is available in the [community] repo. To install:

# pacman -S qingy 

Several extra themes are also available. In [community] repo, there is an Arch specific theme:

# pacman -S qingy-theme-arch

A package of several various themes is available in AUR:

Replace *getty with qingy

Systemd

Simply enable qingy@.service on the tty that you want it on and remove getty from that tty:

# systemctl enable qingy@ttyX
# systemctl disable getty@ttyX

where X is the tty you want qingy to be on. Do this as many times as needed.

Also, you need to mask the qingy service with:

# systemctl mask getty@ttyX

for each of the ttys you enabled qingy on.

Initscripts

To use qingy, you'll need to edit /etc/inittab.

Replace:

c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux 
c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux 

with:

c1:2345:respawn:/sbin/qingy tty1
c2:2345:respawn:/sbin/qingy tty2
c3:2345:respawn:/sbin/qingy tty3
c4:2345:respawn:/sbin/qingy tty4
c5:2345:respawn:/sbin/qingy tty5
c6:2345:respawn:/sbin/agetty -8 38400 vc/6 linux

Qingy's author suggest to keep agetty on a console (here on console 6) as a safety measure as qingy is still beta software.


Configuring qingy

You can configure qingy by editing /etc/qingy/settings.

The default settings for X are fine so only edit them if you really know what you are doing.

# Full path to the X server
#x_server = "/usr/bin/Xorg"
# Full path to the 'xinit' executable
xinit = "/usr/bin/xinit"
# Parameter we should pass to the X server
x_args = "-nolisten tcp -br"

I recommend to set

log_facilities = console, file

so you can look for errors in /var/log/qingy.log, too.

All other options are well explained.

You may need to set the path to the X server e.g.

# Full path to the X server
x_server = "/usr/bin/X"

Starting X

Please do note that .xinitrc is different from .xsession. The default login script, .xinitrc, works with startx, but graphical login managers generally do not look for .xinitrc. Instead, they look for a file named .xsession in your home directory.

If you want to start X with qingy you need to edit your .xsession.

Here a default .xsession for qingy.

#!/bin/sh
exec <login-shell command> <window manager starter>

An example:

#!/bin/sh
exec bash --login -c 'openbox-session'

The start of the window manager using a login shell is needed because qingy starts the X-session directly without the help of a shell. This causes issues like no umlauts in xterm and malfunction of control keys like "Home", "End", "Del" and so on in the terminal.

For more details, visit the Ubuntu CustomXSession wiki at [1]

If you want your X sessions to be started in an active state, you may need to add the following lines to the end of /etc/pam.d/qingy.

session    optional	/lib/security/pam_loginuid.so
session    optional	/lib/security/pam_ck_connector.so

Active sessions allow you to access network controles, shutdown/susspend/hibernate funtionality, and drives you wish to mount via your DE/WM. You may check the status of your X session with the ck-list-sessions command. If the "active" value is set to "TRUE", than your session is active and you should have said funtionality. If not, your session should lack the privilages needed.

Adding a session entry

If you've changed the variable x_sessions or text_session in the config file of qingy replace the following paths with the path you've set.

Text mode session

Create a file /etc/qingy/sessions/<sessionname>.

The file name is shown as entry in the session list.

The file should be a shell script. For an example have a look into /etc/qingy/sessions/emacs.

X mode session

Create the folder /etc/X11/Sessions/ and save a new script file into it. (see Text mode session)

The name of the file is shown in the session list.

Troubleshooting

Synaptic touchpad and keyboard issue

Qingy (and quite possibly other DirectFB applications) has some issues using Synaptics touchpad. Also the keyboard can behave strangely (like if each keys were pressed twice).

This can be solved by adding:

  • If each keypress was doubled
disable-module=keyboard
  • If mouse acts funny
disable-module=ps2mouse
disable-module=serialmouse

to /etc/directfbrc. If the file does not exist, create it. This will enable you to use your touchpad, however some extra functionality like tapping or tap-dragging might not work.

On computers with several pointing devices, such as the Lenovo ThinkPad, it may be necessary to add the line:

disable-module=linux_input

to /etc/directfbrc. This should correct both the mouse and keyboard issues.

ConsoleKit locks tty

If you use ck-launch-session to start your session, then console-kit-daemon will lock currently active tty on it's first start. This is especially nasty if you use x_server_tty=qingy_tty parameter: tty you've logged in first becomes disposable.

There is a bug about this behavior [2] and a workaround: start console-kit-daemon on some useless tty, i.e. 63 by adding this to /etc/rc.local:

openvt -c 63 -f -- console-kit-daemon --no-daemon &