PDA

View Full Version : kde menu customization



stclaus
05-13-2005, 02:45 AM
hi,
I am doing a knoppix remaster, but I am unable to customize the kde menu. I cannot understand where does knoppix store kmenu informations for the knoppix user that is created after the boot of live cd.

I tried the usual paths such as /usr/share/applnk, or /etc/skel/.kde/applnk, but I didn't success on this customization: I get every time the default menu (except the KNOPPIX folder, that I removed from /usr/share/applnk: but if I add another folder, named different than "Knoppix", it doesn't appear in menu).

any idea about this ?

thanks,

-- Lorenzo

UnderScore
05-13-2005, 05:08 AM
Have you seen this: http://www.knoppix.net/forum/viewtopic.php?t=18156. You may have to edit the 45session file again to make sure it doesn't "overwrite" your menu choices.

stclaus
05-13-2005, 08:23 PM
The thread you posted in reply does not exhaustively answer to my question.. I still cannot understand where does Knoppix exactly save kmenu configuration! I will keep on "deciphering" Knoppix's arcane (for me) scripts that rebuild every time kde menu.. :)

thanks for your help,

-- Lorenzo

spyhome
05-13-2005, 10:14 PM
I want to start another script out of the knoppix menu in the taskbar. Isn' t there a way to start up kde inside the chroot and do changes in there? That would make a configuration much easier and I would be able to set things up the way I like them (smaler taskbar, smaler icons, dark background). I hope someone can give me a hint :-)

Greatings

Christian

spyhome
05-15-2005, 08:09 AM
It works :-)

Ok. finally I was abel to change the dektop layout inside the chroot and have it on my remastered knoppix.
I did the remaster process with the knoppix-remaster script of Fabianx. You can find his howto here:
http://www.knoppix.net/forum/viewtopic.php?t=12530

When it comes to the section where you should chroot into your remaster, I quit the script and did some changes to
get KDE work unter my remaster. I switched to the console with init 2.

There are a couple of things I had to move into my remaster KNOPPIX to start KDE inside the chroot. First of all I did
everything the way fulvioo described it:
http://www.knoppix.net/forum/viewtopic.php?t=18698

If you are not able to start KDE as user "knoppix" inside the chroot, you might try to change the permissions of /tmp.
chmod 777 /tmp

so the overall process will be:
chroot /my_remaster
mount -t proc /proc proc
chmod 777 /tmp
su knoppix
startx
(another description of how you can get KDE work in your chroot is here:
http://www.knoppix.net/forum/viewtopic.php?t=13867
you really need to take care of every step since not all howto's pay attention to all the tiny things.)

After you have changed all your KDE things, you need to get back to the console via K-Menu -> Sign Off -> Leave Session
Back in the console don't forget to switch back to be root by typing 'exit' an unmount all your mounts including the /proc
Do the changes fulvioo described in his howto and also change the settings from /tmp back to 555.
Leave the chroot with CRTL+D and return into the KDE with init 5.

Now we can go on with the knoppix-remaster script of Fabianx. Start it up and say "no" when it ask you if you want to create a new remaster. Select the remaster folder you have choosen and the go on with the build of the compressed imgage.

(sorry for my short description here, its early in the morning here in Germany and I'm not really by myself :-).

CU
Christian

Inside KDE you can do all the changes you want to suit your

spyhome
05-15-2005, 04:53 PM
OK, I was a little too euphoric.

I figured that not all of my changes that I made in the taskbar have been taken over to the new iso.
I deleted the "window list" in my taskbar and replaced it with a link to a script myscript.sh that I put into /usr/sbin/myscript.sh
I changed the Icon and made it start when the user knoppix klicks on it.
But after I build my custon knoppix, I just get a gear icon instead of the one I choosed and the following message:

"The desktop entry file /home/knoppix/.kde/share/apps/kicker/myscript.sh.desktop has no Typ2=... entry.

So I decided to look up the KDE page to get things working in my /etc/skel/.kde/share/apps/kicker/ directory. And I found the myscript.sh.desktop file and edit it like:
----
[Desktop Entry]
Encoding=UTF-8
Icon=kthememgr
Name=MyScript
Name[en_US]=MyScript
Type=Link
URL=/usr/sbin/script.sh
---

I also tried these two ways in my /etc/X11/Xsession.d/45xsession

rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2>/dev/null
rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2>/dev/null

but that didn't helped me. Does anybody has an idea what I'm missing?

CU
Christian

katana5
05-16-2005, 07:37 PM
First, let me just say that I'm still a relative noob when it comes to remastering Knoppix, and I'm not a linux / unix expert by any means, so I still have a lot left to learn.

I've been all over the forums looking for an answer to the remastering problems with KDE menu items, and kicker panel item changes not appearing when booting from the ISO that's created from a remaster.

I've spent the better part of the day trying to figure out why when my CD's boot they look nothing like when I go into KDE from my remaster environment, and I think the answer lies more with user permissions then rsynch commands in the 45Xsession file.

This is what I noticed. If I boot from one of my remasters, and simply type "knoppix 2" at the boot prompt, the cd boots, but does not enter KDE.

If I type whoami, the response at this point is root. So if I simply type "startx" at this point, and KDE starts, my remaster looks exactly as it should. If I now exit the current kde session, and su - knoppix, and run startx again. viola! desktop appears as it aways does. So, permissions problem....

Now the frustrating thing is figuring out what exact permissions are incorrect. If I take the .config dir from /home/root and move that to /home/knoppix and chown it to knoppix, this doesn't do that trick, so there is something else that is a problem.

I think it has more to do with when remastering, when packages are installed, they are more then likely installed so as to give user/owner privledges to root, therefore user knoppix by default does not have sufficient permissions to access them, I would assume this would be true for additional themes, icons etc.

So one way of cheating that will probably work, is to just add the knoppix user to the root users group. I did that, su'd to user knoppix and then ran startx, and what I see is now 90% of my remaster looking the way it should.

So I still have some things to figure out, but if someone knows if I am on the right track, let me know. There has to be a simple answer to this somewhere.

stclaus
05-18-2005, 01:46 AM
hi guys,
finally I did it. I customized kde menu after a remaster. The solution I found sounds me like a sort of workaround, but at the moment fits well what I was looking for, a new (smaller and with new items) kmenu.

I booted from the live-cd, then custmized (graphically, with the kmenu editor) kde menu since I liked it.

I saved /home/knoppix/.config and /home/knoppix/.local directories in a usbpen (a floppy or a hard disk partition is obviously the same, these files are saved to be reused after you stop the live session.

Then I rebooted to my linux hard drive installation, where I store all files that will be the remaster, and copied the .config and .local directories into /etc/skel (in the copy to remaster).

Edited /etc/X11/Xsession.d/45xsession, added ".config" at line 64:


***before***
rsync -Ha --ignore-existing /etc/skel/{.acrorc,.Xdefaults,.gimp*,.gconf*,.bashrc,.nessus *,.links,.local,.lynx*,.qt,.xine,tmp} $HOME/ 2>/dev/null
***after***
rsync -Ha --ignore-existing /etc/skel/{.config,.acrorc,.Xdefaults,.gimp*,.gconf*,.bashrc ,.nessus*,.links,.local,.lynx*,.qt,.xine,tmp} $HOME/ 2>/dev/null


After the remaster and a boot into live session, I found my new kmenu for the knoppix user :)

don't forget to set read permissions ("chmod -R 644 .config .local" inside /etc/skel will do the trick) or your changes will not be reflected to menu structure.

here's the config of my .config directory:



.config
`-- menus
`-- applications-kmenuedit.menu [menu structure description]


and this is the .local's one:



.local
`-- share
|-- applications [folders applications]
| |-- Bourne Again SHell (bash).desktop
| |-- C-Shell (csh).desktop

....(other apps)....

| `-- xmms.desktop
`-- desktop-directories [menu folders]
|-- Disks.directory
|-- Network.directory
`-- kde-internet.directory


I hope this could help someone,

-- Lorenzo

bertheylen
02-08-2006, 03:55 PM
Firstly: thanks to all for the great tips!

I'm still having some problems though... I followed stclaus's working method but my start menu keeps begin standard :).
The problem is that there isn't even a .config file in /home/knoppix (although it is present in /etc/skel).

- I changed the start menu with the kmenu graphical thing
- I changed the rsync line in /etc/X11/Xsession.d/45xsession
- I did chmod -R 644 to /etc/skel/.config and /etc/skel/.local
- I did chown -R root:root to /etc/skel

Anyone who encountered similar problems?

zoltanthegypsy
03-13-2006, 01:27 AM
I'm still having some problems though...

- I did chmod -R 644 to /etc/skel/.config and /etc/skel/.local


This _kept_ it from working for me (w/4.0.2). What I had to do was make
the .config and .local directories and sub-dirs 755, and all the contained files 644.
Don't know why but it works for me now.

Like this:

I booted to my remastered CD (which didn't have my custom menus yet),
and started another remaster from there. Didn't change any packages,
since I already had things the way I wanted except for the menus.

I then customized my _running_ Knoppix menus, and saved the result back
to /etc/skel in my new "source" per "Knoppix Hacks - Kyle Rankin":

sudo rsync -a /home/knoppix/ /mnt/<my scratch drive>/knx/source/KNOPPIX/etc/skel

**** corrected 13 March 2006 - I had left off the trailing / on /home/knoppix/ - sorry! ****

then changed the line in 45xsession, fixed up the permissions, made the filesystem,
MD5 hashes, and iso and it boots to my custom menus and panel :)

This exercise is a somewhat smaller 4.0.2 with chntpw and captive-ntfs added
and my custom boot splash and background images. I also have /boot/grub
set up so I can just copy to a bootable USB flash drive (and run grub setup)
and have a bootable fob. That part is already working :)

Now if I can just figure out where the "recently used applications" history came
from (and delete it) I will have a completely clean menu.

What I/we really need is a formal way to build default menus for a remaster.

Later,
Z.