Adding desktop shortcuts to LXDE

6 respuestas [Último envío]
Mzee
Desconectado/a
se unió: 07/10/2013

I just wanted to add a desktop shortcut to a bash script to my LXDE system but unfortunately it doesnt't seem to work.
I created a file "my_shortcut.desktop", which looks like this:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=blubb
Name[en_US]=some_name
Exec=ls
Comment[en_US]=
Terminal=true

However, nothing happens if I double click on this file. Any help is highly appreciated.

lembas
Desconectado/a
se unió: 05/13/2010

Did you make the file executable?

chmod +x /path/to/file

Besides that, if I exec ls, I only see a terminal box flash open and close.

Mzee
Desconectado/a
se unió: 07/10/2013

Hi lembas,
Thanks for your post. The script is executable.
I just entered "ls" as an example script but I don't even see any flashing terminal boxes on my machine.
If I execute the script from the command line directly it just works like a charm.

lembas
Desconectado/a
se unió: 05/13/2010

I mean did you make the .desktop file executable? You might need to include full path in it to your script (which also has to be exe).

Mzee
Desconectado/a
se unió: 07/10/2013

Unfortunately that didn't work either. :(

jbar
Desconectado/a
se unió: 01/22/2011

Maybe the ls command is executed too fast to see it. Try 'Exec=touch myfile.txt' and check if a myfile.txt is created.

I'm using the xfce terminal and with 'Exec=xfce4-terminal -H -x ls' the output of ls is hold in the terminal.

I never used lxde, but if it uses the openbox menus, then you have a powerful tool to execute what you will.

http://openbox.org/wiki/Help:Menus

Mzee
Desconectado/a
se unió: 07/10/2013

This is strange...
I have the following (executable) file called New.desktop:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=New
Name[en_US]=New
Exec= touch myfile.txt
Comment[en_US]=
Terminal=true

If I try to double click on it, nothing happens but if I run it directly from the lxterminal with "bash New.desktop" a new file called "myfile.txt" is created. Even changing the Exec line to "bash touch myfile.txt" doesn't have any effect. I'm puzzled.