ubuntu run on startup code example

Example 1: run app at startup in Windows 10

Add an app to run automatically at startup in Windows 10:
1. Find the app you want to run at startup, select the Start button and 
	scroll to find the app, look on your desktop to find the app or 
    use the search option. 

2. Right-click the app, select More, and then select Open file location. 
	This opens the location where the shortcut to the app is saved. If 
    there isn't an option for Open file location, it means the app can't 
    run at startup.

3. With the file location open, press the Windows logo key + R, 
	type shell:startup, then select OK. This opens the Startup folder.

4. Copy and paste the shortcut to the app from the file location to the 
	Startup folder. Now when you open Task Manager and go to the startup 
    tab, you should see the app with the 'Enabled' status.

Example 2: run command at startup ubuntu

Put a script containing the command in your /etc directory. Create a script such as "startup.sh" using your favorite text editor. Save the file in your /etc/init.d/ directory. Change the permissions of the script (to make it executable) by typing "chmod +x /etc/init.d/mystartup.sh"

Example 3: auto start application ubuntu 18.04

Open Startup Applications in 'UBUNTU' Linux.
First you can press 'Alt + F2' and run 
'gnome-session-properties' command...

Tags:

Misc Example