(solved) Run shell scripts from obmenu

For general ARCHLabs and Arch issues.
Please make a serious attempt to search for your issue before posting here.
We can't offer help if you have the Testing Repos enabled.

Moderator: Founder

(solved) Run shell scripts from obmenu

PostPosted by sc954rr » Tue Apr 11, 2017 2:14 pm

I am hoping somebody can help me with a problem with obmenu, I am trying to open a shell script file from right click--->Places--->Downloads--->filename.sh and when I click it geany opens and throws error saying "does not look like a text file or the file encoding is not supported" but when I open thunar and go to downloads folder click the file it runs like it should. I have been searching all over but have not been able to turn up any solutions.
sc954rr
 
Posts: 9
Joined: Sat Mar 25, 2017 1:34 pm

Re: Run shell scripts from obmenu

PostPosted by Dobbie03 » Tue Apr 11, 2017 6:26 pm

Have you made the script executable? In the terminal cd into the folder the script is situated and run"sh scripname.sh"
I like my Metal like my coffee.......black
User avatar
Dobbie03
Founder
Founder
 
Posts: 552
Joined: Sat Feb 18, 2017 2:51 pm
Location: New Zealand
Running Release: DobbieBang

Re: Run shell scripts from obmenu

PostPosted by sc954rr » Wed Apr 12, 2017 12:26 am

Yes the script is executing correctly when I go into terminal and type that command
sc954rr
 
Posts: 9
Joined: Sat Mar 25, 2017 1:34 pm

Re: Run shell scripts from obmenu

PostPosted by Dobbie03 » Wed Apr 12, 2017 5:27 pm

Excellent, can you please edit your title and add [solved] to the beginning.
I like my Metal like my coffee.......black
User avatar
Dobbie03
Founder
Founder
 
Posts: 552
Joined: Sat Feb 18, 2017 2:51 pm
Location: New Zealand
Running Release: DobbieBang

Re: Run shell scripts from obmenu

PostPosted by sc954rr » Fri Apr 14, 2017 8:50 am

Is there a way to get that script to open from the obmenu when you right click? When I set it up through menu and click it to open it does nothing and menu disappears. Also is there a way to use .desktop file links in the obmenu to execute not just open in geany?
sc954rr
 
Posts: 9
Joined: Sat Mar 25, 2017 1:34 pm

Re: Run shell scripts from obmenu

PostPosted by Dobbie03 » Fri Apr 14, 2017 9:16 am

You could try something like this in your menu.xml:

Code: Select all
<item label="Script Name">
            <action name="Execute">
               <command>sh urxvt -e ~/linktoscript.sh</command>
            </action>
         </item>


In reply to your second question, maybe Erik can help here?
I like my Metal like my coffee.......black
User avatar
Dobbie03
Founder
Founder
 
Posts: 552
Joined: Sat Feb 18, 2017 2:51 pm
Location: New Zealand
Running Release: DobbieBang


Return to Basic Help and Support

Who is online

Users browsing this forum: No registered users and 1 guest