Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

In Windows we can add applications/batch scripts to open automatically on startup. Is there something similar in Ubuntu, or Linux in general?

share|improve this question

marked as duplicate by minerz029, Alvar, blade19899, Seth, psusi Jan 3 '14 at 19:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Thank you both kiloseven and wilf I am not able to mark both as Answers. I marked 1. – mantlex Jan 2 '14 at 21:52
My answer wasn't very good :D - I upvoted @kiloseven's anyway. – Wilf Jan 2 '14 at 22:21
possible duplicate: How do I start applications automatically on login? – minerz029 Jan 2 '14 at 22:23
Since the user mentioned Linux in general, I don't think the link above is the universal answer they wanted. – K7AAY Jan 2 '14 at 22:26
up vote 3 down vote accepted

To setup tasks to run on login, use gnome-session-properties. This means you can add programs to run when you login to user account on your machine.

You can configure it like this - just add the command you want to run in the command box: config

Very long answer on that here

To get things to run when the computer boots, use rc.local:

You can edit it with sudo nano /etc/rc.local, or gksudo gedit /etc/rc.local.

Makes sure it has this line at the start of the file:

 #!/bin/sh -e

Below that, you can place commands that will run as root when you start the computer.

Also make sure it has this line at the end:

exit 0

More on that here

share|improve this answer

Here's the universal, multi-distro solution.

Create a script (don't forget to start with the shabang!) and place that script in


After rebooting, the script will launch, and you can also find it in Startup Applications (see the last screenshot in this link for an illustration).

This complies with the XDG Autostart Specification and works with any compliant distro of Linux.

share|improve this answer
It should be noted that this is for all users. If you only want it to be your user, see How do I start applications automatically on login? or wilf's asnwer. – minerz029 Jan 2 '14 at 22:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.