Author Topic: Start AdvancedHMI display on raspberry pi startup.  (Read 1375 times)

Lupo

  • Newbie
  • *
  • Posts: 7
    • View Profile
Start AdvancedHMI display on raspberry pi startup.
« on: August 29, 2021, 11:47:49 PM »
Hi All,

I can start my AdvancedHMI display from the directory it is in or a shortcut on the desktop but I can't figure out how to get it to open up on boot up.

I tried all the ways this website suggested, but none of them worked.
https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/

Any ideas?

dmroeder

  • Global Moderator
  • Full Member
  • *****
  • Posts: 210
    • View Profile
Re: Start AdvancedHMI display on raspberry pi startup.
« Reply #1 on: September 01, 2021, 10:15:14 AM »
Try:

Edit the autostart file: sudo nano /etc/xdg/lxsession/autostart
Arrow down to the bottom and add: @/usr/bin/mono /home/pi/myprogram.exe
Save and exit:  CTRL + X, then Y, then Enter

Lupo

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Start AdvancedHMI display on raspberry pi startup.
« Reply #2 on: September 09, 2021, 02:19:43 AM »
Thanks but no luck.  Anything else I might try?

It looks like X-Server isnt running.  When I run the application from the GUI it works, but from the console X-Server isnt starting.

 
« Last Edit: September 09, 2021, 03:16:18 AM by Lupo »

MajorFault

  • Guest
Re: Start AdvancedHMI display on raspberry pi startup.
« Reply #3 on: September 09, 2021, 10:46:38 AM »
Can you get anything to start?  Try another application.

Also, you can search other sites/forums on how to do this, it should be generic, not specific to AHMI.

dmroeder

  • Global Moderator
  • Full Member
  • *****
  • Posts: 210
    • View Profile
Re: Start AdvancedHMI display on raspberry pi startup.
« Reply #4 on: September 09, 2021, 09:05:44 PM »
Thanks but no luck.  Anything else I might try?

It looks like X-Server isnt running.  When I run the application from the GUI it works, but from the console X-Server isnt starting.

I know we can get this working, I'll test with my pi tomorrow.  I remember struggling with the exact same problem in a different application.  I think when I was on the struggle-bus, I was trying to use a systemd service and it didn't like running GUI applications either.