This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can't run my custom activator app from start menu anymore

Tags: None
(comma "," separated)
Dibo
Registered Member
Posts
28
Karma
0
Hi,

Long time ago I created my custom activator in start menu. It worked fine. But few weeks ago, with recent dist upgrade I see only app icon for a second in task bar and nothing happen, application is not running. It is placed in dev category. Command line in activator item is:
Code: Select all
/home/kris/programowanie/lazarus_1_8/mystartlazarus.sh

And script by itself:
Code: Select all
 #!/usr/bin/env bash

PATH="/home/kris/programowanie/fpc2/fpc/bin/:$PATH"
exec ~/programowanie/lazarus_1_8/startlazarus --pcp=~/.lazarus_1_8


Note if I go to lazarus_1_8 dir and run ./mystartlazarus.sh from console then everything is fine. Where I can see in logs what is going wrong behind?

Regards
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS
run the script itself outside its location in a terminal to see where it is failing

ie
Code: Select all
sh /home/kris/programowanie/lazarus_1_8/mystartlazarus.sh


or similar


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
Dibo
Registered Member
Posts
28
Karma
0
It start fine. Weird. Problem is only with this specific program, my another custom activator works fine but it start binary executable directly, no sh script
airdrik
Registered Member
Posts
1854
Karma
5
OS
Running with sh on the front is only necessary if the script isn't marked executable. Claydoh's suggestion is to see if launching it in another working directory (or with no working directory) results in any errors.

Another option is in the properties dialog for the (activator) shortcut, under Application -> Advanced Options there should be an option to Run in Terminal which you can check (along with Do not close when command exits) to have it display the command output when you use the shortcut.


airdrik, proud to be a member of KDE forums since 2008-Dec.
Dibo
Registered Member
Posts
28
Karma
0
airdrik wrote:Running with sh on the front is only necessary if the script isn't marked executable. Claydoh's suggestion is to see if launching it in another working directory (or with no working directory) results in any errors.

Single call "/home/kris/programowanie/lazarus_1_8/mystartlazarus.sh" outside dir, without "sh" prefix also works fine
airdrik wrote:Another option is in the properties dialog for the (activator) shortcut, under Application -> Advanced Options there should be an option to Run in Terminal which you can check (along with Do not close when command exits) to have it display the command output when you use the shortcut.

Ok, we have something new, with terminal option I get message (from polish translation):
Code: Select all
Warning: '/home/kris/programowanie/lazarus_1_8/mystartlazarus.sh' can not be run with '/home/kris/programowanie/lazarus_1_8/mystartlazarus.sh' parameters.

Warning: execve: Invalid executable file format


Both files "mystartlazarus.sh" and "startlazarus" are marked as executable. In activator settings I added "sh" prefix before path to script and everything works fine again! Thanks gays! But weird that it wasn't necessary before


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot]