Quote:
Originally Posted by James
I need to know more about what your trying to
do and why your using gconf to do it?
I'm just changing some keys in the gconf-editor with gconftool-2. There are a
lot of options in the gconf-editor that aren't in the normal (For the lack of a
better way to describe it) Gnome GUI. I writing a simple script for my friends
who use Linux, but don't like to tinker around with it. I posted it on Ubuntu
Forums, and I think that gconf-keys for Nautilus and the Gnome-Panel have
changed between 8.04 and 8.10, because the script works perfectly for me, but
not so much for people who are running older versions.
Is anybody still running Hardy? I'd like someone to try to figure out what
isn't working in the script... I am at work now, but I could send it to you
once I get home.
As for writing a program in C... I have been meaning to take a smaller step and
move from BASH to Python, but I just haven't found the time. Anyone know of
some good tutorials in Python, or a book that doesn't assume that you've
programmed in other languages before? So far, I have only written simple stuff
to automate tasks with BASH, and in college I took a semester of Visual Basic.
I'd like to learn all the major programming languages some day, but it seems
like Python is a smaller step since it's a scripting language too. I'm a right,
or does it not work that way?
-Nick
> From: [EMAIL PROTECTED]
> To: [email protected]
> Date: Wed, 3 Dec 2008 01:32:14 -0500
> Subject: Re: [fwlug] BASH Script Help
>
> Nicholas,
>
> Here is a link to advanced bash scripting that explain how to parse
> strings in bash:
> http://www.museum.state.il.us/ismdepts/library/linuxguides/abs-guide/parameter-substitution.html
>
> Your original questions would be handled like this:
>
> bash.code.start
> parm=/apps/panel/objects/object_0/object_type ;
> echo "${parm%%/object_type}"
> bash.code.end
>
> returns => /apps/panel/objects/object_0
>
> This is the magic -- ${parm%%/object_type}
>
> As for the smarter way? I need to know more about what your trying to do
> and why your using gconf to do it?
>
> James,
> ps. how about writing a c program with gtk to meet this need? I could
> help you.
>
>
> On Mon, 2008-12-01 at 08:24 -0500, Nicholas Smith wrote:
> > 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
> >
> > Code:
> > /apps/panel/objects/*/use_custom_icon
> > to true, and
> > Code:
> > /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.
> >
> > I need the "menu-object" one, so I decided to figure it out with this
> > command:
> >
> > Code:
> > [EMAIL PROTECTED]:~$ gconftool-2 --search-key object_type | grep
> > menu-object | awk '{print $1}'
> > ... and that returned this:
> > Code:
> > /apps/panel/objects/object_0/object_type
> > Now, how do I remove the object_type leaving just
> > "/apps/panel/objects/object_0/" ?
> >
> >
> > Or is there a smarter way to get to that output?
> >
> > -Nick
> >
> >
> >
> > ______________________________________________________________________
> > Color coding for safety: Windows Live Hotmail alerts you to suspicious
> > email. Sign up today.
> > _______________________________________________
> > Fwlug mailing list
> > [email protected]
> > http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org
_________________________________________________________________
Send e-mail faster without improving your typing skills.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008_______________________________________________
Fwlug mailing list
[email protected]
http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org