LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Run terminal program from desktop file in LXDE? (https://www.linuxquestions.org/questions/linux-desktop-74/run-terminal-program-from-desktop-file-in-lxde-893386/)

gqqnbig 07-23-2011 06:35 PM

Run terminal program from desktop file in LXDE?
 
I use ubuntu 11.04.
I have test.desktop file in ~/desktop, whose content is
Code:

[Desktop Entry]
Categories=;
Comment[zh_CN]=
Encoding=UTF-8
Exec=top
Icon=gnome-panel-launcher
Name=top
Terminal=true
Type=Application
Version=1.0

Obviously, I'd like to have an icon on my desktop, double-click the icon, a terminal emulator opens and the top program runs in it.
However, in LXDE it doesn't work! A terminal emulator opens but only shows the command prompt, without running any programs.

Indeed, the test.desktop was created by launcher creator in gnome and the file works perfectly in gnome. When it comes to LXDE, are some modifications needed?

yancek 07-23-2011 07:20 PM

Desktop links with LXDE, not sure if this is what you want?:

http://linux.koolsolutions.com/2009/...-lxde-desktop/

I'd put the full path to top after Exec

gqqnbig 07-23-2011 08:44 PM

Wow,it works. I don't know lxterminal has an option for me to specify a program to run. I only checked lxterminal --help, not man.

But I hope there's a better solution since this solution relies on lxterminal and if all command line programs have to start in such a way, the existance of terminal key doesn't make sence. If I change the default emulator or even delete it, the modification of the desktop file is needed. It is not as elastic as it works in gnome.


All times are GMT -5. The time now is 08:34 AM.