Category Archives: Computer – Linux

Security images pruning

Well, I have been procrastinating about this.  My security videos get saved on the linux security server, and are limited to a month or so.  Daily, those sql event images get combined into an .avi video and saved locally and sent via ftp to my main server.  They DO pile up, though, as evidenced by the image on the right.  1.2TB.  They have been saving since 12 Apr 2018, when I added that feature to the script that I wrote that created the video files from the sql images.  The reason I did that was that it made it easier to review and archive the security alerts.  Hand deleting all those directories would be a major pain in the ass.  Enter this command:  😉

[root@cap Cameras]# find -mtime +365 -exec rm -R {} \;

It took a short while to parse through all the directories, but, eventually it finished. I checked on things with du -h –max-depth=0. The max-depth argument will stop all the sub directories from printing to the screen.  The results are in the image below.  436GB.  That’s quite a bit of space saved.  Now, instead of directory saved images dating back to 2018, there is only one year.  While the find/rm command above is suitable to enter directly into a terminal and have it operate on the current directory, it is rather dangerous to use.  Far better to schedule a potentially dangerous command in the cron.  First step, is to create the command.  In order to do that, as root do: nano /sbin/shear , or the name you choose to use.  I chose shear.  Add this & save: find $1 -mtime +365 -exec rm -R {} \;  If you have sharp eyesight, you will notice that I inserted $1 after find.  This is a command variable.  Last part of creating the command will be to make it executable by root, and not even readable by other users.  Do this  as root to do that; chmod 700 /sbin/shear.  Of course, if you can’t use root directly on your system, then use sudo.  Now, you can directly use the command that you created as:

# shear /path/to/directory/you/wish/. (/sbin/ should be in your path. If you saved it elsewhere not in your path,  </path/shear>) 😉

Final step is to create a crontab entry to run it monthly or so.  crontab -e will allow you to edit your crontab,  Of course, you might have to do sudo crontab -e if you can’t become root.  If you need help with the syntax: cat /etc/crontab.  I also have the MAIL=root commented out, so as not to get emails filling up root’s email box.  Then, restart crond.  That’s it.  If anybody needs a review of crontab and how to use systemctl to restart crond, either reach out to me, or just add a comment, and I’ll create a little tutorial. 😉

Arcade Troubleshooting Joystick and Gamepad

This post specifically addresses not being able to make your selection under Maximus Arcade utilizing the joystick or gamepad. I have had a few people mention this issue.  This post doesn’t really apply if you are using a Tankstick in a stand up cabinet or game console.  That is because a Tankstick actually ’emulates’ a keyboard.  However, if you use a game console or external hard drive version with a joystick or gamepad, then this post is for you.  If you are still playing the arcade games with a keyboard, you should check out these two options:  Click HERE for a link to buy a Thrustmaster USB wired joystick like the one pictured above.  Or, if you prefer, you can click HERE for a link to buy a pair of wireless gamepads like the pair pictured above  Both of these options are about $25 with prime shipping.  Once you start utilizing something other than a keyboard to play your games, you will rapidly notice how inconvenient it is to select the ROM using the keyboard.  Much easier to set up the joystick or gamepad to do so.

In order to do this, you will need to enter the Maximus preferences.  Easiest way is to load MA, then hit Ctrl-P.  The preferences utility will load.  I might add that changing the controller prefs, you will NOT need to move the Master ROM List to the top of the games list.  That ‘lock’ only prevents changes to the games lists, not any of the other settings. In the picture just above, you will need to select the Controller tab at the top, and the Joystick tab on the left.  The main thing that HAS to be set is #1 Capture Joystick/Gamepad.  The other settings, #2 through #6 should be fine as they are, but depending on your joystick, you may need to select the other setting in #6.  Something you should do is to select the View tab, like the picture on the right.  This will allow you to know what  buttons are what on your controller.  Necessary, if like me, you need to move a couple buttons around in the configuration.  In my case, using a Thrustmaster, the trigger button was button #1, and the button on top was button #2.  The prefs in the Setup1 and Setup2 tabs were set for button 1 to toggle the Favorites, and the Select was set to button 10, if I remember.  The way to change them around is to highlight the setting then press the little red X at the bottom to delete that button.  Then, you just need to press the button that you want. In the pictures just above, on the left and the right, you will see that I’ve already moved things around so the trigger will select, and the top button will cycle the Favorites.  One other thing to realize that if it’s still not working properly, make sure you don’t have a flight joystick like the Thrustmaster.  If you do, there is usually a side throttle control, mapped to a joystick.  I have taken the liberty to mark it with an arrow in the picture just above on the left.  If that control is moved forward or backward, it will override the joystick being able to select, so make sure it is in the neutral center position.

Hope this posting helps everybody…. 😉

Arcade Update 1/2022 B

If you do NOT have v.2.56 of the Arcade installation, do NOT proceed.

Instead, go here, and apply the four previous updates, and possibly the optional snapshots file:  Arcade Update 1/2022.  (Updates MUST be applied in sequence)  As always, you should perform a backup using your normal PC backup, just in case. (NOT the arcade backup scripts in the installation.)

In the future, you can always just jump to the Arcade Updates  category to check whether you may have missed any updates.  The version that you currently have, whether console or ext hdd, may be checked at G:\version.txt.  I can’t remember, but I think if you have v.2.40, there possibly may be no version.txt.  In the console version, it should report the version number while loading, as long as it’s more recent than v.2.40.

Now that that is all over, here is the download link for the latest Arcade Update file:  Arcade Update 2.56-2.58.  

One note to mention, is that I added a 2 way joystick config for Clowns.  By default, if you check the game’s TAB menu, you will notice that Clowns may be set to Paddles.  You may have to set that to your system as well.  I prefer to take a pic of the settings before I change things on those menus.  These 2 and 4 way joystick configs are most useful if you use an 8 way joystick.

This update also adds a funtion to backup a couple critical 3DArcade directories.

Arcade Update 1/2022

Happy New Year!!

This blog post is to release the first four updates of Arcade v2.40, and updating to v.2.56.

Arcade 1.00 was released on Nov. 2015, and was the beginning of the realization of the dream I had for an arcade experience encompassing several different gaming platforms.  This was updated on 6 Feb 2021 to version 2.00, and I managed to get all users updated to this version. (I managed to get all users upgraded to v.2.40 in Mar. 2021.)  I believe it was v.1.30 in Sep 2020 that I added console/arcade cabinet installations as well as the external hard drive version.

I have actually even tested Maximus front end under a recent Fedora Linux distribution using Wine.  I was using a USB Thrustmaster joystick. This was with the external hard drive version, mapped to G: under Wine. If you need a Maximus key, you can find it HERE.  Seems every time I check, it’s always on sale for $9.99.

One notable thing to mention, is that besides the Maximus frontend, there is also another one, that I never really configured.  3DArcade.  I have spent  quite a bit of time configuring it.  I have stayed in Arcade>Favorites, if my memory is correct. (Meaning, you run 3DArcade, then click Arcade, then click Favorites.)  3DArcade is a ‘virtual’ experience. If you would like to see a particular cabinet added to that arcade, just give me a shout. 😉

Back in the v.1.xx days, updates were hosted on mega, and emailed out.  Now, since most Arcade users are blog members, I will just post the mega update links here.  Also, the user had to ‘hand update’ the installation.  Now, under the v.2.xx updates, I have created update script .bat files that will do all the work for you!!

First, a little background on how the updates actually work now.  Each update file is a zip within a zip.  You must expand them both.  Then, you should read the ‘README UPDATE.txt’ file, which usually just tells you to run the ArcadeUpdate.bat file by just double clicking it.  If there are any other things that need doing, they will be spelled out here, as well as in the README UPDATE.txt file.  Information on exactly what the update does is found in the WhatNew.txt file.  However each update needs to be done, with none skipped. Update files need to be done in succession.  Meaning, if you have version 2.40, you need to perform update 2.40-2.46 first.  Then, the 2.46-2.48 and so on.  In later versions of the console, it will report the version upon booting.  For the ext hdd version, you would find version.txt in the root G: drive.

I STRONGLY SUGGEST backing up your installation using whatever you use to back up your computer BEFORE attempting an update, in case things go sideways.  You have been warned!!

The Update 2.51-2.56 contains TWO scripts, that MUST be run in order, and the first one needs to be run as administrator.  Otherwise your installation will not work at all.

Okay, what you’ve all been waiting for, here are the links for the update files.  (Clicking on them, will open a new tab.)

Update 2.40-2.46

Update 2.46-2.48

Update 2.48-2.51

Update 2.51-2.56

Snapshots Addon for 2.51-2.56

The Snapshots Addon can be expanded into the snapshots-hold directory under WinUAE on your G: drive by hand, or, copied into that same directory in the update architecture.  (Doing that, will just slow the update down, so be patient, if you do that.)  Or, you can omit that Addon completely, as the end user may not need it.

Another notable addition in the 2.51-2.56 update was a bug reported by Jrod and his brother concerning the fact that certain MAME roms would ‘hang’ upon anticipating a joystick movement.  This was tracked down to the difference between 4 and 8 way joystick mappings.  So, I created some custom mappings for certain problematic games like DigDug, and Ms. Pacman and more.  If anybody has any issues with any particular game, feel free to reach out to me.

If you don’t understand all of this if this is your first update, don’t hesitate to reach out to me via text, email, facebook, or phone.  Keep your eyes on this blog for any future updates…. 😉