FlightAware Discussions

Way to Login and Autostart GUI at Boot

I have the current PiAware installation. When I boot, I get the command line and the login prompt.

So, does anyone have a way to set it up so that the Pi both does the login and starts the GUI at boot? My issue is that I use VNC Viewer to see my Pi on my main computer. VNC Server on the Pi starts after the GUI is up. So, that’s why I’d like to figure this out. That way, I can reboot from the VNC Viewer, have the Pi reboot, login, and start the GUI. VNC will then be restarted and I will again see my Pi remotely.

I don’t know if it would take a script to do it, or could it be done via command line with the reboot command?

So, I would guess whatever in involved, it would need something to key the login and enter, key the password and enter, and key “startx” and enter.

Thank you in advance for your help!

If you run raspi-config there’s an option to enable boot to desktop.

sudo raspi-config (ENTER)

Scroll down to Enable Boot to Desktop/Scratch (ENTER)

Scroll down to Desktop Log in as user ‘pi’ at the graphical desktop (ENTER)

I think that’s what you’re looking for.


Cool! Thanks for the help. I thought there was some way to do it.

I had remembered having it set up that way previously before I installed a new OS image on my flash drive. But, I had forgotten how I had set it up.

Question: Using this boot-to-GUI option, does it know my password? Or, is it just using “pi” as the login and that’s it? I wonder because if a password isn’t being used, does that make the Pi less secure?

Thank you again!

It would be less secure if someone had physical access to the system and could plug a monitor/keyboard/mouse in.