I use(d) 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.
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()
The script can be used on LMDE and KDE with Thunar as a file manager. If you know a way to use it in Dolphin, please tell how.
Images by GeneC.
Enjoy!