GDM Maker

Source code I have written openly published for your viewing pleasure.


GDM Maker

Postby TheeMahn » Sun Jan 06, 2008 4:04 pm

10/10/09: I have retouched this situation and it is off the hook, took me ~a year sorry. One of our admin Tuxsax wrote a deb which I have re-wrote. It is currently not on the repo, however the below instructions still work if you want to check it out. The code has changed btw it uses kiss... Keep it simple stupid ;) On to the original post:

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 &amp; 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:
MakeGDM.png
Nautilus Integration

MakeGDM1.png
Call it what you like...

MakeGDM2.png
Take credit for being the author

MakeGDM3.png
Enter a description

MakeGDM4.png
Inform the end user what the file will be called.

MakeGDM5.png
Generate screenshot

MakeGDM7.png
Selecting Login screen


Enjoy!!!

TheeMahn
Attachments
MakeGDM8.png
End Results: gdmflexiserver --xnest
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: 4K Samsung 28", HannsG HH281, Various others
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4199
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 47
Operating System: Ultimate Edition Developer



Re: GDM Maker

Postby harvey186 » Thu Aug 28, 2008 8:15 am

I'm very happy, that you have created the GDM Maker and the SplashMaker :D, because I whant built my own splash and loginn screen for a longer time. The only thing I have to change now is the innerbackgound.
And I want to use my own start up music. But I don't kow how ?

Tanks for doing all the good things, Harvey
$#!% happens
User avatar
harvey186
U.E. Newbie
U.E. Newbie
 
Posts: 13
Joined: Sun May 25, 2008 6:43 am
Operating System: Ultimate Edition 3.2 32 BIT



Re: GDM Maker

Postby vinca » Thu Aug 28, 2008 7:32 pm

sorry, what do you mean by inner wallpaper? but to change the sounds, just go to
Code: Select all
system>preferences>sound
and go to the "sounds" tab.
Vinca... aka BIG V

Image
http://www.scienceprousa.com
Specs:
4gb ddr2 667 ram
Intel Core2Duo E6300 oced to 2.2 ghz
Radeon x1600
Arctic cooling freezer 7 pro
2x 250 gb western digital hard drives soon to be in raid
all on ULTIMATE EDITION!!!!

~Energy and persistence conquer all things~ -Ben Franklin
User avatar
vinca
U.E. Master
U.E. Master
 
Posts: 747
Joined: Mon Feb 18, 2008 2:36 pm
Age: 23
Operating System: Ultimate Edition 3.2 64 BIT



Re: GDM Maker

Postby TheeMahn » Thu Aug 28, 2008 8:51 pm

harvey186 wrote:I'm very happy, that you have created the GDM Maker and the SplashMaker :D, because I whant built my own splash and loginn screen for a longer time. The only thing I have to change now is the innerbackgound.
And I want to use my own start up music. But I don't kow how ?

Tanks for doing all the good things, Harvey



Sounds as I do to build Ultimate Edition (on programming level)...

Code: Select all
cd /usr/share/sounds/#<<- this is where your sound event files are stored
rm login.wav
rm logout.wav
rm shutdown*
rm error.wav
rm info.wav
rm question.wav
rm stress*
rm sure.wav
rm warning.wav
wget http://ubuntusoftware.info/upgrades/sounds/shutdown.wav
wget http://ubuntusoftware.info/upgrades/sounds/login.wav
wget http://ubuntusoftware.info/upgrades/sounds/logout.wav
wget http://ubuntusoftware.info/upgrades/sounds/info.wav
wget http://ubuntusoftware.info/upgrades/sounds/question.wav
wget http://ubuntusoftware.info/upgrades/sounds/stresspi.wav
wget http://ubuntusoftware.info/upgrades/sounds/sure.wav
wget http://ubuntusoftware.info/upgrades/sounds/warning.wav
cp login.wav startup.wav
nano /etc/sound/events/gnome-2.soundlist#<<- this file is your default sound event list


GDM:
1. modify my gdm script located in ~/.gnome2/nautilus-scripts/MakeGDM

Code: Select all
sudo gedit ~/.gnome2/nautilus-scripts/MakeGDM


goto the bottom and find:
rm -R $GDMNAME

remove it or put a # in front of it.
save and exit

2. create your gdm it will leave the working directory modify it until you are happy right click the folder and hit create archive make a tar.gz of the file.

3. import it into login manager and enjoy.

TheeMahn
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: 4K Samsung 28", HannsG HH281, Various others
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4199
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 47
Operating System: Ultimate Edition Developer



Re: GDM Maker

Postby harvey186 » Fri Aug 29, 2008 11:07 am

Thanks for reply, I have found a solution and I have made my changes. When I'm ready, I will post some screen shots. :mrgreen:
$#!% happens
User avatar
harvey186
U.E. Newbie
U.E. Newbie
 
Posts: 13
Joined: Sun May 25, 2008 6:43 am
Operating System: Ultimate Edition 3.2 32 BIT



Re: GDM Maker

Postby TheeMahn » Fri Aug 29, 2008 3:04 pm

harvey186 wrote:Thanks for reply, I have found a solution and I have made my changes. When I'm ready, I will post some screen shots. :mrgreen:


Allow me to assist:
Code: Select all
sudo apt-get install xnest
gdmflexiserver -n


;)
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: 4K Samsung 28", HannsG HH281, Various others
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4199
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 47
Operating System: Ultimate Edition Developer



Re: GDM Maker

Postby harvey186 » Sat Aug 30, 2008 5:47 am

Hi Theeman, attached my new login screen.
How can I change the Logo in front of the user names ??
Bildschirmfoto-1.png
login screen
$#!% happens
User avatar
harvey186
U.E. Newbie
U.E. Newbie
 
Posts: 13
Joined: Sun May 25, 2008 6:43 am
Operating System: Ultimate Edition 3.2 32 BIT



Re: GDM Maker

Postby harvey186 » Sat Aug 30, 2008 11:52 am

Hi again, in the meantime I have changed the fonts in the login screen. But I found no way to change the logos in front of the user names :(
Attachments
Bildschirmfoto.png
$#!% happens
User avatar
harvey186
U.E. Newbie
U.E. Newbie
 
Posts: 13
Joined: Sun May 25, 2008 6:43 am
Operating System: Ultimate Edition 3.2 32 BIT



Re: GDM Maker

Postby harvey186 » Sun Aug 31, 2008 11:06 am

Okay, it's done :mrgreen: . with
Code: Select all
gdmphotosetup
you can change the user photo. I will post my screenshots under "Screenshots"
$#!% happens
User avatar
harvey186
U.E. Newbie
U.E. Newbie
 
Posts: 13
Joined: Sun May 25, 2008 6:43 am
Operating System: Ultimate Edition 3.2 32 BIT



Re: GDM Maker

Postby TheeMahn » Thu Sep 04, 2008 1:00 am

harvey186 wrote:Okay, it's done :mrgreen: . with
Code: Select all
gdmphotosetup
you can change the user photo. I will post my screenshots under "Screenshots"



Sorry for the delay... there is a file in your home folder it is hidden btw called .face that makes that happen, I love to educate.

Best,

TheeMahn
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: 4K Samsung 28", HannsG HH281, Various others
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4199
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 47
Operating System: Ultimate Edition Developer

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron