How to autostart (autorun) a program on boot in Ubuntu [Guide]

ubuntu_circleMany programs automatically run at startup in Ubuntu, but generally they are the just the most important applications for the operating system to function properly. There are times when a user may want to manually add programs to automatically start a program at Ubuntu boot. This guide shows you how to do that.

BEFORE WE BEGIN

Take note this guide is for Ubuntu users only, although it may also work for other Linux distros — especially those that are based on Ubuntu.

HOW TO AUTORUN PROGRAMS AT UBUNTU BOOT

It is very easy to add applications to the list of ones that run after your machine boots. All you need to do is figure out the application’s package name, and insert it into this bit of code into terminal:

sudo ln -s /usr/bin/"ProgramName" ~/.config/autostart

Take note where it says “ProgramName” is where you should put the name of the package (without quotes).

For instance, the terminal code to launch Google Chrome in Ubuntu at startup would look like this:

sudo ln -s /usr/bin/chrome ~/.config/autostart

Now, Chrome will launch automatically every time you start up your machine.

You can use this trick for whatever purpose you need, such as launching an email app or even an office app if you always use it right at boot. Enjoy!

Related Posts

  • Not quite

    The method described in the article will cause a program to launch at LOGIN, not on boot. There is a huge difference.

    Try adding the command to start your program (e.g. /usr/bin/”Program Name”) to the file /etc/rc.local at some point before the line ‘exit 0’. This can be used to start non-graphical programs as the root user before any logon takes place.

    Alternately, you can modify your /etc/init.d functionality by writing an init script that will launch your program at startup as well as allow you to start/stop/restart as you can for other services.
    see http://stackoverflow.com/questions/7221757/run-automatically-program-on-startup-under-linux-ubuntu

  • JohnW

    How does one go about configuring a program to auto-start upon boot AS A normal user in ubuntu 12.x ?

    Thanks for any help

  • Emrys

    Failing any easy solotion, is there another distro that you would reccomend?

  • Emrys

    Odd problem. I use FEDORA 19 (64 bit) on a bootable stick because my HD is failing and Win7 only runs in Safe Mode. I get around a lot of limitations by using the much smaller OS. Trouble is, I have to go through a 3 step process to reinstall Adobe Flash everytime I boot. The script can be viewed here: ttps://fedoraproject.org/wiki/Flash
    I’d very much like to have Flash autoload, but have no idea how to get all three steps loaded to the USB stick in a way that it all will work. I may be asking a lot here. Any ideas would be welcome.