How can I add an application shortcut to a panel in gnome-classic, using the command line?

Asked by Daniel Drucker

How can I add an application shortcut to a panel in gnome-classic, using the command line?

I used `dconf watch /` to see what was happening when I did it by hand, but when I try reproducing that myself:

    dmd@rossum:~ $ dconf write '/org/gnome/gnome-panel/layout/objects/test1234/object-iid' 'PanelInternalFactory::Launcher'
    error: 0-1:unknown keyword

I run into trouble right away.

How can I add (e.g.) a terminal launcher icon to a panel using the command line?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-panel Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel Drucker
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You can add them by making desktop files in /usr/share/applications If you look at the files, you''ll see what I mean. If you copy one from ~/.confi/autostart then they are a little simpler.

Revision history for this message
Daniel Drucker (dmd-c) said :
#2

Not to the menu, to a panel.

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#3

Ctrl+Super key and right click on the panel .

super key = Windows key.

Or

Alt+Super+ right click on panel ..

or

Alt + right click on panel..

try all combinations , someone hopefully will work.

Thanks

Revision history for this message
Daniel Drucker (dmd-c) said :
#4

Please read the question before commenting. I asked how to do this from the command line.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5
Revision history for this message
Daniel Drucker (dmd-c) said :
#6

Sorry, I guess I thought it was assumed that I was talking about in Ubuntu 12.04 or 12.10, not 10.04. This happens in dconf these days, not gconf, so the above-linked answer no longer works.

Revision history for this message
Daniel Drucker (dmd-c) said :
#7

Solved this myself:

dconf load /org/gnome/gnome-panel/layout/objects/terminal/ << EOT
[instance-config]
location='/usr/share/applications/gnome-terminal.desktop'

[/]
object-iid='PanelInternalFactory::Launcher'
pack-index=99
pack-type='end'
toplevel-id='top-panel'
EOT
dconf write /org/gnome/gnome-panel/layout/object-id-list "$(dconf read /org/gnome/gnome-panel/layout/object-id-list | sed "s/]/, 'terminal']/")"

Revision history for this message
Robert Hrovat (robi-hipnos) said :
#8

Is there simpler way?
I have about 100 users and since old 10.04 profiles are usesless, I have to create new ones. Sabayon profiler does not work anymore because it's not made for Gnome 3 and I really need all user profiles has some decent defaults with settings and shortcuts to make transition from 10.04 to 12.04 easier.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

Sabayon isn't supported here....