Willpiam
Posts: 27
Joined: Thu Feb 26, 2015 11:16 pm

Ultimate Runaway code

Sat Apr 16, 2016 9:44 pm

So I've been working on a program for my Pi and needed it to run on boot.
I got it running but even when the program finishes I don't get taken back to the console Or gui or anything. Just a black screen.
I got it running on boot by adding

Code: Select all

@reboot python /home/pi/Desktop/programName.py &
to corntab.

I have a black screen with no curser. I need to get back to the gui so I can fix this thing up. Anyone have any ideas?

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Ultimate Runaway code

Sat Apr 16, 2016 10:10 pm

Have you tried using ssh to connect with it from another machine?

You can also access tty2 - 6 via ALT-F2 - ALT-F6 (tty0 being the main one).

Willpiam
Posts: 27
Joined: Thu Feb 26, 2015 11:16 pm

Re: Ultimate Runaway code

Sat Apr 16, 2016 10:20 pm

asandford wrote:Have you tried using ssh to connect with it from another machine?

You can also access tty2 - 6 via ALT-F2 - ALT-F6 (tty0 being the main one).
I haven't but I'll be looking into it. Unfortunately I have no way to connect it to the web or for that matter even see the IP address it would have. Is it possable connect the Pi straight to my computer through Ethernet?

Jason_25
Posts: 122
Joined: Tue Oct 20, 2015 6:25 pm

Re: Ultimate Runaway code

Sun Apr 17, 2016 6:32 am

You could always just mount the micro sd card with an adapter in another computer and rename your script temporarily until you get the problem figured out.

User avatar
DougieLawson
Posts: 39126
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Ultimate Runaway code

Sun Apr 17, 2016 12:42 pm

Jason_25 wrote:You could always just mount the micro sd card with an adapter in another computer and rename your script temporarily until you get the problem figured out.
The easiest rescue system is a Raspberry Pi booted from a freshly download Raspbian (or NOOBS) SDCard with the broken SDCard mounted in a USB reader rather than "another computer".

Everyone who owns a Raspberry Pi should have two SDCards and one USB SDCard reader.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Willpiam
Posts: 27
Joined: Thu Feb 26, 2015 11:16 pm

Re: Ultimate Runaway code

Sun Apr 17, 2016 3:05 pm

DougieLawson wrote:
Jason_25 wrote:You could always just mount the micro sd card with an adapter in another computer and rename your script temporarily until you get the problem figured out.
The easiest rescue system is a Raspberry Pi booted from a freshly download Raspbian (or NOOBS) SDCard with the broken SDCard mounted in a USB reader rather than "another computer".

Everyone who owns a Raspberry Pi should have two SDCards and one USB SDCard reader.
I'll be trying this today. Thanks a lot.

Return to “Troubleshooting”