It would be OK if it was only with my login password, but I would like to lock both midori and Firefox so that they cannot be used without entering a password. I'm running 12.04.
Use ProfilePassword add-on for firefox. This would lock your firefox profile and whenever you run firefox it will ask for the password you set through add-on preferences.
Yes, these do not provide advanced security. But it's good enough just to prevent someone using firefox. I'm using it for some time now and had no problem yet.
Even if you somehow lock just the browser but leave your computer/account logged in, it's quite possible for anyone to go in, open a terminal, and get the details of your Midori/Firefox history, cookies, stored passwords, etc.
Therefore, it's best to simply lock your screen/computer whenever you are not using it instead of ever leaving it open. Then your login password is required before anyone can do anything with the computer.
Use the Ctrl+Alt+L keyboard shortcut to quickly lock the computer whenever you are not using it.
You can block users (that is, system identifiable users, e.g. users that are created using
Find the executable file for firefox:
Change mode (user permissions) from 755 (default) to 750 (not executable and not readable by "others" except for owner and group):
Create a group webapps:
Add current user ($USER) in webapps group:
You have to logout/login for changes to take effect.
You may add any other user, e.g. mytestuser:
Change the owner and group from "root" (default) to "webapps":
Try running firefox:
Your user can execute/open firefox, others cannot. If you logout/login with a different user that is not in "webapps" group, you won't be able to execute it. Only users in the webapps group may execute /usr/bin/firefox now.
Revert changes using:
Note: This doesn't stop the user from downloading a pre-compiled version of firefox (e.g. from http://www.mozilla.org).