There are tools available to allow anyone to create and distribute a completely customized Ubuntu Based distribution using the Gnome Desktop. Many Kubuntu users would like to do the same thing but such tools are not fully compatible with KDE and the Kiosk tool does not change or remove all of the Kubuntu defaults so that a program like Remastersys can create a customized ISO with the defined changes.
This How To is designed to address these issues and allow those interested in creating their own customized distribution based on Kubuntu. Many thanks to Jamie “Boo” Birse from LinuxMint for giving me a copy of his developer notes, which without, this how to could not have been created. “Boo” is the KDE Guru at LinuxMint and is responsible for the KDE Community Editions. Because The LinuxMint KDE CE distribution is based on Kubuntu his developer notes were extremely helpful.
No modification system that totally reworks a current distribution is without issues. The main issues with this system are making sure that certain processes are done in a particular order and manner or things go wrong. Kububtu is not friendly to this process and many things will just not work if not done in the exacting order given for each process. All steps are based on several trial and error operations.
Getting A Leaner And Cleaner KDE Installed
The main issue of trying to get a customized KDE Kubuntu based distribution is dealing with many of the hidden default settings in Kubuntu to begin with. Ideally it would be much easier to have a base KDE install where those defaults are not present. Fortunately there is a way to do this using the Ubuntu Repositories.
Step One: Install Ubuntu Server
Normally when you install Kubuntu you download one of the Kubuntu ISO images and make the CD and then install it on the system. However, whether you use the Live CD, or the Alternate Install CD you are going to end up with the default setting we don't want.
In order to avoid getting those configuration files installed one needs to do the installation through another method. That method is to simply use the Ubuntu Server Edition CD instead. The server Edition does not install the X-Server and therefore does not install a GUI. Because of this we can install KDE clean and without the messy Kubuntu default settings.
Download the Ubuntu Server Edition ISO file and create the CD from the image. On the selected machine install the Ubuntu Server. When asked what additional services you wish to install do not select any. This will install only the core Ubuntu components and base files on the system.
Note: It has been suggested that using the command line install method from the kubuntu Alternate Install CD would better serve this process. However, after checking into this suggestion that method does install the Kubuntu default settings thus making it unusable to achieve the results desired by using the Ubuntu Server install method.
Step Two: Update the Installation
sudo apt-get update sudo apt-get upgrade -y
Step Three: Install X-Server, KDM, KDE-Core Pmount and Synaptic
Obviously we need to install the X-Server and KDE. However, it has to be done correctly or we may as well have used the Kubuntu CDs. Since we only have a command line at this point we will have to utilize it. Login and at the prompt and type the following command EXACTLY as I have it here:
sudo apt-get install xorg kdm kde-core pmount synaptic -y
Restart the system and bring up your base KDE install.
sudo shutdown -r now
Step Four: Use Synaptic To Install Core Software
Note: You may need to install restricted x-server drivers in order to fully utilize your video card.
Add the following to your
## Remastersys deb http://www.remastersys.klikit-linux.com/repository/ remastersys/
We need some software installed to handle key factors like sound automount and many other things. The current installation is exremely minimal and would require a great amount of time to go through and individually find all the correct packages needed. So I have used Synaptic to create a recovery file of all the software you need for your core install system.
Click Reload in Synaptic to update the apt sources.
In Synaptic go to File >> Read Markings >> browse to the file BaseBuild that was included in the archive along with this file.
Step Five: Remove the Server Kernel
There is one thing we have to clean up when using this install method, and that is the kernel. Since we used the server edition for the base install we have the server kernel. As we are either building a Desktop System, or a Demonstration System (as is the case with me) we certainly don't need the server kernel.
The corepackages file installed the 2.4.26-18-generic kernel packages (latest at time of this how to) so use synaptic to remove all of the old 2.4.6-xx-server kernel packages on your machine. (Use Completely Remove option to purge them.)
Step Six: Remove Dolphin If Desired
The KDE3 version of Dolphin File Manager is not the most popular. However it is required to install
Step Seven: Enable Device Icon Views
In order for the automount system to work correctly with the desktop, the show device icons needs to be enabled. To do this open up kcontrol (Control Center in the menu) and under 'Desktop' select 'Behavior' and then go to 'Device Icons' tab and check the box 'Show device icons'. Then install a device to the usb port, such as a thumb drive or portable USB drive. You may have to use pmount and pumount the first time you plug something in but after that the automount system should kick in.
Step Eight: Install Additional Packages
At this point I am going to let you play on your own. We are going to install the software packages we want to be included on our CD/DVD ISO image. It is completely your choice of what to install. You know what you want to have on your live CD/DVD. There is one important note about what you install though. DO NOT INSTALL ANY PACKAGE THAT WILL SETUP THE KUBUNTU DEFAULTS. If you do then the rest of this How To will become useless for use as I am basing it on a build that is free of these default settings.
Final word of warning, be careful on what you include in your customized distribution. Especially if you include non-open source packages. Some of these by their license must be installed separately by the end user. Also note, even including some open source packages may prove an issue because of some legal restrictions. If you are not sure about some things research, ask in a forum, ask those who also make distributions, etcetera. Do not land yourself in hot water for illegal distribution of software.
Finally to assist you here is a copy of my
# deb cdrom:[Kubuntu 8.04 _Hardy Heron_ - Release i386 (20080423)]/ hardy main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://us.archive.ubuntu.com/ubuntu/ hardy universe # deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ hardy multiverse deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse ## Uncomment the following two lines to add software from the 'backports' ## repository. ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. This software is not part of Ubuntu, but is ## offered by Canonical and the respective vendors as a service to Ubuntu ## users. deb http://archive.canonical.com/ubuntu/ hardy partner # deb-src http://archive.canonical.com/ubuntu/ hardy partner deb http://security.ubuntu.com/ubuntu/ hardy-security main restricted # deb-src http://security.ubuntu.com/ubuntu/ hardy-security main restricted deb http://security.ubuntu.com/ubuntu/ hardy-security universe # deb-src http://security.ubuntu.com/ubuntu/ hardy-security universe deb http://security.ubuntu.com/ubuntu/ hardy-security multiverse # deb-src http://security.ubuntu.com/ubuntu/ hardy-security multiverse ## Linux Mint Elyssa Repositories deb http://packages.linuxmint.com/ elyssa main upstream import # deb-src http://packages.linuxmint.com/ elyssa main upstream import deb http://packages.linuxmint.com/ elyssa community # deb-src http://packages.linuxmint.com/ elyssa community deb http://packages.linuxmint.com/ elyssa backport # deb-src http://packages.linuxmint.com/ elyssa backport ## Medibuntu deb http://packages.medibuntu.org/ hardy free non-free ## Bleeding Edge Wine Packages ## GPG Add Key Command: wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add - deb http://wine.budgetdedicated.com/apt/ hardy main # deb-src http://wine.budgetdedicated.com/apt/ hardy main ## Remastersys deb http://www.remastersys.klikit-linux.com/repository/ remastersys/
There is a known problem in Hardy Heron, Kaffeine is broken and will not function fully. It is best to not include it until it is fixed. If you have it installed you should purge all kaffeine files from your system or you will have issues. (This will be updated when kaffeine is fixed).
Step Nine: Create A Test Account To See Your Default Setting Changes
Use your current account as the working account where we do all the changes, editing and configuration changes. You will also need a test account to see how things come together as you do them. Test often (you should test each time you make a change to the default desk configuration) and make sure everything is coming together as you planned. Each time you make a change use Krusader or some other File manager in root mode and clean out the entire home folder (including the hidden folders, especially) of your test account. When you do that it will repopulate with new default folders and when you log into it will be as if you logged in for the first time. The reasoning and purpose of this is so we can see what a new user will experience when they use the Live CD/DVD for the first time. Since our global settings will only affect a new user we must make KDE think your test account has never been logged into before each time we use it.
This is what your initial desktop should look like. Its obviously nothing like a standard Kubuntu desktop. Which is good because we can now modify it in any manner we choose. The following steps will take you from this to your final layout step by step. In some cases I will tell you to hand edit the files and in others I will have you use the Kiosk Admin Tool. There are some cases where you can use either method, and I will mention that. However, based on my experiences while putting this How To together I will emphasize what I feel is the better method of the two.
Step Ten: Set Default Kicker Options
NOTE: If you plan on using kicker_kickoff_1, or any other menu system outside of the standard KDE Menu, in your distribution install it now before continuing with the rest of this step. Make sure all panel applets you wish to use are also installed.
Most everything we want to do with the kicker panel needs to be done via the Kiosk Admin Tool. The final part of this step will require the hand editing of a file. You will see and understand why when we get to that.
Start by opening the Kiosk Admin Tool. You will find it under 'System' in the programs section of the KDE Menu.
The default profile should be the only one listed and highlighted. Click on 'Setup Profile' to start. Then click 'Panel' you will get a notice click 'OK' to continue. Click 'Setup Panel' to begin configuring the Global default settings of the kicker panel. Just as if you were on your own desktop right click on kicker to bring up the options. Start with 'Configure Panel' Here you can set the panel looks and operations. When you are all done setting up the panel use the 'Add Applet to Panel” to select what Applets you want starting up and arrange them on the panel where you want. Go back to 'Configure Panel' to make any final adjustments. When done with that click on 'Save' in Kiosk Admin Tool to save your changes. Now use the following command to do a bit of hand editing to your default settings.
kdesu kate /etc/kde-profile/default/share/config/kickerr
Look at the line labeled:
Step Eleven: Select Your Default Cursor Theme
Setting of the default cursor is much easier now. First make sure that you have installed the cursor theme you wish to use as the default.
The following information is from Debian Admin:
If you want to change the default cursor theme first you need to install one of the available cursor themes:
For example i am installing crystalcursors
#aptitude install crystalcursors
This will complete the installation.
Now you need to run the update-alternative to set/change the current cursor-theme, when prompted give the number of the theme and press enter.
sudo update-alternatives --config x-cursor-theme
There are 24 alternatives which provide `x-cursor-theme’.
1 /etc/X11/cursors/core.theme 2 /etc/X11/cursors/redglass.theme 3 /etc/X11/cursors/whiteglass.theme 4 /etc/X11/cursors/handhelds.theme + 5 /etc/X11/cursors/crystalblue_classic.theme 6 /etc/X11/cursors/crystalblue_nonanim.theme 7 /etc/X11/cursors/crystalblueleft.theme 8 /etc/X11/cursors/crystalblueleft_classic.theme 9 /etc/X11/cursors/crystalblueleft_nonanim.theme 10 /etc/X11/cursors/crystalgray.theme 11 /etc/X11/cursors/crystalgray_nonanim.theme 12 /etc/X11/cursors/crystalgrayleft.theme 13 /etc/X11/cursors/crystalgrayleft_nonanim.theme 14 /etc/X11/cursors/crystalgreen.theme 15 /etc/X11/cursors/crystalgreen_classic.theme 16 /etc/X11/cursors/crystalgreen_nonanim.theme 17 /etc/X11/cursors/crystalgreenleft.theme 18 /etc/X11/cursors/crystalgreenleft_classic.theme 19 /etc/X11/cursors/crystalgreenleft_nonanim.theme 20 /etc/X11/cursors/crystalwhite.theme 21 /etc/X11/cursors/crystalwhite_nonanim.theme * 22 /etc/X11/cursors/crystalwhiteleft.theme 23 /etc/X11/cursors/crystalwhiteleft_nonanim.theme 24 /etc/X11/cursors/crystalblue.theme
Press enter to keep the default[*], or type selection number: 23
Using ‘/etc/X11/cursors/crystalwhiteleft_nonanim.theme’ to provide ‘x-cursor-theme’
Step Twelve: Setup the Desired Default Desktop Icons
To setup default Desktop Icons (The icons every new user will see when they first login) simply setup icons on your working desktop, use the Kiosk Admin Tool and click on 'Setup Profile' Select 'Desktop Icons' and click 'Setup Desktop Icons' then click 'Save'. This will create the file structure the default profile will use to set the default settings. Using Krusader (or some other file manager) in root mode copy the files from your working desktop directory to
If you want functional Icons for System, Home and Trash then simply cut and past each of the following into new text files on your desktop to create them. Each one should have its own file and it should be named appropriately:
[Desktop Entry] Comment=Home Folder Encoding=UTF-8 Icon=folder_home Name=Home Type=Link URL=system:/home
[Desktop Entry] Comment=Contains removed files EmptyIcon=trashcan_empty Encoding=UTF-8 Icon=trashcan_full Name=Trash Type=Link URL=trash:/
[Desktop Entry] Comment=System Folder Encoding=UTF-8 Icon=system Name=System Type=Link URL=system:/
Once the above files are created then copy them to the afore mentioned directory. Once copied all new (first time) users will get the Icons for System, Home and Trash on their desktop.
NOTE: I recommend you at least put the Trash Icon on new desktops.
Step Thirteen: Set the Default Icon Theme
To set default Icons in KDE so that all new (first time users) start with your selected Icon Theme right click on the desktop and select run command. Enter the following into the dialog box:
kdesu kedit /etc/kde-profile/defaults/share/config/kdeglobals
Just above the [KDE] section add the following:
[Icons] Theme=name of the Icon Theme you wish to use
In my case the entry looks like this
All new users I setup on my system will now default to the Oxygen Icon Theme set for KDE3 when they first login.
Step Fourteen: Set Default Background Image
Setting the default background image hand edit the following:
Here we are concerned with two entries:
In my case the entries look like this:
Kiosk Admin Tool will also do this but its a bit more time consuming.
Step Fifteen: Set the Default Theme and Color Scheme
The absolute best way to setup and install a color scheme is to use the Kiosk Admin Tool. It will allow to bring up the theme dialog. Whether you create your own color scheme or use an existing one use of the Kiosk Admin Tool is safest and most efficient way to import or select the color default and theme. Same with Style and Windows Decorations. Once you have setup the decorations, style and color themes click on save and exit .Kiosk Admin Tool. Test and see all your work come together in the test account.
Step Sixteen: Set the Default Ksplash Theme
You will have to create the file that sets the default KSplash theme. To do so use the following command:
kdesu kate /etc/kde-profile/default/share/config/ksplashrc
Simply put in the following two lines:
[KSplash] Theme=name of ksplash theme
Save the file.
Step Seventeen: Set the KDM Theme
Use the Ktheme Manager to select a KDM and restart. This will set the KDM files you will need.
Unfortunately the default kdmrc file on this setup is bad. Since its easier to replace it than to fix it I am including a copy of my kdmrc file in this package. Simply take my kdmrc and as root copy it to
kdesu kate /etc/kde3/kdm/kdmrc
Look for the line
Step Eighteen: Login Manager Settings
Like KDM this is a global setting so its a quick and simple one. In Kcontrol under 'System Administration' select 'Login Manager'. Click on 'Administrator Mode' and then enter your password. Click the 'Background' tab and select the background you want displayed. I personally like to choose the same background as the one in my default settings. You can choose whatever you want of course.
Step Nineteen: Set Default Sounds
You will have to create the file that sets the default sounds. Use the following command to do so:
kdesu kate /etc/kde-profile/default/share/config/knotify.eventsrc
I suggest you cut and past the following into it:
[exitkde] presentation=1 soundfile=/usr/share/sounds/KDE_Logout_new.wav [startkde] presentation=1 soundfile=/usr/share/sounds/KDE_Startup_new.wav
Now lets look at this one a bit. It took me awhile to figure this out. Unlike other configuration settings this is not a simple if else function, where if the user has settings use them else use default. In other words this works very differently from the other configurations and we need to know what is happening.
Lets look at the
[Textcompletion: no match] commandline[$e]= logfile[$e]= presentation=1 soundfile[$e]= [Textcompletion: partial match] commandline[$e]= logfile[$e]= presentation=1 soundfile[$e]= [Textcompletion: rotation] commandline[$e]= logfile[$e]= presentation=1 soundfile[$e]= [Trash: emptied] commandline[$e]= logfile[$e]= presentation=1 soundfile[$e]= [cancellogout] commandline[$e]= logfile[$e]= presentation=16 soundfile[$e]= [cannotopenfile] commandline[$e]= logfile[$e]= presentation=0 soundfile[$e]= [catastrophe] commandline[$e]= logfile[$e]= presentation=2 soundfile[$e]= [exitkde] commandline[$e]= logfile[$e]= presentation=1 soundfile[$e]=KDE_Logout_3.ogg [fatalerror] commandline[$e]= logfile[$e]= presentation=2 soundfile[$e]= [messageCritical] commandline[$e]= logfile[$e]= [messageInformation] commandline[$e]= logfile[$e]= presentation=65 soundfile[$e]=KDE_Chimes_2.ogg [messageWarning] commandline[$e]= logfile[$e]= presentation=1 soundfile[$e]=KDE_Error_1.ogg [messageboxQuestion] commandline[$e]= logfile[$e]= presentation=65 soundfile[$e]=KDE_Vox_Ahem.ogg [notification] commandline[$e]= logfile[$e]= presentation=1 soundfile[$e]=KDE_Beep.ogg [printerror] commandline[$e]= logfile[$e]= presentation=2 soundfile[$e]= [startkde] commandline[$e]= logfile[$e]= [warning] commandline[$e]= logfile[$e]= presentation=2 soundfile[$e]=
Now lets look at Kubuntu's default knotify.eventsrc file that sets their default sounds.
[messageCritical] presentation=65 soundfile=/usr/share/sounds/KDE_Error_1.ogg [startkde] presentation=1 soundfile=/usr/share/sounds/kubuntu-login.ogg
Carefully look at the user file then look at the default file. You will notice that the lines in the default file fill in the missing lines from the user's file. For example The KDE startup sound is defined in our default file but the lines in the default file do not exist in the users file.
This is a typical entry for a event sound in the users file:
[warning] << Name of Event commandline[$e]= logfile[$e]= presentation=2 soundfile[$e]=<<path and name of soundfile
If we have a defined default sound then last two lines are removed and those lines are read from the default file making this an if then process. If the presentation and soundfile lines are not present in file <a> then read from file <b>. Which makes for a somewhat confusing scenario.
Add to that any attempt to dig up actual documentation on the file entries utterly failed. The only thing I could find out is if you set
So with all that in mind if you decide to define default sounds then here is what I suggest you do to ensure they work. Use the presentation= number as defined from the file I took from my
In the file
[event] presentation=number as defined in the list soundfile=path/name to file
Do this for each event you want to have a default sound for.
Step Twenty: Clean Up For ISO Creation
Once you have tested and are satisfied with everything then remove and delete the test user account. Now open a terminal and use the following command:
sudo apt-get clean
Close the terminal.
Step Twenty-One: Create the ISO Image
Using Remastersys is pretty straightfoward. In this case we want to make a distributable copy. However, we need to modify the Remastersys config files first.
Select “Modify the remastersys config file to customize options” and click “OK”
The only two you really need to concern yourself with are Title and Filename. Change those to what you want then return to the main menu.
Select “Make a Distributable copy to share with friends” and click “OK”
Remastersys will now build your ISO file. That file once made will be located in
Burn your first CD or DVD and test it out.
Here is how the desktop on my Live DVD came out:
Technical Note of Interest:
Notes On the Process:
What I Learned By Doing This
Knowing what can be done and knowing how to do it are, as always, two completely different things. The exercise I put myself through in doing this was to teach myself not only how, but why wasn't it better documented. The information presented in this How To derived from my poking around more than what I found online. If it hadn't been for 'Boo's' notes many aspects of this How To would never have evolved. I think the main reason that documentation is a bit poor is that those who usually do this aren't really users, but developers. Developers are pretty much poor documenters. They generally make and keep notes for their purposes and though other developers can usually understand them the average user gets very confused, very fast. Fortunately with my first computing experience being in development (No I do not write code anymore and have no real desire to) I was able to at least decipher many of the things I did come across to put this How To in a format that a typical end user can read, understand and implement. It does of course assume that the user, in this case, has a working knowledge in KDE Operations and KDE Administration at a minimum.
KDE is remarkably configurable and is in reality very easy to configure. Knowing how to configure it (especially the defaults) is the trick in this case. Because of programs like Remastersys anyone can create a Live CD/DVD with an installer. However, despite the fact that doing a total customization setup for Gnome was easy, for KDE it was not.
This How To IS NOT complete and there are many more aspects that need to be covered. Such as defining other possible default settings such as automount, the desktop and other options. Yet it is a definite step into getting this to be a much easier process for us KDE users and supporters. So while I will continue to poke around and add on to this document, it also my hope that others will become more involved as well, and also add on to it. With KDE4 becoming closer everyday to being usable in a full productivity environment the need to update this document for it becomes apparent.
Why did I choose Kubuntu? Mostly because they annoyed me with some of the things they did with Gutsy, and now Hardy. It was a challenge to find all the little locked in defaults they had and I was more than happy to figure out how to circumvent them. Considering that this How To is also a proof of concept the idea is if I can do it to a distribution that locks you down a bit harder then imagine what can be done in a distribution designed to allow you to do this in the first place.
So to that end I have at least made the start of a user friendly How To. So to everyone all I can say is here is what we have always wanted, the information we need to make a completely customized KDE based distribution. Though not complete (yet) it is a definite beginning and best of all written in a much more user friendly format.