How to execute a .sh file via Hotkey or Whisker menu Application

Hey guys its me again :frowning:

I tryed to start a .sh file in keyboard settings, menulibre & alacarte but it dont worked for me.

I executed the command in the terminal before so the command should work.

I used

cd /home/jacksa/Schreibtisch/Dev/Jacksa/ && sh ./start.sh

I think it is not Working because of the &&

cd is a bit of an odd choice if not using a terminal to actually move to that location.
Instead just point to the full path

sh /home/jacksa/Schreibtisch/Dev/Jacksa/start.sh
2 Likes

Hey thanks for you help when I try yours it says

[jacksa@jacksa-ms7b51 ~]$ sh /home/jacksa/Schreibtisch/Dev/Jacksa/start.sh
Error: Unable to access jarfile paper.jar

Because inside my file it looks Like this:

java -Xms2G -Xmx6G -jar paper.jar -nogui

and I dont want to move my /Jacksa folder because i have cloud synced my whole Desktop that when my pc or harddrive crash I still have my latest data

I suppose this is a similar issue about the construction of the script and paths.
You could skip the ‘start.sh’ altogether and use its command for a full path, or you could edit the script …
(ie - java -Xms2G -Xmx6G -jar /home/jacksa/Schreibtisch/Dev/Jacksa/paper.jar -nogui)

1 Like

ie - java -Xms2G -Xmx6G -jar /home/jacksa/Schreibtisch/Dev/Jacksa/paper.jar -nogui
bash: ie: Command not found.

I tryed this java -Xms2G -Xmx6G -jar /home/jacksa/Schreibtisch/Dev/Jacksa/paper.jar -nogui
in my start.sh script but it still wants that I accept the eula before it an start

That is something particular to this application … and as I have no idea what it is and how it works … I think ‘getting you here’ might be as much as I can do.
We have achieved it ‘executing’ … accepting an EULA is a bit different …
(and arguably should not be automated)