How do I put a launcher on my desktop in 16.04

Asked by tadiv

I'm trying to put a launcher (with a command line in it for a terminal) on my desktop - can I do that? How?

Thanks,
Tom

Question information

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

Do you want the terminal to run and then the script run in the terminal or do you just want the script to run with no visible terminal?

Revision history for this message
tadiv (tadiv-comcast) said :
#2

I would like the script to run with no visible terminal.

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

What is the file name you have and what language is the script written in?
Do you have a shebang as the top line?

Revision history for this message
tadiv (tadiv-comcast) said :
#4

It is a bash script called runxampp.sh

Revision history for this message
tadiv (tadiv-comcast) said :
#5

I can drag an icon from the GUI file manager to the desktop, but instead of the file running, it opens in gedit. I can't find a "default program" to assign that has the script run...

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

Do you have this as the top line in the file:

#!/bin/bash

Revision history for this message
tadiv (tadiv-comcast) said :
#7

Yes -- The contents of the file are as follows:

#!/bin/bash
gksudo /opt/lampp/manager-linux-x64.run &

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

Fantastic. The way I do it is to copy one of the desktop files from ~/.config/autostart to the desktop and edit it. You can even change the icon.

If you copy it to /usr/share/applications then it will show in the Dash and you can drag it to the launcher.

Revision history for this message
tadiv (tadiv-comcast) said :
#9

<b>OK - lots of trial and error... My solution was to edit the Main Menu and add an item (under internet) with the command:
gksudo /opt/lampp/manager-linux-x64.run

Then drag that item to the panel (I like gnome-panel) - dragging it to the desktop creates a not trusted launcher without any info on how to make it trusted (argggh!)...</b>

Putting the script in usr/share/applications did not help nor did copying/editing a file from ~/.config/autostart after copying it to the desktop... in both cases double-clicking the icon launched the script within gedit...

IN ANY CASE, I have a a single click way to launch this development tool. Thank you, as always, for your help.

Tom

Revision history for this message
tadiv (tadiv-comcast) said :
#10

Thanks actionparsnip, that solved my question.