EmulationStation icon indicating copy to clipboard operation
EmulationStation copied to clipboard

Hide console output when opening/closing emulators

Open djcross opened this issue 10 years ago • 44 comments

I've recently started tinkering with emulationstation, and presently one of my little annoyances is that the console text is being displayed when an emulator is being started and stopped.

Is there any way to disable this?

djcross avatar Sep 08 '14 08:09 djcross

There is currently no way to make the console text silent, which is outside of emulationstation and not something that can be hidden, which is actually a complaint in many other linux projects not even related to emulation or the rpi.

It may be possible for Aloshi to make emulationstation run a loading screen (I would love this, as a theme designer :+1: ) until the game actually boots. I have no real concept of how labor intensive a feature like that may be though, or if its even possible for emulationstation to know the game loaded in order to exit the loading screen and go into an idle mode.

joeelliott avatar Sep 08 '14 14:09 joeelliott

I agree, @joeelliott - but only from a designers point of view. It's a mix of a Linux related question and ES. Also the console output before and after running an emulator gives vital information of the things that are going on. If there will be a feature like this, it surely has to be switchable on or off.

nilsbyte avatar Sep 08 '14 15:09 nilsbyte

I agree it would be "nice to have" (and togglable) for my specific use case of having a dedicated PC only for EmulationStation games, allowing me to hide the PC aspects from view.

bowenwr avatar Sep 09 '14 06:09 bowenwr

@Aloshi and @petrockblog have to evaluate if this is possible with RetroPie.

nilsbyte avatar Sep 09 '14 06:09 nilsbyte

I managed to make this better, but not perfect by prefixing clear && to the beginning of all of the run commands in the tags inside es_systems.cfg

djcross avatar Oct 21 '14 12:10 djcross

i think you can dump the output to /dev/null by adding this to the emulator's command > /dev/null 2>&1

<command>retroarch -L /usr/lib/libretro/stella_libretro.so --appendconfig ~/.config/retroarch/retroarch.atari.cfg %ROM%</command>
becomes
<command>retroarch -L /usr/lib/libretro/stella_libretro.so --appendconfig ~/.config/retroarch/retroarch.atari.cfg %ROM% > /dev/null 2>&1</command>

if you want to nullify all text emulationstaion > /dev/null 2>&1

GM-Script-Writer-62850 avatar Nov 14 '14 03:11 GM-Script-Writer-62850

Ahhh, also a good idea. I'll try this tonight.

djcross avatar Nov 26 '14 22:11 djcross

Is it possible to implement this in Windows as well?

ghost avatar Jan 01 '15 11:01 ghost

in your bat script start it with @echo off that might do it, you could just run es using a shortcut icon or startup entry

GM-Script-Writer-62850 avatar Jan 01 '15 12:01 GM-Script-Writer-62850

FYI, the latest build in the unstable branch completely hides the console on Windows unless ES is run with --debug.

Aloshi avatar Jan 01 '15 17:01 Aloshi

Fantastic! Will check it out! Thanks for this great software. I will donate some money to it when i can if you have a paypal or similar.

ghost avatar Jan 01 '15 17:01 ghost

I'd like to know where which is the file that starts emulationstation when booting a RetroPie image.

I want it in order to try the "emulationstaion > /dev/null 2>&1" order.

PD. I'm sorry for my bad English!

space-invader avatar Jan 05 '15 00:01 space-invader

IIRC it is the last line of /etc/profile

GM-Script-Writer-62850 avatar Jan 05 '15 01:01 GM-Script-Writer-62850

Hi, I tried it, but the "last log in..." message and the messages when starting and exiting an emulator continues. What can I do to nullify them?

space-invader avatar Jan 05 '15 01:01 space-invader

have it run clear;emulationstaion > /dev/null 2>&1

GM-Script-Writer-62850 avatar Jan 05 '15 02:01 GM-Script-Writer-62850

Ok, this works for muting the messages when starting and exiting the emulators, but not for the message "last log in...", I think this is a kernel message, so silenting ES will not silent this, correct?

space-invader avatar Jan 05 '15 03:01 space-invader

clear should have got that off the screen

GM-Script-Writer-62850 avatar Jan 05 '15 03:01 GM-Script-Writer-62850

In my case not :(

Now I have finished with it, tomorrow I will post the complete líne I have...

Thanks.

space-invader avatar Jan 05 '15 04:01 space-invader

no problem, you can just post your last few lines and i can edit them, there must be something i am forgetting

GM-Script-Writer-62850 avatar Jan 05 '15 04:01 GM-Script-Writer-62850

Ok!

space-invader avatar Jan 05 '15 04:01 space-invader

Hi again!

The last líne of my "/etc/profile" file is this:

[ -n "${SSH_CONNECTION}" ] || clear;emulationstation > /dev/nulo 2>&1

(all in a unique líne)

space-invader avatar Jan 05 '15 09:01 space-invader

nulo NOT, null

Muy spanish corrector works more than I'd like ;)

space-invader avatar Jan 05 '15 09:01 space-invader

try this if [ -z "${SSH_CONNECTION}" ];then clear;emulationstation > /dev/null 2>&1;fi

that can also be is a readable fashion written like this, but i assumed you wanted it in a single line

if [ -z "${SSH_CONNECTION}" ];then
   clear
   emulationstation > /dev/null 2>&1
fi

this will make debugging a PITA since you can't see what the error message is, you know cause you dumped everything into null, but it will give you a black loading screen *this is beyond es support, this is basic shell scripting, this really belongs on the retropi forms, just saying

you may want to use the --no-exit option on es emulationstation --no-exit > /dev/null 2>&1 this will prevent the user from exiting es and requiring a keyboard be connected

GM-Script-Writer-62850 avatar Jan 05 '15 12:01 GM-Script-Writer-62850

No way.

The message continúes there :(

space-invader avatar Jan 05 '15 15:01 space-invader

In fact, the message appears and then the screen is cleaned, but the message can be seen.

I'd need a method to forcé the message not to be shown (if it is possible)

space-invader avatar Jan 05 '15 15:01 space-invader

I have realised that the problem is not on this script. I suppose it is a kernel message, but I have no idea on how to deactivate it.

space-invader avatar Jan 05 '15 16:01 space-invader

most likely it is output from dmesg just googled something try this

if [ -z "${SSH_CONNECTION}" ];then
   echo "6" | sudo tee /proc/sys/kernel/printk
   clear
   emulationstation > /dev/null 2>&1
fi
  • most distros make sudo require inserting the user password, this is not the case on stock rasbian/retropi

GM-Script-Writer-62850 avatar Jan 05 '15 17:01 GM-Script-Writer-62850

Up!

Im using the lastest release of ES for Windows (2.0.1a.), and cmd window keeps popping up when I run an emulator and when they close . Is this was not fixed in the latest version ? I run Retroarch for all emulators. What am I doing wrong? Thank you for your attention

FrankSerpico avatar May 07 '15 15:05 FrankSerpico

I use a keyboard even with the /dev/null 2>&1 trick I still see keypresses. I fixed this by adding stty -echo before calling emulationstation and then enabling it again with stty echo after exiting. I made the change in my /etc/profile.

Edit the last line of the /etc/profile to look like:

[ -n "${SSH_CONNECTION}" ] || `clear;stty -echo;emulationstation > /dev/null 2>&1;stty echo`

stephenohair avatar Aug 16 '15 10:08 stephenohair

@SuperEvenSteven - worked a treat thanks!

0x646e78 avatar Oct 04 '15 12:10 0x646e78