LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Locking the gnome panel? (https://www.linuxquestions.org/questions/linux-general-1/locking-the-gnome-panel-147739/)

quartertone 02-18-2004 04:58 PM

Locking the gnome panel?
 
Hi,
I'm trying to find out if there is a way to lock panels/menubars in GNOME, so that they are un-deletable (for alternate search: undeletable). I really hate that the "Delete this panel" option is directly between "Add to Panel" and "Properties". Seriously, whose twisted idea was that? I have, on more than one occasion, accidentally deleted my meticulously customized panel because my pointer (mouse/trackpad/whatever) slipped.

I've searched Google and here for any possible hints, but "gnome panel lock" or other similar vairiations invariably results in something about the "Lock screen" button..

If i remember correctly (and I probably don't), there used to be a confirmation dialog if there existed any items in the panel. Now (I'm using Fedore Core 1) the panel gets deleted irrevocably without so much as a "see ya later".

So anyway, what I'm wondering is if there is a configuration option inside one of the panel's config files that will set it to be un-deletable. I imagine this should be possible, since in a multi-user environment, it would (at the very least) suck if someone deleted a panel full of essentials.

Thanks..
:study:

Nis 02-18-2004 05:19 PM

Use the GConf editor. It's kinda like the Windows registry: it stores preferences for many GNOME apps. Under apps/panel there is a host of options. One in global is confirm_panel_remove. Just make sure that's set to true and then removing the panel is harder to do. :)

quartertone 02-18-2004 05:24 PM

Thanks, Nis.
Where is the GConf editor? Does it have a corresponding (preferrably text-based) config file within the user's home directory (or elsewhere) that I can edit manually?

Nis 02-18-2004 05:32 PM

Here's the source. I don't know where an RPM might be. I use Dropline and GConf comes default.

quartertone 02-18-2004 06:05 PM

Ah. <bonk self on head> .. I should have looked before asking. There's a tool called "gconf-editor" in RH/Fedora. I was editing files earlier in the ~/.gconf/ directory, so i should have picked up on the name, but i didn't recognize it because of capitalization! :p

Funny what Linux will do to you..

Now the problem is that there doesn't seem to be an entry for confirm_panel_remove, so i added one in apps->panel->general. It didn't seem to have any effect, even after restarting gnome-panel (kill {pid of gnome-panel}). Well, I'll try to figure this out. If I get it right, I'll post my results here, but I'd appreciate any and all help!

thanks
q

Nis 02-18-2004 06:40 PM

Alright, check your /etc/gconf/gconf.xml.defaults/apps/panel/global directory. In there is a file %gconf.xml. Make sure this line is in there
Code:

<entry name="confirm_panel_remove" mtime="1076991160" schema="/schemas/apps/panel/global/confirm_panel_remove"/>
I think that might work.

quartertone 02-18-2004 07:46 PM

Thanks again!

Unfortunately, I didn't have a global subdirectory inside my /etc/gconf/gconf.xml.defaults/apps/panel/ . But a google search for "confirm_panel_remove" gave me just a handful of results, so I found what i needed pretty quickly.

{later...}
Ok, i thought it was what i wanted, but still no juice. Here's what I've done:


Code:

# gconftool-2 -s /apps/panel/global/confirm_panel_remove -t bool true
{{confirm_panel_remove now appears as key in gconf-editor, under apps->panel->global}}

$ grep -d recurse confirm_panel_remove ~/.g*
{{nothing}}

# cd /etc/
# grep -d recurse confirm_panel_remove *
gconf/gconf.xml.defaults/schemas/apps/panel/global/%gconf.xml: \ {{wrapped for length}}
        <entry name="confirm_panel_remove" mtime="1077060517" \
        muser="root" type="schema" stype="bool" owner="panel">
gconf/schemas/panel-global.schemas:        <key>/schemas/apps/panel/global/confirm_panel_remove</key>
gconf/schemas/panel-global.schemas:        <applyto>/apps/panel/global/confirm_panel_remove</applyto>

{{I don't think these are directly relevant}}

$ mv ~/.gconf/apps/panel/profiles/default/ ~/.gconf/apps/panel/profiles/defaultbackup
# killall gconfd-2; killall gnome-panel
{deletion of panel still no-confirm}


$ mv ~/.gnome2/panel2.d/panel2.d ~/.gnome2/panel2.d/panel2.dbackup
# killall gconfd-2; killall gnome-panel
{deletion of panel still no-confirm}

I noticed, when I had the generic panel after removing my customizations, that the delete menu item was disabled. That's what I want to do. Arrg..
Any ideas?


All times are GMT -5. The time now is 06:24 PM.