PDA

View Full Version : Saving KDE Panel Configuration



jaeran
08-29-2007, 07:27 AM
Apologies if this has been posted/dealt with before. I did look around on the Wiki/google searching for quite a while before posting this. I'm using the same technique described at http://www.knoppix.net/wiki/Configuration_Howto to save my Knoppix configuration from within KDE. It's working on everything except the KDE panel, and it's only partially failing at that.

I have the latest Knoppix installed on my 8gb USB Flash Drive and I'm saving the configuration to a properly mounted HD. Like I said, it's saving all of my configs except for a few things on the panel. It will save the changes I make to the KDE menu, the application icons I add or remove from the bar, the clock settings, the icon sizes, and a bunch of miscellaneous preferences I've set on it. What it *won't* save is the changes I make with "Add Applet to Panel..." by right-clicking on the Panel. Specifically, I successfully add "Klipper" (copy & paste history), a "Run Command" text box, and "Storage Media" icons all arranged on the panel the way I want them. They work perfectly and stay put until I reboot, and then they simply disappear. Could someone tell me how I might change this? I can do it manually if I have to, as long as someone points me in the right direction.

Thanks.

Double 12
08-29-2007, 08:20 AM
I think it would be useful to make a persistent disk image. In that image is not just your home directory, but also settings like the KDE settings.
I suppose it works because in my Knoppix home directory I found a hidden directory /home/knoppix/.config/menus with the file applications-kmenuedit.menu in it.

jaeran
08-29-2007, 08:47 AM
Thank you for the reply. I will probably try that eventually, but it's 3:30am here and I'm tired. I have to wonder why that would work, though, just looking at it logically. Wouldn't the fact that most of my settings are preserved entail the saving of my KDE settings? Why would some settings be saved, but not others; that question is at the heart of my problem. Your advice may actually work if I try it, but I'm trying to see why it would work.

I don't have a /home/knoppix/.config/menus directory, probably due to the fact that I don't have a persistent image created. Searching is too slow, but that may be helpful in solving my problem if I can find the location of that file elsewhere. I do have hidden files shown, btw.

Double 12
08-29-2007, 09:10 AM
I found this directory in my knoppix persistent disk image...not in my config archive (I haven't looked there :P ).


I have to wonder why that would work, though, just looking at it logically. Wouldn't the fact that most of my settings are preserved entail the saving of my KDE settings? It's just the fact that in the persistent disk image even more settings are saved than in the configuration archive. For example, if you try to save the preferences of the Knoppix Firewall, it says "you must make a persistent disk image to save these settings".

Interesting though: I made my persistent disk image months after I made my my configuration archive. But in my persistent disk image, I found parts of the settings that were originally saved in my config archive, in the past (for example network settings). So probably the disk image also includes the configuration archive.

Maybe it's better for you to sleep and try out the "pers disk img" tomorrow or so :P

jaeran
08-29-2007, 04:34 PM
I found this directory in my knoppix persistent disk image...not in my config archive (I haven't looked there :P ).


I have to wonder why that would work, though, just looking at it logically. Wouldn't the fact that most of my settings are preserved entail the saving of my KDE settings? It's just the fact that in the persistent disk image even more settings are saved than in the configuration archive. For example, if you try to save the preferences of the Knoppix Firewall, it says "you must make a persistent disk image to save these settings".

Interesting though: I made my persistent disk image months after I made my my configuration archive. But in my persistent disk image, I found parts of the settings that were originally saved in my config archive, in the past (for example network settings). So probably the disk image also includes the configuration archive.

Maybe it's better for you to sleep and try out the "pers disk img" tomorrow or so :P

The only thing I'm nervous about is that I don't have any storage large enough to contain the image. My hard drive is NTFS, and I'm hesitant to write to it. Knoppix itself is occupying my flash drive... :\ I misspoke earlier when I said I was writing the configuration to an HD; I've actually been writing it to a floppy.

jaeran
08-30-2007, 01:58 AM
I partitioned my flash drive, splitting it between my Knoppix install and the rest of the free space where I placed my persistent image. This solved the problem of my settings not all being saved through the "save configuration" deal, just in case anyone was wondering whether that was indeed the culprit. Unfortunately, the flash drive is written to relatively often when set up this way, and I don't want to wear mine out with too many writes. I was not able to write protect the image or the partition in any way after creating the image, and there is no way to configure the loading of the image at startup so that it won't write certain things, though you can reduce the number of writes by a fair amount.

The only other idea I have is using the "Save Configuration" feature, and then manually adding files to configs.tbz if I can find out where the settings I need are located. I don't have time to try this at the moment, but I'll let you know if it works out. I thought the feature was more sophisticated than the way it's explained on the Wiki ("Behind The Scenes: The save config script actually saves all true files from /etc that are missing or different from the distribution (at /KNOPPIX/etc)"). It seems that it just extracts everything to the root directory on startup, and the archive is just a big group of files with the full directory path preserved. This seems really easy, and I have a good feeling it will work.

jaeran
08-30-2007, 06:41 AM
There didn't seem to be much interest in this, but I found the solution. I happened to find based on "Last Modified..." times that /home/knoppix/.kde/share/config/kickerrc is where the layout for the panel is stored, including applets. It actually *is* saved when you do a "Save Configuration File", but when you add applets to the panel beyond what's there in a default install, it is listed under "UntrustedApplets=" while the default applets are (surprise) under "TrustedApplets=" in the kickerrc file. If you leave it this way, when Knoppix next loads up, it won't have saved any of the settings for those applets and your /ramdisk copy of the file won't have them listed under "Applets2=". I'm not sure what the difference between Applets2 (which is the one that shows the true order of the buttons/applications/applets on the panel) and Applets is. I guess maybe Applets is the list that's referenced if you hit a "Restore to defaults" button somewhere. Anyway, editing kickerrc so that the desired apps are under "TrustedApplets=" and replacing that file in configs.tbz will fix it. Useful if your HD is NTFS or you just don't want to use it or you don't want to prematurely age your flash drive.

Double 12
08-30-2007, 08:09 AM
Congatulations! It seems you've tried a lot and have done a lot of work of work on it.
It's good to see that the file containing the KDE panel-settings is already automatically saved in the configuration archive (you just had to edit the file), because otherwise you would have to add the file manually to the config archive every time you make the archive.

Of course you can't write protect the disk containing the persistent image - it's needed all the time to save settings (for example the web page history when your web-surfing) and load saved setting files.

For me, all the writing is not a problem, I'm using an old 100 MB ZIP-drive that wouldn't be used if I didn't use it. Maybe the disks (actually big floppy disks!) are not made for this heavy use, but I don't mind, because I've got still some ZIP-disks that are not in use.

Maybe an USB-flash srive gets hurt, caused by the heavy use. But on the other hand, even on the *official* Knoppix sites, they speak about "making persistent home dir on USB-stick". So, others think it's not that bad, but of course you don't want the risk of a destroyed flash drive.

jaeran
08-30-2007, 10:22 AM
Congatulations! It seems you've tried a lot and have done a lot of work of work on it.
It's good to see that the file containing the KDE panel-settings is already automatically saved in the configuration archive (you just had to edit the file), because otherwise you would have to add the file manually to the config archive every time you make the archive.

Of course you can't write protect the disk containing the persistent image - it's needed all the time to save settings (for example the web page history when your web-surfing) and load saved setting files.

For me, all the writing is not a problem, I'm using an old 100 MB ZIP-drive that wouldn't be used if I didn't use it. Maybe the disks (actually big floppy disks!) are not made for this heavy use, but I don't mind, because I've got still some ZIP-disks that are not in use.

Maybe an USB-flash srive gets hurt, caused by the heavy use. But on the other hand, even on the *official* Knoppix sites, they speak about "making persistent home dir on USB-stick". So, others think it's not that bad, but of course you don't want the risk of a destroyed flash drive.

Yeah, I realize that, but I wanted to use the "persistent disk image" thing the same way as the configuration file. I just wanted to get Knoppix arranged the way I want it and then preserve it that way. Saving stuff like web page history is a big waste of time in almost any scenario I could imagine; you should have the option of allowing that if you want, but you should also have the ability to make it unwriteable. Or at least control when and what is written.

The persistent home directories on USB sticks are possible, and I had it set up that way on mine for a bit today. I got rid of it, though, because it really can damage it over time. During casual use, USB drives can last for many years before wearing out. Casual use being defined as maybe transferring a few movies, songs, office files, etc. from time to time. If you're using an operating system that is continually writing files to the same spot all the time, it can wear down individual sectors and cause bad ones to form much more quickly than would happen from normal use. I'd like to avoid that, and it seems that I could make any config changes I wanted by using the save config option.

Funny thing is I've realized that I've run into another problem. When I use the default copy of Knoppix, it detects my sound card and sets up my sound properly right away. It continues to work even after I've changed all my settings around to how I want them. When I save everything, reboot, and then load that config, it stops working. I tried a few approaches to it and they all yield errors. The "configure sound card" option in the Knoppix menu said something like "You don't seem to be running a kernel with modular sound enabled. (soundcore.o was not found in the module search path)". If I don't use the config, it works fine. Same error cropped up when I tried a persistent disk image. I'd appreciate some help with that if anyone's encountered it before.

Oh, and thanks for the help/support, Double.

jaeran
08-31-2007, 01:33 AM
I'm not going to start a new thread, as I believe this problem is stemming directly from the subject at hand. It doesn't seem to be a hardware problem, either.

The current problem that I alluded to in my previous post is that after saving and reloading a configuration after a reboot, my sound no longer works. I have a sound card and onboard sound. I obviously want to use the card, and Knoppix recognizes and configures it properly on startup when not loading the config file. I've switched between loading the config/not loading it in an effort to understand what's causing this. The previous error I mentioned about "modular sound" seems to have nothing to do with this, as it's present whether I load the config or not. I'm not using aRts; when I go to "Sound System" under "Control Center", it's disabled even when the sound is working. I've tried everything from reloading/resetting/replacing/reconfiguring alsa to get it working again, but it won't.

Someone suggested to me that it might be a fairly common error where sound is only heard by root; I've tested it and that's not the case. I stripped my configs.tbz file (that houses all the configuration files that are extracted at boot) down to the absolute basics; there are only a few files in there pertaining to the layout of the kde panel/applets and their associated settings. There's absolutely nothing in there related to sound/audio that I can find, and the only difference that is visible between loading with a config and without one is the simple extraction of these files to their respective folders. It's baffling me how this could possibly mess up my sound. I use headphones because I have no speakers available, and it's plugged into the back of my computer (i.e. my sound card). I should note that the only significant difference I see is that when I load with my configs it tries to use my onboard sound, but uses my actual card when not loading configs. I've tried reloading my drivers/switching with alsaconf to no effect. It runs without a hitch, but still won't give me any sound.

The output from lspci concerning my sound card is:


00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
Subsystem: ASUSTeK Computer Inc. P4P800 Mainboard
Flags: bus master, medium devsel, latency 0, IRQ 21
I/O ports at e800 [size=256]
I/O ports at ee80 [size=64]
Memory at febff800 (32-bit, non-prefetchable) [size=512]
Memory at febff400 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2

03:0b.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)
Subsystem: Creative Labs SB Audigy 2 ZS (SB0350)
Flags: bus master, medium devsel, latency 64, IRQ 17
I/O ports at de80 [size=64]
Capabilities: [dc] Power Management version 2

I can provide any other specs that might help, but I doubt you even need to see my hardware.

jaeran
09-01-2007, 05:12 AM
I fixed the problem. I was going to try loading without the config, alsactl store, save it, reboot with config and have it automatically restore from that at boot, but it turned out to be unnecessary. On a hunch, I just went into my BIOS and disabled onboard sound. It eventually started randomly giving/not giving me sound when I would boot up, regardless of whether I loaded the config. I still have no idea what specifically caused it, but disabling onboard sound fixed it completely. There's no real reason I need onboard sound, but it came enabled by default, and I never saw a reason to change it. Hopefully anyone who finds themselves in a similar situation will benefit from this thread.

Adain
01-26-2010, 11:43 AM
Thanks for taking the time to help, I really apprciate it.