~ubuntu-branches/ubuntu/trusty/ldm/trusty-proposed

« back to all changes in this revision

Viewing changes to rc.d/X95-run-x-session

  • Committer: Bazaar Package Importer
  • Author(s): Vagrant Cascadian
  • Date: 2010-04-04 17:20:56 UTC
  • mfrom: (3.3.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20100404172056-qgiog88fh4yuwaf9
Tags: 2:2.1.1-1
* New upstream version:
  - fatclients: 
    + Unmount removable devices at logoff.
    + Properly mark X sessions as active for ConsoleKit/PolicyKit.
  - ltsp-cluster-info: 
    + Check that getltscfg-cluster.conf exists before including it.
  - Check for NBD_ROOT_PORT instead of NBD_PORT, which was ambiguously
    used in LTSP for both NBD root and NBD swap.

* Add debian/source/format and set to 1.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        ssh -Y -t -S $LDM_SOCKET -l $LDM_USERNAME $LDM_SERVER "$CLIENT_ENV $MY_LANG $MY_DISP $MY_SCANNER $MY_SOUND $LDM_XSESSION $LDM_SESSION < /dev/null > /dev/null $MY_LOCALDEV"
64
64
    else
65
65
        ICEAUTHORITY="$(dirname $XAUTHORITY)/ICEauthority"
 
66
        # Using pam_ck_connector to make fat client sessions ConsoleKit-aware
 
67
        # FIXME: su doesn't read the current process environment, so we're using
 
68
        # /etc/security/pam_env.conf temporarily, which also affects non-X sessions
 
69
        if [ -x /usr/lib/ConsoleKit/ck-get-x11-display-device ] \
 
70
            && [ -f /etc/security/pam_env.conf ] \
 
71
            && CKCON_X11_DISPLAY_DEVICE=$(/usr/lib/ConsoleKit/ck-get-x11-display-device 2>/dev/null)
 
72
        then
 
73
            CKCON_X11_DISPLAY="$DISPLAY"
 
74
            sed -i '/^CKCON_X11_DISPLAY/d' /etc/security/pam_env.conf
 
75
            echo "CKCON_X11_DISPLAY DEFAULT=$CKCON_X11_DISPLAY" >> /etc/security/pam_env.conf
 
76
            echo "CKCON_X11_DISPLAY_DEVICE DEFAULT=$CKCON_X11_DISPLAY_DEVICE" >> /etc/security/pam_env.conf
 
77
        fi
 
78
 
66
79
        su - ${LDM_USERNAME} -c "$CLIENT_ENV $MY_LANG DISPLAY=$DISPLAY ICEAUTHORITY=$ICEAUTHORITY XAUTHORITY=$XAUTHORITY $LDM_XSESSION $LDM_SESSION"
 
80
 
 
81
        # Unmount any removable devices mounted by the user
 
82
        for d in $(mount | awk '/uhelper=udisks/ {print $1}; /uhelper=devkit/ {print $1}'); do
 
83
            umount "$d" &
 
84
        done
67
85
    fi
68
86
fi
69
87