MDM Themes

Questions about applications and software
Forum rules
Before you post please read this

Re: MDM Themes

Postby paulmac on Sat Jun 09, 2012 7:16 am

Trapper wrote:A way to customize the GTK theme would prove to be useful. For me, it would even be more useful if I could override the highlight color with an entry in my theme's .xml

Found it!

http://projects.gnome.org/gdm/docs/2.16/thememanual.html#greetertag
The GDM theme format is specified in XML format contained within a <greeter> tag. You may specify a GTK+ theme to be used with this theme by using the gtk-theme element in the greeter tag as in the following example.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE greeter SYSTEM "greeter.dtd">
<greeter gtk-theme="Crux">
[...]
</greeter>

It has long been an axiom of mine that the little things are infinitely the most important.
Sir Arthur Conan Doyle, "A Case of Identity"
paulmac
Level 1
Level 1
 
Posts: 2
Joined: Thu May 31, 2012 8:52 am

Linux Mint is funded by ads and donations.
 

Re: MDM Themes

Postby Trapper on Sat Jun 09, 2012 8:55 am

paulmac wrote: It seems changing /usr/share/ubuntu-system-adjustments/defaults.conf will only work if there isn't an overide in /etc/mdm/mdm.conf.

I found this in the header comments:
defaults.conf wrote:# This file should not be updated by hand. Since MDM 2.13.0.4, configuration
# choices in the MDM System Configuration file (/etc/mdm/mdm.conf) will
# override the default values specified in this file.

I added a theme line to /etc/mdm/mdm.conf and it persists after reboot.

you can restart mdm with sudo kill -HUP <mdm pid>
shotgun approach: sudo killall -HUP mdm

Both of these will also kill your X session and return you to mdm greeter.

edit:
You can put a 96x96 <username>.png into /usr/share/pixmaps/faces to have a custom face/icon in the greeter. Strangely <username>.jpg renamed to <username>.png will also work.


Thanks for this info paulmac. I will give it a spin.
Trapper
Level 3
Level 3
 
Posts: 175
Joined: Sat Dec 03, 2011 12:21 pm
Location: Sebring, Florida USA

Re: MDM Themes

Postby twodogs on Wed Nov 21, 2012 4:22 pm

I just use a script to convert any GDM theme to a MDM theme. Works great!

Copy the code and save as a shell script (ex: Convert GDM theme to MDM.sh). Put the script in /home/username/.gnome2/nautilus-scripts or nemo-scripts and make sure it is checked as 'executable.'

Download a GDM theme and run this script on the downloaded file by right clicking, navigating to >scripts>Convert GDM theme to MDM.

Presto!

Code: Select all
#!/usr/bin/env python

# Convert GDM theme to MDM by esteban1uy
import pygtk
import tarfile
import os
import sys
import tempfile
import gtk

pygtk.require('2.0')

if gtk.pygtk_version < (2,3,90):
   raise SystemExit
def look_in_directory(directory):
    for f in os.listdir(directory):
        if os.path.isfile(os.path.join(directory, f)):
            if f == "GdmGreeterTheme.desktop":
                return os.path.join(directory, f)
        if os.path.isdir(os.path.join(directory, f)):
            if look_in_directory(os.path.join(directory, f)) != "":
                return os.path.join(directory, f)

dialog = gtk.FileChooserDialog("Select theme file",
                               None,
                               gtk.FILE_CHOOSER_ACTION_OPEN,
                               (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                                gtk.STOCK_OPEN, gtk.RESPONSE_OK))
dialog.set_default_response(gtk.RESPONSE_OK)

filter = gtk.FileFilter()
filter.set_name("All files")
filter.add_pattern("*.tar.gz")
dialog.add_filter(filter)

response = dialog.run()
if response == gtk.RESPONSE_OK:
    fullpathToTar = dialog.get_filename()
    fullpath = os.path.dirname(fullpathToTar)
    tar = tarfile.open(fullpathToTar, "r:gz")
    destinationPath = tempfile.mkdtemp() + "/"
    tar.extractall(destinationPath)
    GdmFile = look_in_directory(destinationPath)
    if GdmFile != "":
        o = open(GdmFile+"/MdmGreeterTheme.desktop","a")
        for line in open(GdmFile+"/GdmGreeterTheme.desktop"):
             line = line.replace("GdmGreeterTheme","MdmGreeterTheme")
             o.write(line)
        o.close()
        innerfolder = os.path.split(os.path.dirname(GdmFile+"/"))[1]
        newtar = tarfile.open(fullpath + "/"+innerfolder+"_for_MDM.tar.gz", "w:gz")
        newtar.add(GdmFile+"/",innerfolder+"/")         
        newtar.close()
elif response == gtk.RESPONSE_CANCEL:
    exit()
dialog.destroy()
--
Image
Lenovo laptop B575 8 gigs memory, 750 hard drive, and Linux Mint 16 Petra Cinnamon 64-bit
User avatar
twodogs
Level 4
Level 4
 
Posts: 244
Joined: Sat Jun 09, 2007 9:18 pm

Re: MDM Themes

Postby GeneC on Wed Nov 21, 2012 5:18 pm

Twodogs...

Thanks for that it works brilliantly.. :D
I used it on LMDE/KDE that I also had Thunar as a file manager.

I use Thunar custom actions. I am sure there is a way to use it in Dolphin, but being new to KDE have yet to figure that out. If anyone know how to use it in Dolphin, please tell.

Image Image

========================

Edit:
Perhaps you should start a new thread with this script in HOW TO's:
viewforum.php?f=42

Its good... :D
GeneC

AMD Phenom2x4 3.2 ghz, 12GB DDR3, Nvidia GTX 460

LMDE (Cinnamon)
Debian (Gnome Shell 3.8.4 - Testing)
Siduction (XFCE -Debian SID)
Makulu 5 (XFCE-Testing)
User avatar
GeneC
Level 6
Level 6
 
Posts: 1465
Joined: Fri Sep 03, 2010 1:59 pm
Location: Maine, USA

Re: MDM Themes

Postby twodogs on Wed Nov 21, 2012 11:41 pm

GeneC wrote:Perhaps you should start a new thread with this script in HOW TO's:
viewforum.php?f=42

Its good... :D


Will do!
--
Image
Lenovo laptop B575 8 gigs memory, 750 hard drive, and Linux Mint 16 Petra Cinnamon 64-bit
User avatar
twodogs
Level 4
Level 4
 
Posts: 244
Joined: Sat Jun 09, 2007 9:18 pm

Re: MDM Themes

Postby Oscar799 on Thu Nov 22, 2012 3:49 am

In Mint 14 MDM is compatible with GDM 2 themes
MDM

MDM was given a lot of attention and comes with exciting new features.

MDM now supports legacy GDM 2 themes. About 30 of them are installed by default in Linux Mint 14 and you can find 2,000 more in gnome-look.org.


From here http://www.linuxmint.com/rel_nadia_whatsnew.php#mdm
Image
"Don't fix it if it ain't broken,don't break it if you can't fix it" Husse
Registered Linux User #511789
User avatar
Oscar799
Level 18
Level 18
 
Posts: 8700
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Re: MDM Themes

Postby twodogs on Thu Nov 22, 2012 8:36 am

Oscar799 wrote:In Mint 14 MDM is compatible with GDM 2 themes
MDM

MDM was given a lot of attention and comes with exciting new features.

MDM now supports legacy GDM 2 themes. About 30 of them are installed by default in Linux Mint 14 and you can find 2,000 more in gnome-look.org.


From here http://www.linuxmint.com/rel_nadia_whatsnew.php#mdm


Isn't 13 LTS, though? In six months time 14 will be old hat.
--
Image
Lenovo laptop B575 8 gigs memory, 750 hard drive, and Linux Mint 16 Petra Cinnamon 64-bit
User avatar
twodogs
Level 4
Level 4
 
Posts: 244
Joined: Sat Jun 09, 2007 9:18 pm

Linux Mint is funded by ads and donations.
 
Previous

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 2 guests