Posts: 6
Joined: Mon Jun 10, 2019 12:47 pm

Raspberry Pi3 Black screen + cursor (stuck)

Sun Jun 30, 2019 3:25 pm

Hello I wanted to run a python script at start up. I've searched on Reddit in r/raspberry_pi and found something that looked credible, an anwser to a post with a question similair to mine. The answer was the following;
This is the method I use to launch python script after boot. Open terminal and type:

Code: Select all

sudo nano ~/.config/lxsession/LXDE-pi/autostart
Add the following line above the @xscreensaver line

Code: Select all

@/usr/bin/sudo python /home/pi/
Make sure you replace /home/pi/ with location and script name for your python script. And make sure it is the line directly above the @xscreensaver line.
Reboot and your script should run.
So I've done exactly that and rebooted my Pi.

Now it's stuck at a black screen (not a screensaver, I don't think.) I can move my mouse and with ctrl+alt+f2 I could login into my Pi and thought maybe the LXDE wasnt installed correctly. So after login into my Pi I used the following line to update (or install the LXDE package)

Code: Select all

sudo apt-get install lxde-core xserver-xorg xinit
after a minute or so I got the message the newest version of LXDE was already correctly installed. After that I tried to reboot the Pi with the line

Code: Select all

sudo shutdown -h now
After restart I got the black screen + cursor again.

I'd just like to get back to my Pi/homescreen now.

Am I fukt? Do I need to reimage the SD card?

Any help would be greatly appreciated. <3

Posts: 133
Joined: Thu Feb 05, 2015 8:25 am

Re: Raspberry Pi3 Black screen + cursor (stuck)

Tue Jul 02, 2019 8:39 pm

I'm having this same problem, and what I discovered is having an "autostart" file at all in /home/pi/.config/lxsession/LXDE-pi/ - even if the file is empty causes this black screen problem.

So remove your "autostart" file and you should be good.

But I hope someone will come in and tell us how to use autostart so as not to cause this issue.

Posts: 133
Joined: Thu Feb 05, 2015 8:25 am

Re: Raspberry Pi3 Black screen + cursor (stuck)

Tue Jul 02, 2019 8:47 pm

Ok, so the problem seems to be that if you create an "autostart" file for the pi user, LXDE does not load a default one. (this is my guess).
I got the idea from here: ... p?t=207036

So, the fix that works for me is to create a proper autostart file that is based off of /etc/xdg/lxsession/LXDE-pi/autostart

In other words, either copy that file, THEN edit, or insert this text which is what my default file has:
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
and then I added the stuff I wanted to run to the bottom, and it works.

good luck.

(For any experts reading, maybe you could point out where the PIXEL desktop documentation is?)

Return to “Troubleshooting”