Hello,
New to linux. Want to be able to have real dash open when pi is booted up. Thanks.
You can configure a GUI program to start automatically on boot in Raspberry Pi OS using one of several methods.
Method 1: LXDE Autostart
If you are using the desktop environment LXDE (Lightweight X11 Desktop Environment), which is used by Raspberry Pi OS, you can put a .desktop file in the autostart directory. Hereās how to do that:
-
Open Terminal.
-
Type this command and hit enter:
nano ~/.config/lxsession/LXDE-pi/autostart
-
Add the command to execute your program at the end of this file. It might look like this:
@/usr/bin/realdash
-
Save the file and exit nano (Ctrl+X, then Y, then Enter).
-
Reboot to see the changes.
Method 2: systemd
If the first method doesnāt work, or you want a more powerful and flexible solution, you can use systemd, a system and service manager for Linux. Hereās how:
-
Create a new systemd service file:
sudo nano /etc/systemd/system/realdash.service
-
Add the following to this file:
[Unit] Description=RealDash [Service] ExecStart=/usr/bin/realdash Restart=always User=pi Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/pi/.Xauthority [Install] WantedBy=multi-user.target
-
Save the file and exit nano (Ctrl+X, then Y, then Enter).
-
Enable the service so that it starts on boot:
sudo systemctl enable realdash.service
-
Start the service immediately:
sudo systemctl start realdash.service
-
Check the status of the service:
sudo systemctl status realdash.service
Remember that GUI applications usually require a display to connect to, which is why weāve set the DISPLAY environment variable in the systemd service.
These instructions should help you automatically start a GUI application when your Raspberry Pi boots.
Tried both options and was unable to get it to work.
Unfortunately those are the only ways I know of
Im abble to autostart realdash by the first method, but i cant run it 100% fullscreen, i always have a bar on the top of the screen
running a 1920x720 12.3 inches touchscreen
It could be that you need to add some delay to the startup in order for the windowing system start completely? Maybe here are some Linux gurus that can help more.
how can i do that? im running with lxde autostart
You can use more configurable window manager, for example i3. Then in the configuration (~/.config/i3/config
) put following rule:
for_window [title="RealDash"] fullscreen enable
Of Course there is much more you can do with it
I changed xsession to boot straight into realdash through the pi user. Doing that will keep you from getting back to the desktop. To get around this I created a second user. With that, you can hit esc and it will take you to the login window.
All the details are on Github.
i give it up and i give it to a friend better than me in programation, i will show it soon, the setup will be nice.
want to run it with a TheOneGauge connected on my terminator X max
will be in a 05 wide body mustang with a turbocharged 4V 4.6
Hi, is there any way you could tell me how to make i3 my default terminal after installation and how to remove lxterminalā¦ i tried xterm but didnt work.
I have run the instillation pavkage but dont know what to do after that. The tutorials arectoo vague.
Any help would be very appreciated. Thanks
The āstandardā way that i know to do this is by using āupdate-alternativesā, sth like:
sudo update-alternatives --config x-session-manager
thanks i appreciate the reply.
I still dont understand, is x-session-manager the comand for i3? or i have to know that somehow?
The issue seems to be that the xlogin session is not completed when the service tries to start so it bombs, I added a delay in a bash script then ran at cron bootup seems to be fine on pi 4
sudo nano /home/pi/realdash.sh
(add these lines save exit)
sleep 10
sudo systemctl start realdash
chmod 0777 /home/pi/realdash.sh
add to cronjob after reboot, it will add a 10 sec delay in starting the service
crontab -e
@reboot bash /home/pi/realdash.sh
I also set pi user to not require password for sudo not sure if you need that or not