[SOLVED] MATE GDM greeter theme testing and recovery

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
KirbySmith

Re: MATE GDM greeter theme testing and recovery

Post by KirbySmith »


Process for building one specific greeter theme for Mint 17 MATE to replace the default GDM greeter theme "Linux Mint" found within "usr/share/mdm/themes".


The new theme was to have these components:
o Desired background is "linux_mint_17.png" found at "/usr/share/backgrounds/linuxmint-qiana/linux_mint_17.png". This background is used by MATE for returning from a locked screen.
o Desired login box is that used in the default Linux Mint theme in the MDM directory "usr/share/mdm/themes/linuxmint".
o The new theme would be titled Linux Mint 17 and live in a GDM theme directory named "usr/share/mdm/themes/linuxmint17".

Make a copy of folder "linuxmint" and move to the Desktop. Rename the folder "linuxmint17".
Open "linuxmint17" and delete the file "background.jpg".
Add the file "linux_mint_17.png".

Open the file "theme.xml" with pluma
Change the name of the background file to the name of the new background file and add any descriptive information. See below for an example.

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE greeter SYSTEM "greeter.dtd">

<!-- GDM Theme: garGANTuan Greetings		-->
<!-- Author: epicbard					-->

<!-- Original XML Author: Thomas Lund Dideriksen	-->
<!-- Email : thomas@dideriksen.com			-->

<!-- Revision XML Author: Kirby A. Smith	-->
<!-- Contact via Linux Mint forum			-->


<greeter gtk-theme="Mint-X">

	 <!-- background basecolor -->
	 <item type="rect">
		 <pos x="0" y="0" width="100%" height="100%"/>
		 <!--change this if you want another color-->
		 <normal color="#aaaaaa"/>
 	</item>

	<!-- background pixmap image -->
	<!-- If you want another background image-->
	<!-- or you could get rid of this and just have a base color (from above)-->
	<item type="pixmap">
		<!-- Point this to another file -->		
                <!-- Changed to the Linux Mint 17 background file - kas -->
		<normal file="linux_mint_17.png"/>
		<pos x="0" y="0" width="100%" height="100%"/>
	</item>
Change the position of the login box if desired. For the Linux Mint 17 theme, the change I made was from the center to above the center, but lower left would also work.

Code: Select all

       <!-- login window container -->
       <item type="rect">
		
              <!-- [was] pos anchor="center" x="50%" y="50%" width="550" height="462" [kas] -->		
              <pos anchor="center" x="55%" y="25%" width="550" height="462"/>
              <fixed>
Note that the x position is measured from the left; the y position is measured from the top, so this change moved the box up from blocking the Linux Mint alphabet blocks.
Save the file.

Open the file "GdmGreeterTheme.desktop" with a text editor and change the name of the background file to "linux_mint_17.png".
Change the name of the thumbnail file if it is different (see below).
Make any descriptive changes.
Save the file

For example:

Code: Select all

[GdmGreeterTheme]
Encoding=UTF-8
Greeter=theme.xml
Name=Linux Mint 17
Description=KAS modification of linuxmint.
Author=Linux Mint
Copyright=GPL
Screenshot=thumbnail.png
Do the same with the file "MdmGreeterTheme.desktop".

It is desirable to have a thumbnail image of the new theme. To do this it is necessary to capture the gdm greeter screen before one is logged in. Many schemes have been touted for this purpose over the years, but the easiest, in my view, that still works is to modify the file "/etc/mdm/Init/Default". The change to be made is above "exit 0" at the end of the script, and must be made using "gksudo pluma" to get admin privs. Save the changed file.

Code: Select all

.
.
XMODMAP=`mdmwhich xmodmap`
if [ "x$XMODMAP" != "x" ] ; then
  if [ -f $sysmodmap ]; then
    $XMODMAP $sysmodmap
  fi
fi
( mate-screenshot -d 5) &
exit 0
Before logging out and then back in, use caja in administrator mode (gksudo caja) and move a copy of the Desktop folder linuxmint17 into the themes folder from which the original folder linuxmint was copied.

When the screenshot has been made on a login, "/etc/mdm/Init/Default" can be modified back to its original form, or an octothorpe (#) can be used to turn the line into a comment, viz., "#( mate-screenshot -d 5) &".

The screen shot that is taken (and stored by mate-screenshot in the /tmp directory) needs to be reduced using gimp to a 188 x 140 pixel image to be the thumbnail image within the theme folder. (Different screen formats will yield different ratios; I just aimed for 188 x whatever the proportion was.) The resulting thumbnail image should be put into the folder linuxmint17 on the Desktop, and into its copy in the mdm themes folder. My Linux Mint 17 thumbnail is provided as an attachment to an earlier message in this topic.

Save your new theme folder in your /home folder somewhere where you can save it and find it the next time you upgrade Mint.

kirby
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: MATE GDM greeter theme testing and recovery

Post by Spearmint2 »

you should post a copy in Tutorial section.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
KirbySmith

Re: MATE GDM greeter theme testing and recovery

Post by KirbySmith »

I can do that. First I want to establish a list of cautions and caveats to bound how generic the instructions should be assumed to be. Maybe this weekend.

kirby
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: [SOLVED] MATE GDM greeter theme testing and recovery

Post by Spearmint2 »

good tutorial! kudos.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
Locked

Return to “MATE”