Run application on startup

Hi,
I have a command line application (without GUI) which after executing does get input from user with its command prompt (image below). and do not exits unless user shutdown it with sending shutdown command into its command prompt. It's file name in 'app' and its path is 'home/sur/exe', and i can simply start the app with this command:

./app

My problem is that i cannot make it automatic to execute this application after boot. there is an application named "Startup Applications Preference" inside system monitor (shown in image below)
http://ubuntu-mate.community/uploads/default/original/2X/7/7d430e8fec23b9003dc26bd16e308846b8c88f49.png

i did set an item in it for my 'app' file, but after reboot my file do not executes, even cannot find it's process with 'ps aux' command.
I need to run my file on linux startup. can anyone help please?

thanks

Possibly you can place your script [make certain it’s executable] in init.d
check out this post

You can also use the command in Control Centre > Personal > Startup Applications by adding it!.

i did try "Startup Applicatin Preference", but no success, here is what i did:

i did add execution script (bash script) to /etc/init.d/ folder once, but my raspberry pi did not booted at all so i removed execution script from init.d folder.

Are you sure that that is the full command?. :smiley:

no! can you say me is it true or not?

What is the full name of the application you are trying to use?. :smiley:

its file name is “app” and it is inside ‘home/sur/exe’ folder. Full details is in my first post.

Hi,

in the Ubuntu software lists, there is no app called "app" or "sur"?, where did you get it from?:

I have no idea about pi, here’s the results of a Google Search

‘sur’ is my user name in ubuntu mate, and app it an executable file which is not a well known application. I execute that file using terminal (> ./app) and executes normally (like image in post 1). problem is with setting it on startup…

thanks

Sorry but unless you can give me a proper name for it; I can’t help you any more!. :frowning:

If I’m understanding this right, it’s a console application asking for input - and there’s is no terminal or way for the user to enter anything.

Instead, if you need the application to run and show a terminal, consider this:

mate-terminal -e "/home/sur/exe/app"

Or if it runs invisibly in the background, try adding bash to the start:

bash /home/sur/exe/app

I’m not sure what type of file we’re dealing with – a binary, a shell or Python script?

Double check that the file is marked as executable or it will not have permission to run.

it did worked. thanks:

mate-terminal -e "/home/sur/exe/app"

Anyways, the file is binary file and i’m not sure i did placed correct format of command in “Startup Applications Preference” in my last tries who failed.
Can you also say how to pass arguments to app file while using mate-terminal -e?

Thank you so much…

Arguments for -e should go inside the quotes, like so:

mate-terminal -e "/home/sur/exe/app --parameter=1 --parameter=2"
1 Like

How to start different url in different time?

please Help Me…