Startup programs in Ubuntu
If you have an Ubuntu program that you want to run on startup — a backup routine, for instance — it’s easy to set that up. Go to the System Menu and down to Preferences. Select ‘Session‘ from the submenu that appears. You will see a tab marked ‘Startup Programs‘ and a list of those programs already set to run at startup. Unless you know what you’re doing it’s not a good idea to remove any of these, but you can add your own with the ‘Add‘ button at the right.
Provide a name for the item — this is just for your own reference — and then the command to run it. You will need to know the command-line name of the program, but you can find this by looking at the Properties of an existing menu or desktop shortcut that activates the program: for instance, the command-line name of the default Ubuntu file manager is ‘nautilus‘. If you can’t find it this way you can try browsing to /usr/bin, where most binary program files are kept. Any command-line switches to alter the operation of the program can be included in the command; e.g. ‘nautilus /home/jon‘ will start the file manager with that particular folder open.
The ‘Options‘ tab here allows the user to tell Ubuntu to remember what applications were running on shutdown, and to open them again on rebooting; this is not particularly wise, as an application which freezes the system may do the same thing when it restarts on booting.
Setting preferred applications
If you have a file in a generic format — a text file, for instance, or a JPG image — you have a choice of applications which can deal with it. You may want your text file to appear in a word processing application for thorough editing, for instance, or to pop up quickly in a text editor so that you can read the contents. You can control this on a one-off basis by right-clicking on the file name or icon and selecting ‘Open with application…‘ from the local menu that appears. The menu will include some suggested applications, but you can override these and add your own.
But what if you want to associate a type of file with a particular program, so that double-clicking on a text file, say, will always open the default text editor (Gedit) rather than the Open Office word processor application? The secret is in the file properties. Right-click on the file name or icon and select ‘Properties‘, then click on the ‘Open With‘ tab. This allows you to add other applications to the list of potential applications, and to select one as the default by clicking the radio button to the left of that application. Any applications you add will appear from then on in the right-click menu, whether you select them as the default or not. If the application you want to use does not appear in the list you can add a custom command to bring it up. Easy!