- Code: Select all
cat /etc/init.d/mintsystem
cat /etc/init.d/mintsystem
rose@mars ~ $ cat /etc/init.d/mintsystem
#! /bin/sh
### BEGIN INIT INFO
# Provides: mintsystem
# Required-Start: $local_fs $syslog $remote_fs dbus
# Required-Stop: $local_fs $syslog $remote_fs
# Default-Start: S
# Default-Stop:
### END INIT INFO
/usr/lib/linuxmint/mintSystem/mint-adjust.py

/usr/lib/linuxmint/mintSystem/mint-adjust.py
rose@mars ~ $ cat /usr/lib/linuxmint/mintSystem/mint-adjust.py#!/usr/bin/python
import os
import commands
import sys
from time import strftime
# Prepare the log file
global logfile
logfile = open("/var/log/mintsystem.log", "w")
def log (string):
logfile.writelines("%s - %s\n" % (strftime("%Y-%m-%d %H:%M:%S"), string))
logfile.flush()
log("minSystem started")
try:
# Read configuration
sys.path.append('/usr/lib/linuxmint/common')
from configobj import ConfigObj
config = ConfigObj("/etc/linuxmint/mintSystem.conf")
# Default values
if ('global' not in config):
config['global'] = {}
if ('enabled' not in config['global']):
config['global']['enabled'] = "True"
if ('restore' not in config):
config['restore'] = {}
if ('lsb-release' not in config['restore']):
config['restore']['lsb-release'] = "True"
if ('etc-issue' not in config['restore']):
config['restore']['etc-issue'] = "True"
config.write()
# Exit if disabled
if (config['global']['enabled'] == "False"):
log("Disabled - Exited")
sys.exit(0)
# Perform file overwriting adjustments
adjustment_directory = "/etc/linuxmint/adjustments/"
array_preserves = []
if os.path.exists(adjustment_directory):
for filename in os.listdir(adjustment_directory):
basename, extension = os.path.splitext(filename)
if extension == ".preserve":
filehandle = open(adjustment_directory + "/" + filename)
for line in filehandle:
line = line.strip()
array_preserves.append(line)
filehandle.close()
overwrites = {}
if os.path.exists(adjustment_directory):
for filename in sorted(os.listdir(adjustment_directory)):
basename, extension = os.path.splitext(filename)
if extension == ".overwrite":
filehandle = open(adjustment_directory + "/" + filename)
for line in filehandle:
line = line.strip()
line_items = line.split()
if len(line_items) == 2:
source, destination = line.split()
if destination not in array_preserves:
overwrites[destination] = source
filehandle.close()
for key in overwrites.keys():
source = overwrites[key]
destination = key
if os.path.exists(source):
if not "*" in destination:
# Simple destination, do a cp
if os.path.exists(destination):
os.system("cp " + source + " " + destination)
log(destination + " overwritten with " + source)
else:
# Wildcard destination, find all possible matching destinations
matching_destinations = commands.getoutput("find " + destination)
matching_destinations = matching_destinations.split("\n")
for matching_destination in matching_destinations:
matching_destination = matching_destination.strip()
if os.path.exists(matching_destination):
os.system("cp " + source + " " + matching_destination)
log(matching_destination + " overwritten with " + source)
# Restore LSB information
if (config['restore']['lsb-release'] == "True"):
if os.path.exists("/etc/lsb-release"):
lsbfile = open("/etc/lsb-release", "w")
if (commands.getoutput("grep DISTRIB_ID /etc/linuxmint/info").strip() != ""):
lsbfile.writelines(commands.getoutput("grep DISTRIB_ID /etc/linuxmint/info") + "\n")
else:
lsbfile.writelines("DISTRIB_ID=LinuxMint\n")
lsbfile.writelines("DISTRIB_" + commands.getoutput("grep \"RELEASE=\" /etc/linuxmint/info") + "\n")
lsbfile.writelines("DISTRIB_" + commands.getoutput("grep CODENAME /etc/linuxmint/info") + "\n")
lsbfile.writelines("DISTRIB_" + commands.getoutput("grep DESCRIPTION /etc/linuxmint/info") + "\n")
lsbfile.close()
log("/etc/lsb-release overwritten")
# Restore /etc/issue and /etc/issue.net
if (config['restore']['etc-issue'] == "True"):
issue = commands.getoutput("grep DESCRIPTION /etc/linuxmint/info").replace("DESCRIPTION=", "").replace("\"", "")
if os.path.exists("/etc/issue"):
issuefile = open("/etc/issue", "w")
issuefile.writelines(issue + " \\n \\l")
issuefile.close()
log("/etc/issue overwritten")
if os.path.exists("/etc/issue.net"):
issuefile = open("/etc/issue.net", "w")
issuefile.writelines(issue)
issuefile.close()
log("/etc/issue.net overwritten")
except Exception, detail:
print detail
log(detail)
log("mintSystem stopped")
logfile.close()


rose@mars /var/log $ cat mintsystem.log
2010-12-08 20:57:07 - minSystem started
2010-12-08 20:57:07 - /opt/firefox/searchplugins/yahoo.xml overwritten with /usr/share/linuxmint/adjustments/firefox/yahoo.xml
2010-12-08 20:57:07 - /opt/firefox/defaults/profile/mimeTypes.rdf overwritten with /usr/share/linuxmint/adjustments/firefox/mimeTypes.rdf
2010-12-08 20:57:07 - /opt/firefox/browserconfig.properties overwritten with /usr/share/linuxmint/adjustments/firefox/browserconfig.properties
2010-12-08 20:57:08 - /usr/share/synaptic/glade/window_main.glade overwritten with /usr/lib/linuxmint/mintSystem/adjustments/synaptic.glade
2010-12-08 20:57:08 - /opt/firefox/defaults/profile/bookmarks.html overwritten with /usr/share/linuxmint/adjustments/firefox/bookmarks.html
2010-12-08 20:57:08 - /opt/firefox/defaults/pref/firefox-branding.js overwritten with /usr/share/linuxmint/adjustments/firefox/firefox.js
2010-12-08 20:57:08 - /etc/gdm3/greeter.gconf-defaults overwritten with /usr/share/linuxmint/adjustments/gdm3/greeter.gconf-defaults
2010-12-08 20:57:08 - /opt/firefox/searchplugins/google.xml overwritten with /usr/share/linuxmint/adjustments/firefox/google.xml
2010-12-08 20:57:08 - /etc/lsb-release overwritten
2010-12-08 20:57:08 - /etc/issue overwritten
2010-12-08 20:57:08 - /etc/issue.net overwritten
2010-12-08 20:57:08 - mintSystem stoppedrose@mars /etc/linuxmint $ cat mintSystem.conf
[global]
enabled = True
[restore]
lsb-release = True
etc-issue = Truerose@mars /usr/lib/linuxmint/common $ ls
configobj.py launch_browser_as.py mint-which-launcher.py
configobj.pyc launch_browser.sh version.pyrose@mars /etc/linuxmint/adjustments $ ls
10-mintsystem-synaptic.overwrite 15-gdm3.overwrite 15-opera.overwrite
15-firefox.overwrite 15-gnome-sound.overwrite README/usr/share/linuxmint/adjustments/gdm3/greeter.gconf-defaults /etc/gdm3/greeter.gconf-defaults

cat /usr/share/doc/desktop-base/README.Debian
README for desktop-base
=======================
1. Images
1.1. Emblems
1.2. Pixmaps
1.3. Splash and Wallpapers
1.4. Boot splash
2. Desktop files
3. Changing desktop-base images
4. Window Managers
1. Images
1.1. Emblems
/usr/share/icons/hicolor/48x48/emblems/emblem-debian.png
/usr/share/icons/hicolor/48x48/emblems/emblem-debian.icon
1.2. Pixmaps
/usr/share/pixmaps/debian-security.png
1.3. Splash, wallpapers and grub images
Wallpapers are provided in two svg variant, one standard aspect (4/3) and one
widescreen (16/9). You can switch from one another using the alternatives.
Using the same system you can select one of the older theme variant. Beware
that changing alternative means at the next package upgrade it won't be
automatically reverted to the default choice.
For wallpaper you can run:
sudo update-alternatives --config desktop-background
For splash screens you can run:
sudo update-alternatives --config desktop-splash
For grub, you can select standard or widescreen version too, using:
sudo update-alternatives --config desktop-grub
2. Desktop files
/usr/share/desktop-base/debian-homepage.desktop
/usr/share/desktop-base/debian-reference.desktop
/usr/share/desktop-base/debian-security.desktop
3. Changing desktop-base images
We need professional looking Debian artwork in the
Desktop. If you want to help changing some desktop-base
images, that would be good consider the following notes:
- The swirl Debian logo is red;
- The Debian font is Poppl Laudation Condensed (unfortunately,
commercial font)
- Blue (#5F92C9 and some others) fits with GNOME default
clearlooks theme that we use in your default desktop
environment and looks good in KDE too;
- Black and White are welcome colors too.
If you've suggestions for a better artwork, create or edit
the images and open a 'wishlist' bug against desktop-base in our
Bug Tracking System (http://bugs.debian.org/). Please attach the
'svg' or 'xcf' and don't violate copyright.
4. Window Managers
desktop-base is used by GNOME/KDE/Xfce.
If you're responsible for a WM in Debian and wants to use
desktop-base artwork or add your own image (wallpaper, splash,
whatever) use the layout described above and send your patch
through the Bug Tracking System to us.



--- /etc/gdm3/greeter.gconf-defaults 2010-12-10 16:22:09.332256236 +0000
+++ /etc/gdm3/greeter.gconf-defaults.dpkg-new 2010-11-14 10:22:12.000000000 +0000
@@ -1,13 +1,15 @@
# Use a specific background
-/desktop/gnome/background/picture_filename /usr/share/backgrounds/linuxmint/default_background.jpg
-/desktop/gnome/background/picture_options stretched
+#/desktop/gnome/background/picture_filename /usr/share/images/desktop-base/login-background.svg
+#/desktop/gnome/background/picture_options zoom
# Theming options
-/desktop/gnome/interface/gtk_theme Mint-X
-#/desktop/gnome/interface/icon_theme Mint-X
+#/desktop/gnome/interface/gtk_theme Clearlooks
# Greeter options
-#/apps/gdm/simple-greeter/logo_icon_name debian-swirl
+/apps/gdm/simple-greeter/logo_icon_name debian-swirl
+
+# Play system beeps - especially the one when the greeter is ready
+/desktop/gnome/sound/event_sounds true
# Some other possible options
#/apps/gdm/simple-greeter/banner_message_enable true
@@ -18,3 +20,5 @@
# The lower panel doesn't work with the compositor
/apps/metacity/general/compositing_manager false
+# Prevent the power management icon from showing up
+/apps/gnome-power-manager/ui/icon_policy neve

/etc/gdm3/greeter.gconf-defaults/usr/share/linuxmint/adjustments/gdm3/greeter.gconf-defaults
/etc/linuxmint/adjustments/15-gdm3.preserve
/etc/gdm3/greeter.gconf-defaults
RHTopics wrote:I made my changes to the gdm3 login theme permanent by creating the file:
- Code: Select all
/etc/linuxmint/adjustments/15-gdm3.preserve
This text file contains just the following line:
- Code: Select all
/etc/gdm3/greeter.gconf-defaults
You will need to use sudo or root privileges to create and edit the file.

Very smart approach. "15-gdm3.overwrite" is there from before, but .preserve files are read first. Excellent!

mads wrote:
- Code: Select all
/etc/gdm3/greeter.gconf-defaults
is replaced/overwritten by
- Code: Select all
/usr/share/linuxmint/adjustments/gdm3/greeter.gconf-defaults
on every restart.




Users browsing this forum: No registered users and 2 guests