I have plans to write a GDM (login screen) for *nix, damn now I am committed does not exist, why not write one This post will be updated as I write a GDM maker. For those new to *nix GDM stands for Graphical Display Manager, the first login screen you see. This script will generate a GDM login based on the image you select, I suggest the image to be of a resolution of 1280 X 1024 or greater. As always source will be posted, I am here for the people, I do not care if you use it to make your "Ultimate Edition", Mint etc. I am here to help get Billy off your system Much heavier software to follow.
NOW DONE
Well that was quick, 1 day's work Modified the USplash maker to make a GDM Maker to install from a terminal:
- Code: Select all
cd ~/.gnome2/nautilus-scripts/
wget http://ubuntusoftware.info/scripts/MakeGDM
sudo chmod +x MakeGDM
Breaking down what the script does... Asks user for input of the name of the GDM login file as well as name will be for it, description & requests the authors name. Converts the image to 1280 X 1024, downloads additional objects required for building it, generates a screenshot that shows up in login manager compiles in user info provided, generates the tar.gz file of end user specification and cleans up the working folder. As always the source freely modifiable:
- Code: Select all
#!/bin/sh
# GDM Login Maker Via TheeMahn
# Copyright (c) 2007 Ubuntusoftware Team <http://ubuntusoftware.info>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
SCRIPT_VERSION=1.01
##Check for zenity
if [ ! -e "/usr/bin/zenity" ]; then
gksudo apt-get install -y --force-yes zenity
fi
FNAME="$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
file=$@
# everything after last '/'
basename=${file%.*}
ext=".so"
OUTFILE=${basename}${ext}
input=$(zenity --text "What you like to call the GDM Login screen?" --entry)
retval=$?
case $retval in
0)
GDMNAME=$input;;
1)
exit 0;;
esac
input=$(zenity --text "Author name?" --entry)
retval=$?
case $retval in
0)
AUTHOR=$input;;
1)
exit 0;;
esac
input=$(zenity --text "Description?" --entry)
retval=$?
case $retval in
0)
DESCRIPTION=$input;;
1)
exit 0;;
esac
`zenity --window-icon=/usr/share/ultimate/ubuntu_ico.png --info --text="This will complie a GDM Login in current folder called $GDMNAME.tar.gz you can then load this file into login manager. Enjoy, TheeMahn" --title="GDM Login Maker"`;
update() {
wget -O /tmp/MakeGDM http://ubuntusoftware.info/scripts/MakeGDM >/dev/null 2>&1
#Verify it did download it
RESULTS_SIZE=`stat -c %s /tmp/MakeGDM`
if [ "$RESULTS_SIZE" = 0 ]
then
zenity --window-icon=/usr/share/ultimate/ubuntu_ico.png --info --text='It is suggested to re-run the script, the server may be under a heavy load. If the message persists, please verify you have an internet connection, the server is online & try again. Please refer to UbuntuSoftware Forum for further info.' --title="UbuntuSoftware USplashMaker";
exit 0
fi
#Version check script
REMOTE_VERSION=`grep SCRIPT_VERSION /tmp/MakeGDM |head -n1 |sed 's/.*=//'`
if [ "$REMOTE_VERSION" != "$SCRIPT_VERSION" ]; then
if [[ -n $DIALOG ]]
then
dialog --yesno "Newer version of GDM Login Maker script has been found\n\nDo you wish to install it?" 0 0
DIALOG_EXIT_CODE=$?
if [[ $DIALOG_EXIT_CODE = 0 ]]
then
cp /tmp/MakeGDM ~/.gnome2/nautilus-scripts
echo "GDM Login Maker script has been updated to v $REMOTE_VERSION"
echo "Please re-run the script"
zenity --window-icon=/usr/share/ultimate/ubuntu_ico.png --info --text='Newer version of script detected '$REMOTE_VERSION'. It has been upgraded please re-run script.' --title="GDM Login Maker script";
exit
fi
else
cp /tmp/MakeGDM /.gnome2/nautilus-scripts
echo "Newer version detected: $REMOTE_VERSION"
zenity --window-icon=/usr/share/ultimate/ubuntu_ico.png --info --text='Newer version of script detected '$REMOTE_VERSION'. It has been upgraded please re-run script.' --title="GDM Login Maker script";
exit
fi
fi
rm /tmp/MakeGDM 2>/dev/null
}
update
PROGRESS=0
#FNAME=$@
#Resolution Subroutines
Res5(){
#cd $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
convert $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS -resize "1280X1024!" -quality 100 -strip $GDMNAME/background.jpg | zenity --width=600 --height=100 --progress --pulsate --auto-close --title "Processing @ 1280 X 1024..."
}
#Header Subroutines
Header(){
#Grab Extras
cd $GDMNAME
wget http://ubuntusoftware.info/scripts/GDM.tar.gz
tar xfv GDM.tar.gz
echo "[GdmGreeterTheme]
Greeter=GDM.xml
Name=$GDMNAME
Description=$DESCRIPTION
Author=$AUTHOR
Copyright=(c) 2007 UbuntuSoftware
Screenshot=screenshot.png">GdmGreeterTheme.desktop
convert $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS -resize "1280X1024!" -quality 100 screenshot.png | zenity --width=600 --height=100 --progress --pulsate --auto-close --title "Generating screenshot..."
cp screenshot.png selection-active.png
rm GDM.tar.gz
cd ..
}
mkdir -p $GDMNAME
Header
Res5
#Create GDM Archive
tar czf $GDMNAME.tar.gz $GDMNAME/
#Clean up
rm -R $GDMNAME
exit 0
Screenshots:
Enjoy!!!
TheeMahn