Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted
# add terminal launcher to the bar
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']/")"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.