summaryrefslogtreecommitdiff
path: root/nautilus-installer/src/prescript
blob: cef0a719d0c42ca314dba6ce16e0a70567031733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
if test x$DISPLAY = x; then
    echo "The Nautilus-Installer requires X"
fi
if test $UID -ne 0; then
    echo ""
    echo "The Nautilus-Installer requires superuser access to install packages."
    echo "yadayada insecure yadayada trust us blablabla"
    echo ""
    echo "Please enter root password at the prompt"
    xhost + localhost
    su - -c "export DISPLAY=$DISPLAY && cd $PWD && sh $0"
    xhost - localhost
    exit
fi