updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / lightdm-gtk2 / lightdm.install
blobe84ec8aa257e9775ff77ce31dfc7e8100c59d704
1 #Notes for the unused *-ubuntu.pam files; left in for reference
2 #You *may*, in special cases, need to add entries to /etc/securetty:
3 ## Local X displays (allows empty passwords with pam_unix's nullok_secure)
4 #:0
5 #:0.0
6 #:0.1
7 #:1
8 #:1.0
9 #:1.1
10 #:2
11 #:2.0
12 #:2.1
13 #:3
14 #:3.0
15 #:3.1
16 ##...
18 #See if just adding yourself to the group works first, before adding the above entries.
21 post_install() {
22   if ! getent group lightdm >/dev/null; then
23     groupadd --system lightdm
24   fi
26   if ! getent passwd lightdm >/dev/null; then
27     useradd --system -c "Light Display Manager" -g lightdm -d /var/lib/lightdm -s /sbin/nologin lightdm
28   fi
30   if ! getent group nopasswdlogin >/dev/null; then
31     groupadd --system nopasswdlogin
32   fi
34   mkdir /var/lib/lightdm || true
35   chown -R lightdm:lightdm /var/lib/lightdm
36   chmod 0750 /var/lib/lightdm
38   cat << EOF
39 Automatic login can be enabled in /etc/lightdm/lightdm.conf by uncommenting (and completing) the autologin-user and autologin-user-timeout options.
41 You can allow yourself to login without a password at the LightDM prompt by putting yourself in the nopasswdlogin group.
43 Finally: Edit lightdm-gtk-greeter.conf to theme it up!
44 EOF
47 post_remove() {
48   rm -f /etc/lightdm.conf
50   if [ -d /var/log/lightdm ]; then
51     rm -r /var/log/lightdm
52   fi  
54   if [ -d /var/cache/lightdm ]; then
55     rm -r /var/cache/lightdm
56   fi  
58   if [ -d /var/run/lightdm/authority ]; then
59     rm -r /var/run/lightdm/authority
60   fi  
62   if getent passwd lightdm >/dev/null; then
63     if [ -x /usr/sbin/userdel ]; then
64       userdel -r -f lightdm
65     fi  
66   fi  
67   if getent group lightdm >/dev/null; then
68     if [ -x /usr/sbin/groupdel ]; then
69       groupdel lightdm
70     fi  
71   fi
73   if [ -d /var/lib/lightdm ]; then
74     rm -rf /var/lib/lightdm
75   fi