0

My Script

#!/bin/bash
export DISPLAY=:0
my-application start &
chvt 7
  • I've tried sticking it in my /etc/init.d directory. (without success)
  • Also tried to put it in my rc.local file. (that also didnt work)
  • The script itself does run if I run it myself after startup.
  • Im also open to figuring out a new way to run my application at startup
  • You can not run graphical apps as a part of boot as X or whatever is not running. Probably best to use a non graphical application or enable auto login and run that as part of a user login, hard to tell. – Panther Sep 19 '17 at 19:11
  • You can do it. We have other applications that boot right to the application itself. just the guys who had done it are on vacation and now its up to me to figure out how to do it here. – Jermayne Williams Sep 19 '17 at 19:16
  • Do you know what graphical display you are running ? Use full path to "my-application" ? – Panther Sep 19 '17 at 19:26
  • not sure what graphical display it is running. The application was written in Qt using Qt creator (idk if that helps) running "my-application start" runs the application. why would I need the full path? – Jermayne Williams Sep 19 '17 at 20:01
  • Because boot / init scripts are running in a minimal shell with minimal path and may not be able to find "my-application" . It will not run if you are not running an X server / VNC or have done some sort of system config. – Panther Sep 19 '17 at 20:03
  • ok thanks. Ill figure it out and give it a shot – Jermayne Williams Sep 19 '17 at 20:10
  • You can try with Cron and the @reboot option. Similar task here (look at the third section). – pa4080 Sep 19 '17 at 20:19
  • basically what I had to do here is to write a upstart script to run after it booted because X runs after boot.

    heres a reference http://upstart.ubuntu.com/getting-started.html

    – Jermayne Williams Oct 16 '17 at 17:04

0 Answers0