How To Make A Fully Customized KDE Live CD/DVD Using Kubuntu - Page 4

Step Seventeen: 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 paste 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 let's 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 happenning.

Let's look at the knotify.eventsrc file in my home directory here:

[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 let's 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 enteries utterly failed. The only thing I could find out is if you set presentation=0 no sound will play for that event even if defined. So in other words I haven't a clue about the rest of the entries and I have no idea what effect the numbers under presentation= does. Though best guess is its a time delay of some kind. Whatever [$e] means, well your guess is as good as mine on that.

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 ~/.kde/share/config/ folder.

In the file /etc/kde-profile/default/share/config/knotify.eventsrc make entries like so:

[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 Eighteen: 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 Nineteen: 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 /home/remastersys/remastersys/filename.iso.

Burn your first CD or DVD and test it out.

 

Technical Note of Interest: What Is Weird?

When I first started this process I had a major issue with USB thumb drives not being automounted. During the course of building my Demo Distribution for my Proof of Concept I had to use pmount and pumount to use my thumb drives. At some point they magically started working while I made the modifications to the default settings. What triggered the automount to start working I have no idea. I do know it just “magically” started working like its supposed to so I am not overly worried about it. You will probably have the same experience and if anyone can figure out what the heck the trigger is I would like to know more for curiosities sake.

 

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 the defining of default system sounds and other settings. 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.

--Shaun Marolf
a.k.a. Technoshaun

Share this page:

1 Comment(s)

Add comment

Comments

From: rui pedro

Hi,

 This is a nice "How To" and I feel sorry for not reading it before I tried to use Remastersys in Kubuntu.

But I guess that what the users really want is a tool that does all the job automatically.

Congratulations for this good tutorial.

 

Regards