Other suggestions have shown that some configuration in your home folder is causing this error.
Hunt down the file causing the problem
If you want to just get to the file that's causing the problem you will have to use trial and error to hunt it down.
Step 1 - It's probably in your .config folder
Start by renaming your .config folder to .config-bak and reloading Unity with the following command:
$ unity --replace
If this fixed the problem delete the new .config folder that was created and rename the old folder back to .config and reload unity again. Problem should now have returned. Move to step 3.
If this didn't work move to step 2.
Step 2 - It's a dot folder
If it wasn't in the config folder it was likely in a different dot folder. Using file manager with ctrl+h to show hidden files go to home folder. Make a folder called my-conf and move all .files and .folders to it ( except .config ) and reload Unity.
$ unity --replace
If this fixed your problem restore all the dot files and reload Unity. The problem should now have returned. Move to step 3.
If this didn't work, repeat this step but for non hidden files.
Step 3 - Find the bad egg
Using file manager open either your ~/.config folder (Step 1 worked) or your home folder (Step 2 worked) in one window and ~/my-config (create if needed) in another.
Move 10 of the suspect files/folders to ~/my-config and reload Unity. If problem isn't fixed, replace files/folders and repeat for the next 10. Continue repeating until the problem goes away. Once you have narrowed it down to 10 files restore them one at a time, reloading Unity each time until you find the culprit. Once you have found it, hold back that single config file and restore any remaining configs.
Step 4 - Post problem config file to your question
Post path and content of problem config file so the community may better refine this answer into a possible quick fix. Thanks!
You might be able to speed up your search for the problem configuration by first trying the configs related to compiz, unity, x and the programs you are having the problems with.
Best of luck!
New edit - Solution found by poster after following the approach above:
The problem was the .profile file in the home directory of the userid. the PATH variable had a reference to a symlink in /opt. The content under the symlinked directory had 777 permissions. After changing that to something less permissive, the problem went away.
This is my PATH variable:
Then I set the symlinked directory permissions to 755:
gunner@minix:~$ ls -l /opt | grep sub3dtool
lrwxrwxrwx 1 root root 16 Apr 22 10:47 sub3dtool -> sub3dtool-0.4.2/
drwxr-xr-x 4 root root 4096 Apr 22 10:47 sub3dtool-0.4.2