I have an application which is an object file (obtained from a c source code).When I run this application from the terminal it works fine.I want to run this application on system start up. Since all the log data currently I am printing on the terminal, I want to open the terminal and run this application in terminal (so that I can see the live log and also give input to my application from terminal).After searching some tutorials I am able to create a service which runs a shell script on startup. I modified this script to open a terminal and run the application.If I run the shell script only from the terminal it works well. But when I am running the script from service I am getting following warning:(x-terminal-emulator:16048): Gtk-WARNING **: cannot open display:Where am I making mistake?Here I am using beaglebone black running with debian.This is my service code(application.service)[Unit]Description=application setup[Service]WorkingDirectory=/root/application/ExecStart=/root/application/start_applicationSyslogIdentifier=applicationRestart=on-failureRestartSec=5[Install]WantedBy=multi-user.targetHere is start_application.sh#! /bin/sh## start_app_server#echo Starting application serverx-terminal-emulator -e app_server/a.outecho Done
opening a terminal with a command on startup in debian
debian;shell script;services