PDA

View Full Version : [SOLVED] gconftool-2 help



anotherdisciple
December 1st, 2008, 02:44 AM
I am writing a quick BASH script with a zenity GUI... one thing I wanted to add is the option to change the main-menu icon. In the gconf-editor you would change


/apps/panel/objects/*/use_custom_icon

to true, and


/apps/panel/objects/*/custom_icon

to the location of the new icon.

My problem... The "*" could be different for each user.... it may be object_1, object_3, etc.

So, how can make the script only use the key for the object whose object_type is "menu-object"?


I'm stumped!!! Help me figure this one out!

anotherdisciple
December 1st, 2008, 05:12 AM
Okay... here is what I have so far...


nick@nick-laptop:~$ gconftool-2 --search-key object_type | grep menu-object | awk '{print $1}'


... and that returned this:

/apps/panel/objects/object_0/object_type

Now, how do I remove the object_type leaving just "/apps/panel/objects/object_0/" ?

anotherdisciple
December 1st, 2008, 07:56 PM
... so basically you would add this pipe:


| sed 's/object_type//'

Fort Wayne Linux User Group is faster than you... haha.. but there is the answer if anyone needs it!