简体   繁体   English

当需要用户输入时,如何在启动时自动运行应用程序?

[英]How can I auto run an application on startup when user input is needed?

I'm trying to run an emulator on my raspberry pi zero and use it as a calculator. 我正在尝试在我的覆盆子pi零上运行模拟器并将其用作计算器。 I want this to happen instantly after I boot up my pi, without being prompted for which image to run. 我想在启动pi之后立即发生这种情况,而不是被提示要运行哪个图像。

I want the emulator to run on startup and i looked into how to do that but all I could find was information about how to run a "script" at startup. 我希望模拟器在启动时运行,我调查了如何做到这一点,但我能找到的只是有关如何在启动时运行“脚本”的信息。 I can run the script to start the application but it requires user input after that. 我可以运行脚本来启动应用程序,但之后需要用户输入。 You need to select an image to run and click ok, like this: 您需要选择要运行的图像并单击“确定”,如下所示:

when i first run tiemu: https://imgur.com/a/19Kid7B 当我第一次运行tiemu时: https ://imgur.com/a/19Kid7B

after I choose and click ok: https://imgur.com/a/JLg3tEQ 在我选择并单击确定后: https//imgur.com/a/JLg3tEQ

Is there anyway to do that without the user input, so that the same image is always chosen and the emulator just displays the calculator after booting up, instead of the select image prompt. 无论如何在没有用户输入的情况下执行此操作,以便始终选择相同的图像,并且模拟器仅在启动后显示计算器,而不是选择图像提示。 So can i get to the second image without going through the first one. 因此,我可以在不通过第一张图像的情况下进入第二张图像。 This might be a really simple question but I couldn't find any information on how to do it... 这可能是一个非常简单的问题,但我找不到任何关于如何做的信息......

If you run tiemu --help , you'll see a list of command-line arguments available . 如果你运行tiemu --help ,你会看到一个可用的命令行参数列表

This includes -rom= , -tib= and -sav= . 这包括-rom= , - -tib=-sav=

There is no reason to try to automate the GUI when passing appropriate arguments prevents the GUI from being necessary at all. 传递适当的参数时,没有理由尝试自动化GUI,从而阻止了GUI的必要性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM