Sie sind auf Seite 1von 12

Instructions for remastering Linux Mint and personalizing the live user session

Feel free to contact me if you have any questions or suggestions on Google+


https://plus.google.com/113485041215864877874/posts
I copied and pasted instructions from the following forum post and inserted my own notes in
the relevant spots.
http://community.linuxmint.com/tutorial/view/918
Here is the link to my latest remastered .iso image with all the changes in this guide
http://bit.ly/PetesRemaster
Note: old dropbox link wont work anymore, use this new link

Here are some screenshots of my remaster from the above link

1. Decompress the ISO:


Download Linux Mint 13 mate edition (this is what i used, so some of my instructions
are Mate specific)
From the Linux Mint Website: http://www.linuxmint.com/edition.php?id=103
Install the package "mintconstructor" from the repositories
Open a terminal and type:
sudo /usr/lib/linuxmint/mintConstructor/mintConstructor.py
A mintconstructor window will open:
In the "Directory" field, choose a directory for the ISO.
Type the name for a new directory and the program will create it.
For example: /home/your_user_name/remaster/
note: this same project directory will be used for other examples in this guide
Make sure to click the "New project" button

Click the browse button on the right of the "ISO file" field and point it to your ISO file
Click "Next" and then "Yes" to confirm.
2. Modify the system
Most modifications are done via the mintconstructor chroot terminal.
To access the contents of the ISO and modify it, click on the "Open a chroot
terminal" button.
In this chroot terminal, you can type commands, install and remove packages and
this will have a direct impact on the ISO, its contents and the contents of the system
which installs itself from the ISO to the Hard drive when installed.
If you just need to edit a text file or add/delete files, you can also perform these tasks
by opening a root file manager instead of using nano in the chroot terminal (but you
can use nano in the chroot terminal if you wish).
To open a file manager as root in mate, press alt+f2 for the run command and run
gksu caja
TIP: mintconstructor uses xterm when you open a chroot terminal. The usual ways of
copy and pasting dont work here (such as dragging text in to the terminal, or
shift+ctrl+v). To paste text into xterm, highlight the text to be copied, then in the
terminal with your mouse, middle click, or with your touchpad simultaneously press
the left+right touchpad buttons.
The following steps reflect software that I wanted to add/remove and changes that I
like
You can perform these too, or do your own
Skip down to step 3 (clean up), if you dont want to do any of these modifications

Get the latest updates


in the mint constructor chrooted terminal type
apt-get update
then
apt-get upgrade
reboot (this is necessary, or the build will fail)
After reboot, get back into the chrooted terminal.

remove any unwanted software


in the chrooted terminal remove packages like the following example
apt-get remove virtualbox-guest-utils

Install software from the repository


in the chrooted terminal, install new software like the following example

apt-get install cheese docky inkscape testdisk unetbootin grsync


gprename shiki-wise-theme shiki-brave-theme laptop-mode-tools
preload gnome-disk-utility skype

Replace the default display manager mdm with an alternative like lightdm
in the chroot terminal, remove mdm
apt-get remove mdm
then install lightdm (and a few extra packages that it needs for theming)
apt-get install lightdm gnome-settings-daemon indicator-session-gtk2
unity-greeter ubuntu-mono light-themes
edit the following file
/remaster/root/etc/lightdm/lightdm.conf
edit the file to look like this:
[SeatDefaults]
greeter-session=unity-greeter
user-session=mate

save the file and exit

Install the latest version of Gimp (stable) (optional)


I found instructions on the following webpage:
http://www.webupd8.org/2012/05/gimp-28-stable-finally-available-for.html
In the chroot terminal perform the following:
add-apt-repository ppa:otto-kesselgulasch/gimp
apt-get update
apt-get install gimp

Turn on the firewall by default


edit as root:
/remaster/root/etc/ufw/ufw.conf (change the no to yes)
ENABLED=yes

Fix power button bug


(issue that causes power button to shut down immediately with no prompt)
(followed instructions from this page) https://bugs.launchpad.net/linuxmint/
+bug/1010608
edit this file /remaster/root/etc/acpi/powerbtn.sh
add the last line in the appropriate spot (look for the first 3 lines):
[ -r /usr/share/acpi-support/power-funcs ] && getXconsole
PMS="gnome-settings-daemon kpowersave xfce4-power-manager"
PMS="$PMS guidance-power-manager.py dalston-power-applet"
PMS="$PMS mate-settings-daemon"

Remove the "Install Mint" icon from the desktop


(installer will still be in the menu)

rename the following file:


from: /remaster/root/usr/share/applications/ubiquity-gtkui.desktop
to: /remaster/root/usr/share/applications/Install Mint.desktop

Customize lightdm theme


(change login screen background, remove the dots, use a custom logo, and change
the default background color to black instead of purple)
I found this info on the following page on the comment by user samb
http://askubuntu.com/questions/64001/how-do-i-change-the-wallpaper-inlightdm/121594#121594 )
edit the following file: /remaster/root/usr/share/glib-2.0/schemas/com.canonical.unitygreeter.gschema.xml
find the line:
<key name="background" type="s">
<default>'/usr/share/backgrounds/warty-final-ubuntu.png'</default>

change to the path of the image you want


heres the background I used: http://i.imgur.com/E82e7.jpg (found it in a google
search)
For example, copy the image YourImage.jpg to
/remaster/root/usr/share/backgrounds/ In the file, type the path without
/remaster/root like the following example
<default>'/usr/share/backgrounds/YourImagejpg'</default>

the same goes for any other images, do not include /remaster/root
find the line:
<key name="draw-user-backgrounds" type="b">
<default>false</default>

change to true
find the line:
<key name="draw-grid" type="b">
<default>true</default>

change to false
find the line:
<key name="logo" type="s">
<default>'/usr/share/unity-greeter/logo.png'</default>

enter the path of your own custom logo or use the one I made
http://i.imgur.com/Ki8uR.png. Its small and white on a clear background, so it may
be hard to see in the browser.

find the line:


<key name="background-color" type="s">
<default>'#2C001E'</default>

change to #000000
in the mintconstructor chrooted terminal run the following command to apply
changes:
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

Customize lightdm logos


(change the generic white dot badge (on the login box) to something nice)
open the following image in gimp:
/remaster/root/usr/share/unity-greeter/unknown_badge.png
edit the icon to your liking and save.
or just use the one I made http://i.imgur.com/OsKY7.png.
its small and white with a clear background, so it may be hard to see in the
browser.

Prevent Lightdm and unity greeter from upgrading (to save your customized
theme)
note: If you dont prevent these 2 updates, your login screen will change to the
default purple with dots and generic logos anytime they are upgraded.
In the chroot terminal run the following command
echo lightdm hold | dpkg --set-selections
echo unity-greeter hold | dpkg --set-selections
next create the following file
/home/user/remaster/root/etc/linuxmint/mintupdate.ignored
add the following lines and save
lightdm
unity-greeter

Mate updates
(install new updates with backports from Mint 14)
found here: http://blog.linuxmint.com/?p=2225
edit /etc/apt/sources.list
find the line:
deb http://packages.linuxmint.com/ maya main upstream import
add (without the quotes) backport to the end. should look like this:
deb http://packages.linuxmint.com/ maya main upstream import backport
save the file
In the chroot terminal run
apt-get update

then
apt-get upgrade

Customize fstab
(add noatime,nodiratime mount option for ext3/4 file systems for less disk writes)
edit /lib/partman/fstab.d/ext3
find the lines:
options="errors=remount-ro"
else
options="${options},errors=remount-ro"
add (without the quotes) noatime,nodiratime, right before errors.
It should look like this:
options="noatime,nodiratime,errors=remount-ro"
else
options="${options},noatime,nodiratime,errors=remount-ro"

Change mintupdate frequency to every 15 days (or longer)


(because updating everyday gets annoying)
copy the file /etc/linuxmint/mintupdate.conf from a running system
(because that file doesnt exist on the livecd)
paste the file into your remaster directory to the same location
edit the file, find the lines:
[refresh]
timer_minutes = 0
timer_hours = 0
timer_days = 15
change to your liking
save and exit

Install extra programs from web:


https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
http://www.teamviewer.com/download/teamviewer_linux.deb
http://www.truecrypt.org/downloads

note: to install the .deb files, copy the files to /home/user/remaster/root/


then in the mintconstructor chroot terminal type
dpkg -i application_name.deb
once it is done installing you can delete the installer file with this command
rm application_name.deb
to install truecrypt, copy the downloaded file to /home/user/remaster/root/
uncompress the file with this command

tar -xvf truecrypt-7.1a-linux-x86.tar.gz


then run the installer
./truecrypt-7.1a-linux-x86
then you can delete the installer and compressed file

change lock screen background


(the lock screen when resuming from suspend)
edit the following file:
/home/user/remaster/root/etc/mateconf/mateconf.xml.defaults/%mateconftree.xml
find the following line:
<stringvalue>/usr/share/backgrounds/linuxmint/default_background.jpg</strin
gvalue>
replace default_background.jpg with the path to whatever image you want.

remove autostart programs


(stop things like remote desktop sharing and upload manager from starting)
navigate to the following folder
/etc/xdg/autostart
delete any shortcuts to programs that you dont want to autostart

3. clean up
Once you're finished making modifications, make sure to clean up with the following
commands in the mintconstructor chroot terminal
aptitude purge ~c
aptitude unmarkauto ~M
apt-get clean
rm -rf /var/cache/debconf/*.dat-old
rm -rf /var/lib/aptitude/*.old
rm -rf /var/lib/dpkg/*-old
rm -rf /var/cache/apt/*.bin
updatedb
history -c
rm /root/.bash_history
rm /root/.nano_history
history -c
4. Rebuild a new ISO
Close the chroot terminal

Click Next
Give your ISO a description (which will be embedded as the name of the CD or USB stick
onto which the ISO is burnt)
Click Next
You can see the progress of the image being built in the terminal that you used to start
mintconstructor.py. On my eeepc, it takes a little over an hour to finish.
note1: If the build fails, for example your .iso should be around 1GB in size.
If it is much smaller (like 200MB) then it failed.
Reboot your machine, then try the build again.
note2: If you give your remaster too long of a filename, It will also fail. The program will say
successfull, but the file will
not exist. shorten the name and try again.
note3: You can now burn the .iso to a disk or use unetbootin to run it from a usb drive.

Personalizing the LiveCD/USB desktop


These steps will allow you to customize the live user session. The customizations will also
carry over to users if your remaster is installed to a disk.

Boot to your newly created .iso


Customize it:
after you have booted into the remastered live session go ahead and customize the
desktop to your liking.
you can rearrange the panel, change wallpaper, add icons to desktop, add items to
the autostart list. pretty much anything.
Log out and back in again
For all your changes to take effect, you must log off from the live user session.
Log back in. username: mint
password:__________(no password, just press
enter)
Save configuration files
have a USB stick handy to copy files into
open a file manager
you should now be in the home folder of the user mint
press ctrl+h to see the hidden files
copy the following folders from the mint home folder on to the USB flash drive:
.config, .gconf, .mateconf, and .mateconfd
If you have files on the desktop then copy over the Desktop folder too.
Reboot
boot back in to your own linux installation where you are remastering Linux Mint
open a file manager as root. In Mint Mate edition, press alt+F2 to bring up the run
window. Enter gksu caja , press enter and enter your password when prompted
copy the configuration files that you copied on to the USB drive and paste them in to
your working directory in the following location:
/home/username/remaster_directory/root/etc/skel/

of course, you need to find your own username and working directory name
Rebuild
once the files have been copied over, just rebuild the image like you did the first time
Test
when the image is finished building, burn it to disk, or use unetbootin to make a
bootable USB stick.
boot into it and test it out.
the desktop should look exactly as it did when you customized it on the second step
above.
Description of folders in /root/etc/skel/ directory

note: Leave the empty %*.xml files alone in any of the folders that you want the settings
saved for. They are required.
I only listed the folders that I actually use. All other files and folders were deleted. The
system will create new defaults as it needs them.
/remaster/root/etc/skel/
any files places in here will be on the live user session home directory
/remaster/root/etc/skel/Desktop/
any files places in here will be on the live user session Desktop
/remaster/root/etc/skel/.cofig/
Any application specific settings are saved here
/autostart/*
shortcuts to apps that you want autostarted with the LiveCD
/chromium/*
settings shared between chromium and chrome
/google-chrome/*
settings for google chrome
/libreoffice/*
settings for libreoffice
/mate/backgrounds.xml
list of backgrounds (wallpaper)
/remaster/root/etc/skel/.gconf/apps/
settings for gnome2 apps
/docky-2/
docky settings

/remaster/root/etc/skel/.local/share/applications/
any applications manually added to the menu using the menu editor wind up
in here, otherwise not used.
/remaster/root/etc/skel/.mateconf/apps/
mate apps specific settings
/caja/
file manager settings (show/no show icons on the desktop)
/eom/
desktop ui settings
/marco/
desktop theme settings
/mate-notification-daemon/
notification popup options
/panel/
mate panel settings
/remaster/root/etc/skel/.mateconf/desktop/mate/
mate desktop settings
/backgroung/
desktop background options
/interface/
icon and gtk theme settings
/peripherals/
keyboard, mouse, and touchpad settings
/remaster/root/etc/skel/.remaster_changelog
dated list of any changes made to the remaster
~fin~

Das könnte Ihnen auch gefallen