Friday, September 22, 2023
rated 0 times [  2] [ 0]  / answers: 1 / hits: 7411  / 10 Months ago, mon, december 19, 2022, 8:55:50

I have a .desktop file:

[Desktop Entry]

When I double click the .desktop file, I get There was an error launching the application.

my is:

xulrunner-sdk/bin/xulrunner-stub --app xulrunner-sdk/bin/application.ini 2>~log.log

Double clicking on and clicking run runs the application fine. Both and my .desktop are executable.

What do I need to change in my desktop file to make this work?

More From » command-line


%k is the desktop file path, use it with sh to relative .desktop:

  • Change current working directory (pwd), Then & commands inside all will run from there:

    [Desktop Entry]
    Name=Run Me
    Exec=sh -c "cd `dirname %k`;"

  • Otherwise, passing it as parameter to and use it explicitly when you need inside


        [Desktop Entry]
    Name=Run Me
    Exec=sh -c "`dirname %k`/ `dirname %k`"

    $1/xulrunner-sdk/bin/xulrunner-stub --app $1/xulrunner-sdk/bin/application.ini 2>$1/~log.log

Reference: How can I set the 'Path' variable in a .desktop file to be relative to the location where the desktop file is located?

[#24180] Monday, December 19, 2022, 10 Months  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 354
Total Questions: 105
Total Answers: 124

Location: Iraq
Member since Sat, Apr 3, 2021
3 Years ago
oraoming questions
Fri, Aug 20, 21, 10:08, 2 Years ago
Mon, May 24, 21, 21:56, 2 Years ago
Mon, Dec 12, 22, 23:21, 10 Months ago
Mon, Sep 12, 22, 11:38, 1 Year ago