Author Topic: Running linux bash sctripts from attract mode [solved]  (Read 2509 times)

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Running linux bash sctripts from attract mode [solved]
« on: January 30, 2020, 10:13:03 AM »
FOR FOX SAKE!

Okay people..I have nearly torn out all my fur on this one...

I have ran bash.sh scripts from AM before without problem..but CAN NOT seem to do it now!  :o

(Note: I have an old machine with nothing but native linux games on..and I am trying to set AM up to launch them so I do not have to use the desktop gui..)
((SO MANY games out there to play!..I figure why not...  ::) ))

So here goes:

here is my script (really simple):

Code: [Select]
#! /bin/bash

cd /home/john/Downloads
./redeclipse-master-x86_64.AppImage

not trying anything fancy here..and when ran in the terminal with:

Code: [Select]
./redeclipse-master-x86_64.AppImage
it works as expected no fuss no mess...   except....


I can not get the thing to run from AM!

 and now my AM config:
Code: [Select]
# Generated by Attract-Mode v2.6.1
#
args                 ./[name].sh
workdir              /home/john/scripts/
rompath              /home/john/scripts/
romext               .sh

which spits out

./redeclipse-master-x86_64.sh into the terminal..

(or more precisely):

Quote
- Working directory: /home/john/scripts/
*** Running:  ./redeclipse-master-x86_64.sh
Error executing:  ./redeclipse-master-x86_64.sh


Guide me o wise ones so that I stay normally crazy and not become abnormally NUTS! (I would hate to turn into a squirrel! o.o )
« Last Edit: January 31, 2020, 07:11:40 PM by akafox »
People want life easy..then complain about it

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Running linux bash sctripts from attract mode
« Reply #1 on: January 31, 2020, 09:50:23 AM »
In your post the file is called "redeclipse-master-x86_64.AppImage" and I don't see any ".sh" file. Also, you cd to "/home/john/Downloads" but then define "/home/john/scripts/" as your working directory. Maybe one (or both) of these are your issue.

Also, are you using the same user account on the CL that you are launching AM with? Maybe you have a permissions issue.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Running linux bash sctripts from attract mode
« Reply #2 on: January 31, 2020, 12:41:10 PM »
I just notice that you don't have an executable in your emulator.cfg. Maybe try...
Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           /bin/bash
args                 "[romfilename]"
workdir              /home/john/scripts/
rompath              /home/john/scripts/
romext               .sh

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Running linux bash sctripts from attract mode
« Reply #3 on: January 31, 2020, 07:11:12 PM »
New config:

Quote
# Generated by Attract-Mode v2.6.1
#
executable           /bin/bash <-added as you suggested...
args                 ./[name].sh
workdir              /home/john/scripts/
rompath              /home/john/scripts/
romext               .sh

spits out this in the terminal:

Code: [Select]
- Working directory: /home/john/scripts/
*** Running: /bin/bash ./redeclipse-master-x86_64.sh

..and is starts!  THANK YOU!  ;D

In your post the file is called "redeclipse-master-x86_64.AppImage" and I don't see any ".sh" file.

that was the script I showed...the .sh file itself is made and just the program/game name to make it easier on the list making later..

Also, you cd to "/home/john/Downloads" but then define "/home/john/scripts/" as your working directory. Maybe one (or both) of these are your issue.

seems like I need the working directory defined. Works with it..does not work without it..

I just notice that you don't have an executable in your emulator.cfg

yeah I knew not having an executable was a bad idea...but i didn't know what the exe was... you start scripts with ./ right?  /bin/bash makes sense though..! *facepaws*

Also, are you using the same user account on the CL that you are launching AM with? Maybe you have a permissions issue.

The permissions yes I knew to make sure there. As I said the scripts worked from the terminal..not AM..so I knew it was something with my AM config

works great...thank you again!

I plan on doing a write up if anyone cares or wants...
« Last Edit: January 31, 2020, 07:30:08 PM by akafox »
People want life easy..then complain about it

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Running linux bash sctripts from attract mode [solved]
« Reply #4 on: February 01, 2020, 12:29:57 AM »
I'm glad I was able to help you find your henhouse.
« Last Edit: February 01, 2020, 12:31:53 AM by progets »

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Running linux bash sctripts from attract mode [solved]
« Reply #5 on: March 03, 2020, 07:40:23 AM »
Thank you SO very much for that. It is working GREAT now!

now to make vid snaps for all the games and logos and such...one day i will actually get to PLAY the games and not just tweak and tinker with them right? *facepaws....sigh*
People want life easy..then complain about it