Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Whoremoan

Pages: [1]
General / Various shutdown options on exit in Linux
« on: December 13, 2020, 04:18:03 PM »
I was looking for a solution where I could have various shutdown options when exiting AM, like you get with Retropie / Emulation Station, where you can choose to shutdown, restart, exit do desktop, etc.
After a lot of searching, I didn't really find a suitable solution other than adding something to the Exit Command in AM.
I came up with the idea of running a shell script with a basic menu in it and putting it in the Exit command, but it didn't work. AM just locked up on exit and I would have to kill the AM process.
I then tried adding attract to the begining of the script to launch AM then when it exits then run the menu and running that when the OS started.
This worked when run from a terminal window, but when I launched it at startup, when AM exited, it didn't run the menu.
I have now found a solution that works, so thought i would share it in case anyone else wants to do a similar thing.

I'm running Ubuntu, so if you are using a different version of Linux, you may have to modify things slightly to get it to work.

So first of all I made the script, which has 3 options - Exit to desktop, reboot & shutdown. But you can obviously add more.

I called it and put it in the root of my home directory (in my case /home/sf)
The script uses dialog to make the menu, so if you don't have it, you will need to install it - sudo apt install dialog

to make the script

sudo nano

copy this into it

Code: [Select]


MENU="Choose one of the following options:"

         2 "SHUT DOWN MACHINE"
         3 "RESTART MACHINE")

CHOICE=$(dialog --clear \
                --backtitle "$BACKTITLE" \
                --title "$TITLE" \
                --menu "$MENU" \
                $HEIGHT $WIDTH $CHOICE_HEIGHT \
                "${OPTIONS[@]}" \
                2>&1 >/dev/tty)

case $CHOICE in
            echo ""
            sudo shutdown now
            sudo reboot

Now in the ubuntu desktop, go to your applications and select 'startup applications'
If you already have attract mode in there, you will need to remove it or untick it.
Click the Add button and give it a name. Then in the command option type
gnome-terminal --full-screen --hide-menubar --command /home/sf/
** replace sf with your user directory name **
Then click save

What this does on startup is, open a terminal window and run the script which launches AM then runs the menu when AM exits.
The terminal is run full screen and has the menu bar disabled.

inadvertently, this has also solved another issue I had where, during startup and when launching a game, the Ubuntu desktop would show for a brief second. Now it just shows the terminal screen.

Hope this is of some use to some people.

General / Re: AM locks up after creating gamelist and restarting
« on: November 08, 2020, 01:30:31 AM »
So I thought I had cracked it last night.
Started from scratch again and added emulator with a couple of rom’s.
but this time I changed the theme to basic.
This seemed to have fixed it.
So I went through gradually adding bits. More rims, screen shots, more emulators, etc.
Just taking it a step at a time and testing to make sure the problem didn’t come back.
Now although it was working, it did lock up every now and then. But killing the program from the terminal would normally get it working again. Sometimes I would need to do it two or three times.
I also noticed that when it did lock up, the list highlighter for the currently selected rom would scroll all the way to the top of the list, as if you were pushing up.
Unfortunately it got to a point where it locked up and that was it. No amount of restarts would get it working again.
Another thing I noticed though was when it lock up, the videos for the selected game continues to play.

General / Re: AM locks up after creating gamelist and restarting
« on: November 07, 2020, 10:25:58 AM »
What about some kind of  problem with a scraper?
Doubt it. I've not even added any artwork path yet.
This installation is a plain as you cab get.
1 emulator 2 game roms and that's it

General / Re: AM locks up after creating gamelist and restarting
« on: November 06, 2020, 04:42:12 PM »
Apologies for the many posts on this tonight, but i thought I'd try one last thing before I give up on this for today.
I thought I would try the permissions again, but in reverse.
I re-setup AM and got it to the point that its working. So before exiting AM I went and changed the permissions on those 3 files, but to read only, so in theory nothing can happen to those files on exit.
Came out, went back in - not working.
So i'm now thinking that whatever weirdness is going on is happening somewhere else other than those 3 config files?

General / Re: AM locks up after creating gamelist and restarting
« on: November 06, 2020, 04:33:45 PM »
So i started again from scratch, created my romlist using my 2 roms. exited and reloaded to get it to the point it no longer works.
Changed the file permissions on the files, went back in and not working.

It just seems completely random as to what gets it working and what doesn't, but either way as soon as you exit and go back in, it screws you over again!

General / Re: AM locks up after creating gamelist and restarting
« on: November 06, 2020, 04:24:51 PM »
Just tried changing the permissions on the attract.cfg, emulators config and romlist file to full control.
I did already try this and was one of the first things I did, but the files have been replaced since.
Went into AM all working. Came out and back in - not working.
If you make any changes to the romlist file, most of the time it will work when you go back in but then stop working when you exit and re launch. It's like something is happening to that files when you exit AM, but i can't figure out what it is.

Sounds like something in the roms is in some format that's causing the problem in AM maybe? The other day I had some weird romlist problem where the list was being duplicated twice and couldn't figured out what was wrong... changed permissions and it was all fine. So, somehow AM was doing more than just looking at filenames... I don't know what, but something.

Have you checked to make sure there are no "dot" files in your folders?  . or ._   those can wreak havoc too.

Don't think so, but it's happening with MAME and that has a pretty basic, set, filenaming structure plus the 2 roms I'm now using to test I've removed all that from them.

General / Re: AM locks up after creating gamelist and restarting
« on: November 06, 2020, 04:08:55 PM »
OK, so I checked all the dependencies and all OK.

So here is where it gets weird!
I've had issues with other things before where your rom names have ! in them or things in brackets like (U) and the few roms I'm using to test have that kind of naming format.
So, even though it would not explain my MAME roms not working, as they are not named like that and something as established as AM would have fixed a common issue like that long ago, I thought I would give it a try.
I editied the romlist file and took out the (U) in the name and title section. Loaded up AM and it worked, I could navigate through the menus again. Obviously this would be no good because the info in the romlist file now doesn't relate to anything.
I then removed those elements from the rom file names themselves and started from scratch. Exited AM, went back in, didn't work again!
I went back into the romlist file, put a couple of random characters in the name and title section of each line, loaded AM and it worked again.
Exited, went back in, didn't work.
I then tried adding another random character to the list but it didn't work this time.
AM discovered I was on to it and locked me out  ;D

I really am confused by this. it doesn't make any sense.

General / Re: AM locks up after creating gamelist and restarting
« on: November 06, 2020, 03:20:14 PM »
So made a new directory and put in about 10 roms. Still doesn't work.
Copied the file from my test system, just to double check - No problems, but now all of a sudden that isn't working either!
I did notice that if I start AM when it's got to the point it's not working, I notice that when it gets to the game list if I push up or down, it does actually work for a split second then locks up.
I'm now wondering, in the instructions for installing AM, there was a list of dependencies. What if I've missed one of those and I'm missing an important component?
I'm going to go back and check through the list.

General / Re: AM locks up after creating gamelist and restarting
« on: November 06, 2020, 04:55:02 AM »
Thanks for all the replies so far

Which flavor of ubuntu are you using? and what version?

also how did you get AM loaded? was it a deb install from the ppa or compiled?

Also try deleting your attract.cfg, list(s) and emulator(s).cfg and starting over from scratch.

if you start over..NO EMULATORS set up...does AM run okay?

I'm using Regular Ubuntu Desktop, latest version (I think)
I downloaded the .tar file from the AM website, unpacked it then ran make & sudo make install.
If I delete the attract and emulator config files it runs OK, but if I just delete the emulator config files without deleting the attract config, it also runs OK.

He mentioned it runs fine until he has a large rom list. When he runs a short list its ok.

The emulator config file that works was from a VM test system I made.
When I get home later I'm going to copy a few rom files to another directory and use that to generate the list to see if I can determine if it's the amount of roms in a directory that is causing the issue or the fact it was generated from another computer.

oh, I had an idea:

launch attractmode like this:

attract --loglevel debug

see if that sheds any light on anything.

Tried that and it didn't really show anything up that I would interpret as an error, but it was quite late at that point, so will also try that again later.

General / Re: AM locks up after creating gamelist and restarting
« on: November 05, 2020, 04:12:46 PM »
I litterally installed AM, it found I hade Mame installed and set that up and found the games.
rebooted and the problem occured.
I then tried ignoring Mame and manually added some other emulators just in case it was something in the mame list causing the issue but whatever emulator I add, as soon as I generate the game list and restart, I get the issue.
It's the basic install. No plugins, screenshot, etc directroies set

General / AM locks up after creating gamelist and restarting
« on: November 05, 2020, 03:14:42 PM »
I'm in the process of setting up AM on an Ubuntu PC build.
AM installed ok and I have set up a couple of emulators and everything seems fine.
However, when I generate the game list in an emulator, all looks good, but as soon as I exit AM and go back in again I cant do anything.
AM opens at the last emulator screen I was on but nothing works. It's as though AM has locked up, but the little packman animation is still playing.
If I remove the gamelist .txt file(s) from the romlists folder, go back in, it all works, but i obviously have no game list.
I have a test VM system and I set it up on that yesterday and that all worked fine.
I tried copying one of the game list files from that and placing it in place of my one and that worked.
The only difference between the two files is the VM one has only a couple of games in it and my one has a lot!
I've tried changing permissions of the file and directory after exiting AM to full control for all users.

I'm currently running Emulation Station with a view to switching to AM once it's working, but the VM has that on too, so don't think it's that causing the issue.

AM was installed from the version on the website, not from a 3rd party or Retropie build.

Pages: [1]