How can you make a .sh file come on at startup in Lubuntu 12.04?

In the file manager, go to /usr/share/applications. Open it with root access (Tools -> Open Current Folder as Root)

Open as root

In your root access file manager window, create a new file (File -> Create New -> Blank File)

blank file

Name the new file touchpad.desktop.

file name

Find your newly created file, right-click it, edit it with leafpad.

enter image description here

In leafpad, paste the following:

[Desktop Entry]
Name=Touchpad Autostart
Exec=/home/magpie/touchpad_settings.sh
Type=Application
Terminal=false

Save it. If you can't save it, you are not in the window with root access. Start over again and follow the directions really carefully.

Again, find your file in the root access file manager window. Right-click and copy.

Copy

Now navigate your root window to the autostart folder:

/etc/xdg/autostart/

Finally, paste in your desktop file you created earlier.

Autostart File

If you did everything correctly, you should see a lot of other autostart files, but you will also see the file, "Touchpad Autostart"

It's there...

This is not the fastest way to do things, but you seemed to be struggling with a lot of steps in the other answers, so I wanted to take it slow with a lot of details. If your script is still not running after rebooting (do not simply logout and back in), it's a problem with your script. Maybe double check?


Open /etc/rc.local in your editor with root permission and add the command you want to execute at startup before the line exit 0 in that file.

In your case it is

sh home/magpie/myfile.sh