mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

Added a new compile flag ALLOW_SSH #628

Closed oomek closed 3 years ago

oomek commented 4 years ago

When this flag is set Attract-Mode can be launched from the SSH session. It's set by default to off. When Attract-Mode is launched from the remote session there is a danger of unknowingly enter shell commands into the non busy console underneath when hardwired keyboard device is used.

oomek commented 4 years ago

@mickelson I believe this is important to protect Linux and RPI users from accidental damage to their data.

oomek commented 4 years ago

Sorry for the garbage commented FeLog(). Removed.

mickelson commented 4 years ago

I'm not a fan of this one.

I don't want to create annoyances and extra work for people who know what they are doing, and there are a number of valid use cases that involve running from ssh. The ones for me are troubleshooting on a pi that only has a control pad hooked up or on a cabinet with only an ipac. The use case you are worried about, where there is also a keyboard attached to the device, could actually be configured in init such that it doesn't have a live terminal hooked up to it... besides even if the terminal was hooked up it would be at the login prompt and the user would have to fluke into a a valid username and password to login first.

I want to stick with assuming people know what they are doing.

oomek commented 4 years ago

Hmm, Assuming that people know what they are doing is a dangerous one. We had a bit of a headache for a while on Discord until we figured out what is happening. This flag is for the developers who know what they are doing. For configuration we could make it a filed in the settings instead of a compile time flag, or block the enter key. We had also that idea to disable the keyboard from detaching the keyboard from the terminal, but in case AM segfaulted it leaves the keyboard unoperational. An ipac by default acts as a keyboard. If someone has rm-f space and enter bound this would end up badly in certain combinations. You can reduce the window size and see for yourself what is thrown into the console while using ipac or a hardwired keyboard.

oomek commented 4 years ago

There is another problem that we should discuss. I've just checked my IPAC on pi and you can easily trigger CTRL+C and CTRL+Z and as a result AM exits or freezes. These keys are mapped as default P1 buttons on IPAC2. ES and RA do not react to those combinations. This happens when you launch AM from the PI.

mickelson commented 4 years ago

Ok I have an idea for how to address these problems and will work on it.

On Jun 9, 2020, at 3:54 AM, Radek Dutkiewicz notifications@github.com wrote:

 There is another problem that we should discuss. I've just checked my IPAC on pi and you can easily trigger CTRL+C and CTRL+Z and as a result AM exits or freezes. These keys are mapped as default P1 buttons on IPAC2. ES and RA do not react to those combinations.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

oomek commented 4 years ago

Awesome! If you need me to test it on all my devices before pushing to master let me know.