0

I have written a desktop script but when i try to execute the .desktop file as executable file then it's showing an error There was an error launching the application. I think, i have written the desktop file in correct format.

Here is the .desktop script Client Activity Monitor.Desktop

[Desktop Entry]
Type=Application
Name=Client Activity Monitor
Terminal=true
Exec=/home/harsh/Server/server.sh
Icon=/home/harsh/Server/Server-icon.png 

Here is server.sh script file

#!/bin/bash
cd Server
./refersh_server

refresh_server is executable file. Thank You

Harsh Pratap
  • 53
  • 3
  • 14
  • Try supplying the absolute path to `refersh_server` in `server.sh` – devnull Apr 21 '14 at 04:26
  • But, the same same script is working well on one system but it is not working on other system. In server.sh file 1st i have to change directory on terminal using cd server and then i have to execute refresh_server. – Harsh Pratap Apr 21 '14 at 04:37
  • It works only when it is launched from a terminal session whose working directory is correct. Fix the script by using absolute paths instead of relative. (I'm guessing the `cd` is actually superfluous as well, unless the server -- sloppily -- expects to find its config or log files in its own working directory.) – tripleee Apr 21 '14 at 06:39

0 Answers0