Customizing Gnome-Panels

René Oelke oelke at jpk.com
Mon Sep 4 16:28:15 BST 2006


Hallo list. I am new here and this is my first message. So I hope, You
can help me.

I have created a customized gnome-panel layout for our desktop (only one
bottom_panel ...). Detailed Information can be found in the attachment.
This is an package with the needed files to install.

What i have done is created a new entries-file with the panel-layout and
a short script in the postinst and prerm:

> SCHEMA_LOCATION="/usr/share/gconf/schemas"
> GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
> gconftool-2 --direct --config-source=${GCONF_CONFIG_SOURCE} --unload ${SCHEMA_LOCATION}/panel-default-setup.entries
> gconftool-2 --direct --config-source=${GCONF_CONFIG_SOURCE} --load ${SCHEMA_LOCATION}/jpk-panel-default-setup.entries

The package-installation is fine. But the users can't see any changes on
the desktop. I tried a lot of things and found out that i have to unset
all user-settings of the panel. So i called the following commands in
postinst and prerm an everything was fine:

> echo -n "Resetting panel configuration for user "
> for user in `ls /home`;
> do
>   [ ! -d /home/${user}/.gconf ] && continue
>   echo -n "${user} "
>   GCONF_CONFIG_SOURCE="xml:readwrite:/home/${user}/.gconf"
>   GCONF_RESULT=`HOME=/root \
>     gconftool-2 --direct --config-source=${GCONF_CONFIG_SOURCE} \
>     --recursive-unset /apps/panel 2>&1`
>   if [ $? != 0 ]
>   then
>     echo "Error: ${GCONF_RESULT}"
>   fi
> done
> echo "done."

This isn't the best method because every user setting will be destroyed.
   When a user made some changes to our panel layout and installs a new
version of our package everything of his configuration is lost or
resetted to our defaults.

My question: How can i solve the problem of unsetting the user panel
configuration? Is it possible to install/update own panel layouts
without unsetting the user gconf configuration?

For example: A user added to our panel a new object (applet). We made a
new panel-package with 2 additional objects. The user updates our
panel-package and should see his and our additional buttons.

Thank for for responses.
roe

-- 
René Oelke
Network & System Administrator

JPK Instruments AG
Bouchéstr. 12
12435 Berlin, Germany

Tel: +49 30 5331 12070
Fax: +49 30 5331 22555
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jpk-gnome-panel_1.0-1_all.deb
Type: application/x-deb
Size: 11779 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/ubuntu-desktop/attachments/20060904/e6fca96f/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3608 bytes
Desc: S/MIME Cryptographic Signature
Url : https://lists.ubuntu.com/archives/ubuntu-desktop/attachments/20060904/e6fca96f/attachment-0001.bin 


More information about the ubuntu-desktop mailing list