Question: I have created a simple xulrunner app and it works great when invoked from command line.

```
clain@desktop:~$ xulrunner /home/clain/myapp/application.ini

```

The problem is that I need to keep the terminal open while the app is running. is there a way I can launch the app with a desktop shortcut / desktop entry?

I have tried to make a desktop entry file like below but when running it I got the error "Invalid desktop entry file: '/home/clain/Desktop/myapp'"

```
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=MyApp
GenericName=MyApp XulRunner
Exec=xulrunner /home/clain/myapp/application.ini
TryExec=xulrunner /home/clain/myapp/application.ini
Terminal=false
Type=Application
MimeType=text/xml;application/xhtml+xml;application/x-javascript;application/x-php;application/x-java;text/x-javascript;text/html;text/plain;

Name[en_IN]=MyApp
Comment[en_IN]=Standalone MyApp SSB

```

I am running on Lubuntu 14.04 LTS (Trusty Tahr)

Answer: 
The entry `TryExec` is wrong and that's the reason for your error message:

> 
> Invalid desktop entry file: '/home/clain/Desktop/myapp'
> 
> 
> 

The definition for `TryExec` is

> 
> Path to an executable file on disk used to determine if the program is
>  actually installed. If the path is not an absolute path, the file is
>  looked up in the $PATH environment variable. If the file is not
>  present or if it is not executable, the entry may be ignored (not be
>  used in menus, for example).
> 
> 
> 

Use

```
TryExec=xulrunner

```

because

```
xulrunner /home/clain/myapp/application.ini

```

**isn't** an executable file. It's an executable with a parameter.
you can write a script like this:

```
#!/bin/bash
xulrunner /home/clain/myapp/application.ini

```

then save that script some place Im calling "myapp" for example.
you can then make myapp executable, by giving the command `chmod +x myapp`
or by right clicking the file, going tot hte permissions tab and checking the make executable box.

You can then make you script a system command, using the `ln` command
you simply put a symbolic link to myapp in somewhere in the PATH.
`echo $PATH` to see what your options are.
I'll be using "/usr/local/bin"

then you give a command like this:
`sudo ln -s /absolute/path/to/myapp /usr/local/bin/myapp`

or to make a Desktop Icon:

`ln -s /absolute/path/to/myapp /home/user/Desktop/myapp`

now your app is usable from the command-line, you can type $myapp, and it will run. 

now, you can now create panel, or dock custom launchers, which will not occupy your terminal, even though they will be calling the terminal. 

Alternatively,`xulrunner /home/clain/myapp/application.ini &`
isn't bad advice, but if you make a script, and a link, and or custom launchers, you never have to type that stuff again. 
You can right click the panel, and select "Add To Panel"
then select custom application Launcher. Then you can give the command "myapp" or call the script directly.