LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-03-2012, 07:42 AM   #1
redss
Member
 
Registered: Jun 2003
Posts: 168

Rep: Reputation: 16
What config files store panel properties?


Can anybody tell me what gnome configuration files in ubuntu (Lucid) store the shortcut properties in the top panel? That information is not stored in the gconf repository. (already checked the gconftool dump)
 
Old 07-06-2012, 12:28 AM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
The configuration data for the panel is indeed stored in the gconf database:
Code:
gconftool-2 -R /apps/panel
 
Old 07-06-2012, 08:14 AM   #3
redss
Member
 
Registered: Jun 2003
Posts: 168

Original Poster
Rep: Reputation: 16
Actually I beg to differ. Say for example, I modify the shortcut property for the firefox icon in the panel, for it to invoke a program called foobar. The output from the gconftool-2 command you gave will not contain "foobar" anywhere in it.
 
Old 07-06-2012, 11:38 PM   #4
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
All configuration data for the GNOME panels are stored in the GCONF database !

Again, all configuration data for the panels are stored in the GConf database under /apps/panel.

I'll use the default settings from Ubuntu Lucid. Let's show that the properties for the panel item are stored under /apps/panel.

For this exercise we will use the panel item's 'locked' property for the Firefox launcher.

This property is stored in the locked key and it's value type is boolean. The default value for the 'locked' property is TRUE. Get the value of the locked property from the GConf database:
Code:
gconftool-2 -g /apps/panel/objects/browser_launcher_screen0/locked
This will return a value of TRUE. Verify this by right-clicking on the Firefox icon. The 'Locked To Panel' menu item will be checked.

Now set the locked property to FALSE:
Code:
gconftool-2 --toggle /apps/panel/objects/browser_launcher_screen0/locked
Check that the locked property was set to FALSE:
Code:
gconftool-2 -g /apps/panel/objects/browser_launcher_screen0/locked
This will return a value of FALSE. Verify this by right-clicking on the Firefox icon. The 'Locked To Panel' menu item will now be unchecked.

Set the lock to it's original value:
Code:
gconftool-2 --toggle /apps/panel/objects/browser_launcher_screen0/locked
This simple exercise shows that the configuration data for the panels are indeed stored in /apps/panel.

Quote:
I modify the shortcut property for the firefox icon in the panel, for it to invoke a program called foobar. The output from the gconftool-2 command you gave will not contain "foobar" anywhere in it.
Of course it will not. That's because the Firefox icon points to a 'Launcher'. This is what you are referring to as a shortcut, but that Windows' terminology, not GNOME's. In GNOME, it's called a Launcher.

A launcher stored it's properties in a .desktop file. This is the reason you do not see the launcher's properties listed in the GConf database. The GConf database simple stores the .desktop filename that the launcher points to. Have a look at /usr/share/applications and you will see several .desktop files.

Now on to the launcher's properties. By default, the launcher for the Firefox icon is linked to the launcher for the Firefox icon in Applications > Internet > Firefox.

Basically, there are two ways to modify the Firefox launcher.
  1. The simplest is by right-clicking on the Firefox icon and selecting Properties from the menu items. You can then change the properties of the launcher from the Launcher Properties dialog box. When you do this however, the link to the launcher pointed to by Applications > Internet > Firefox is broken and a new launcher is created in ~/.gnome2/panel2.d/default/launchers/firefox.desktop. If this is what you did when you changed the Command property to 'foobar', you will now have a ~/.gnome2/panel2.d/default/launchers/firefox.desktop file present.
    Code:
    ls ~/.gnome2/panel2.d/default/launchers
    Check that the newly entered Command 'foobar' is actually in the firefox.desktop file:
    Code:
    grep ^Exec=.* ~/.gnome2/panel2.d/default/launchers/firefox.desktop
    This will return:
    Code:
    Exec=foobar
    For the rest of this exercise, delete the newly created firefox.desktop file:
    Code:
    rm ~/.gnome2/panel2.d/default/launchers/firefox.desktop
    and restart the panel:
    Code:
    gnome-panel --replace &
  2. If you want to keep the link to the launcher pointed to by Applications > Internet > Firefox, then you must modify the .desktop file for this launcher. This file is ~/.local/share/applications/firefox.desktop.

    Check the Command that this launcher runs:
    Code:
    grep ^Exec=.* ~/.local/share/applications/firefox.desktop
    Unless it was previously changed, it will return:
    Code:
    Exec=firefox %u
    Let's change the Command for this launcher to point to LQ:
    Code:
    sed -i 's,^Exec=.*,Exec=firefox http://www.linuxquestions.org,' ~/.local/share/applications/firefox.desktop
    Check that the change was successfully:
    Code:
    grep ^Exec=.* ~/.local/share/applications/firefox.desktop
    It will return:
    Code:
    Exec=firefox http://www.linuxquestions.org
    Restart the panel:
    Code:
    gnome-panel --replace &
    Now clicking on the Firefox icon will cause it to open LQ's homepage.

In conclusion, configuration data for the panel are stored in /apps/panel but the properties for the launcher are stored in a .desktop file either in ~./gnome2/panel.d/default/launchers (for custom launchers) or in ~/.local/share/applications for system launchers for the logged in user.
 
Old 07-09-2012, 12:11 PM   #5
redss
Member
 
Registered: Jun 2003
Posts: 168

Original Poster
Rep: Reputation: 16
Awesome response... thank you!
 
Old 07-09-2012, 10:24 PM   #6
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
That really got a whole bunch of neurons firing since I don't dabble in those sort of things anymore. Glad you found it helpful.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GNOME Panel Properties and Interface Raevyn Ubuntu 7 03-17-2011 03:15 AM
[SOLVED] Fedora Panel - How can I adjust properties ChrisJefferies Fedora 7 03-13-2011 02:34 PM
Where is Session Properties in Panel Menu? Xian Debian 0 07-19-2005 05:22 PM
Panel Launcher Properties RitaChin Linux - General 1 11-12-2004 05:50 AM
a surprise in gnome panel's properties zovres Linux - General 1 05-15-2003 02:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration