Forum Replies Created
-
AuthorPosts
-
thehoffParticipant
It took a while, but I’ve found an acceptable solution. The program script allows me to circumvent the non-existing tty problem. crontab now contains the following line:
@reboot script -c "bash /home/pi/startup_script.sh > /home/pi/media_output.log 2>&1"
startup_script.sh is a script that frequently polls whether my TV is on or not and checks a file for what program it should start when this is the case (currently limited to Kodi and Retropie).
Thanks for your help!
thehoffParticipantIt does indeed seem to have something to do with not being attached to a TTY. I added the following line to crontab:
@reboot bash /home/pi/emulation.sh > /home/pi/output.log 2>&1
When I try to enter a game in psx in emulationstation I get the following output in output.log:
TERM environment variable not set. Press a key (or joypad button 0) to configure launch options for emulator/port (lr-pcsx-rearmed). Errors will be logged to /tmp/runcommand.log /opt/retropie/supplementary/runcommand/runcommand.sh: line 667: /dev/tty: No such device or address /opt/retropie/supplementary/runcommand/runcommand.sh: line 696: /dev/tty: No such device or address Traceback (most recent call last): File "/opt/retropie/supplementary/runcommand/joy2key.py", line 43, in <module> tty_fd = open("/dev/tty", "w") IOError: [Errno 6] No such device or address: '/dev/tty'
Now, I do not know how to attach this process to a tty. Could you supply me with the correct commands? In crontab I tried:
@reboot bash /home/pi/emulation.sh < /dev/tty > /dev/tty
@reboot bash /home/pi/emulation.sh > /dev/tty
@reboot bash /home/pi/emulation.sh > /dev/tty0
thehoffParticipantI’ve tried out a few more ways to start emulationstation. All commands are ran as user ‘pi’. I hope this gives you some more clarity:
start emulationstation locally from the commandline: Works fine. An empty runcommand.log is created at /tmp/. This is the only way I’ve seen a logfile being created.Start emulationstation through SSH from my PC: Works fine.
Start emulationstation through SSH from a script using either bash or sh: Seems to work fine now, not sure if this was the case before.
Use Crontab to start emulationstation at boot: Black screen for few seconds, then returns to home menu.
Use Crontab to start a script to start emulationstation: Black screen for few seconds, then returns to home menu.
Use Crontab to start a script that sleeps for 60 seconds and then starts emulationstation: Black screen for few seconds, then returns to home menu.
Use add-on “Advanced Launcher” within Kodi to start emulationstation: Black screen for few seconds, then returns to home menu. Please note that this is the way I intent to start emulationstation. But any work-around would also be appreciated.
thehoffParticipantI don’t think the problem is related to the missing ‘/’. Emulationstation does start, so the script is executed properly. Furthermore,
/usr/bin/emulationstation
was part of a more complex script which did include the missing ‘/’ at the beginning of the script. I’ve also tried running it as both user ‘pi’ and as root.Launching the script with bash instead of sh (and changing /bin/sh to bin/bash) did not make any difference. Emulationstation would launch properly, but the emulator would not.
-
AuthorPosts