source: trunk/debathena/debathena/xsession/debian/00debathena-gdm-sucks @ 24859

Revision 24859, 631 bytes checked in by jdreed, 13 years ago (diff)
In xsession: * Make the 'xterm' login session actually useful * Warn about quota early in the session so users know why logins fail.
Line 
1if [ "$(dpkg-query -W -f '${Status}' debathena-xsession 2>/dev/null)" = "install ok installed" ] && [ "$GDMSESSION" = "xterm" ] && [ "$DEBATHENA_HOME_TYPE" = "afs" ]; then
2    QUOTAPCT=$(fs lq $HOME | tail -1 | awk '{print $4}' | sed 's/[^0-9]*//g')
3    if [ $QUOTAPCT -ge 100 ]; then
4        # Otherwise it blocks the session until it times out
5        pkill pulseaudio
6    fi
7    if zenity --question --text="This will launch an xterm which will emulate a tty-mode login session.  You can end your session by typing 'logout'.\nContinue?"; then
8        xsetroot -solid grey
9        xterm -ls -geometry 80x24+280+220 -display :0.0
10    fi
11    exit 0
12fi
Note: See TracBrowser for help on using the repository browser.