how to get a desktop "luncher" icon that runs a specified program in lxterminal??

Please post all general support questions for LXDE here.
Posts: 1
Joined: Fri Nov 10, 2017 10:50 pm

how to get a desktop "luncher" icon that runs a specified program in lxterminal??

Postby knott » Fri Nov 10, 2017 11:08 pm

I am trying to create a shortcut (launcher) icon on my desktop in LXDE
that, when it is double-clicked will (1) run a terminal
window, (I require LXTerminal with a white background),
and (2) execute the command specified in my shortcut
desktop file which is: /usr/local/lib/mlab/mlab (This
should run the specified executable mlab in the Terminal
window that has been started in step (1).

1. I used google to find a way to create
a "shortcut" (aka "launcher") icon on my LXDE desktop, including
visiting lxde forum links.
There were several confusing and incomplete
posts, none of which dealt with this exact issue (a desktop icon
for launching an executable in a Terminal window).
[I have played around with many permutations with no success.]

2. I clicked in the "background" to get a menu, and selected "Create
new", this offered a sub-menu; I choose "empty file" I was prompted for
the filename, and I entered mlabt1

This created an "page-of-lines" icon on the desktop labeled

3. I right-clicked on this new mlabt1 icon, and selected properties in
the pop-up menu. The information window that appeared said this icon
corresponds to an empty file in ~/Desktop/ with permissions 334.
I changed these permissions to 775.

4. I inserted the following text into this file: (suggested by web-posts)

[Desktop Entry]
Exec=sh /usr/local/lib/mlab/mlab

The mlabt1 icon changed immediately to a "gear".

[In fact, it is unneccessary to go through click create new, properties,
etc. All one needs to do is create a file in ~/Desktop with the
(hopefully) appropriate content using emacs or any other editor.]

5. I double-clicked on the mlabt1 icon and a proper LXterminal window
pops-up!! BUT the mlab program specified in the Exec-line
was NOT run! There is a bash prompt in the terminal window, and
if I type "mlab", the program runs.

6. I edited the file ~/Desktop/mlabti to change the
Exec-line to: Exec=/usr/local/lib/mlab/mlab and double-clicked to try to
run mlab. No joy. The terminal window popped-up with a bash prompt
as before!

7. So what's missing?

There seem to be at least three places where such "shortcut files go.




I copied mlabt1 into ~/.local/share/applications/ -- nothing
new appeared. I rebooted. Still no presence of mlabt1 from
the /local/share/applications directory.

8. So what am I doing wrong? [And by the way, is there a document that
describes the LXDE "desktop" program and all the files it uses, whate
tey are for, and where they live, etc.??]

Is being able to get a shortcut to run a program in a
new terminal window impossible? Is this a bug?

In the file below, I take Name=mlabt1 to mean specifiying the label on
the icon appearing in the Desktop. I take Path=/home/knott to
specify my working directory (and indeed, that is what pwd in the
new terminal window shows). I have no idea what GenericName=MLAB and
X-KeepTerminal=true really mean.

[Desktop Entry]

So where should I put a launcher file, and what should be in it??
Does it need a special name? By the way there is a
permissions tab on the properties window for an icon, I changed the
appropriate enties to 'Anyone'. It made no difference.]

I need step-by-step instructions if anyone has them>


Posts: 399
Joined: Tue Sep 20, 2011 6:09 am
Location: USA

Re: how to get a desktop "luncher" icon that runs a specified program in lxterminal??

Postby seppalta » Mon Nov 13, 2017 2:39 am

I am confused by your account of your activities and their relationship to get a desktop launcher. First, does your mlab launch when you type /usr/local/lib/mlab/mlab, or sudo /usr/local/lib/mlab/mlab into the terminal and press enter? The install for mlab that I managed to find said the command to launch was /usr/local/lib/mlab/??

Once you have determined (tested positively) the command for launching mlab, there are standard procedures for setting up desktop, panel or menu launchers in Openbox (LXDE). I suggest you take a look at the following links: , , .

Return to “General Help”

Who is online

Users browsing this forum: No registered users and 2 guests