Create Desktop Panel Launchers via terminal (Shell Scripts)


I'm writing an installation shell script and part of the installation procedure is to setup a few desktop panel launchers for the users.

Is this possible to script?

The manual steps I currently do are ..
Right Click Panel -> Add to Panel -> Create Application Launcher ->
Type : Application In Terminal
Name: Application1
Command: /Path/Application1

I usually then click on the icon and set a specific icon.

I can find plenty of examples for manual steps but nothing via the command line
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Duncan RoeSoftware DeveloperCommented:
It may well be possible to do what you want. You will need to find the control files(s) used to generate the launcher. Usually under LInux these are text files so potentially editable by a script. (Under Windows, they are almost always binary). Googling may find them, otherwise you will need to find them yourself: that involves making a change via the GUI then searching for recently modified files. You may need to close the GUI before they are written.
You don't mention what is your desktop so that's about all I can give you right now. Post back if you'd like help finding recently modified files.
nociSoftware EngineerCommented:
You should not need keystroke sequences.
It suffices to create whatever.desktop files in the right directories.
In the text file is a list of names of the item in various languages. and what command to perform...
Those directories may  vary from distro to distro.. and display manager to display manager:

find / -name '*.desktop'
whill show you where they are...

.desktop entry  for chromium:  ~/.local/share/plasma_icons/chromium-browser-chromium.desktop  (in my personal directory, for kde 5/Plasma).

[Desktop Entry]
Comment=Open-source version of Google Chrome web browser
Exec=chromium-browser %U

Open in new window

The "Exec=" line is the command to be executed, here the chromium browser  with a parameter.
Other entries suggest with filtypes (determined by mime-type) this .desktop  is suggested for.
Name, Icon to be shown etc.
Extra Name & Comment entries might also be:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PJ0302917Author Commented:
Thanks, il give it a test now
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.