Running a shellscript from a custom menu?

I added a custom menu with two subitems, each runs a shellscript, ie:


where contains:
sudo /home/osmc/a.out 1

When I run it from the menu, I just get a black screen. Script runs fine from ssh. Any ideas?

Edit: So System.exec is broken… And here I thought I could end my days without learning Python…

import subprocess['sudo', '/home/osmc/a.out', '1'])

Yes, I am lazy. will change name from a.out later :slight_smile:

System.Exec is indeed broken.

Apparently. Wish they would document that. Would have saved me some time.

Tried using it myself and it stops every action of music or video player for a second. Pretty much unusable. Running my shell script through a short python script now using RunScript(). That’s working fine…

Well, here it hung the system completely.