When you right-click a file, there is a wealth of options available in the context menu that appears. At the bottom, you’ll notice Properties, and clicking it will let you change all sorts of things, and give you lots of info about the file (depending on the file-type).
In the first tab, Basic, you’ll see you can rename the file, and if you click on the icon on the left, you can change it to whatever you want. Note that this will change the icon only for the file specified, not all others of the same extension. If you want to change the icon for a whole file-type, read about creating your own mimetypes in Ubuntu.
If you’re ever having permissions trouble with a file, go to the Permissions tab and make sure you have full “Read and write“ access. Also, if files of a specific extension are not opening in anything (and a default program has been specified), or if scripts aren’t being executed, or certain text files not opening, then you may need to tick “Allow executing file as program“.
The last thing you can do is change the default application for the whole file-type under Open With, and all you need to do is select another from the list. You can +Add more, and if the app you want isn’t in the list that is presented to you, you can create your own custom command instead. In this example of .txt documents, if the desired program, Leafpad, isn’t in the Open With list, and isn’t presented after clicking +Add, you could type leafpad as the custom command.
So there you have a few ways to get greater control over your files. As you can see, changing the default program a file-type opens in is a quick and easy task, and you can customise your most important files to have their own unique icons.


