Originally Posted by ASTRAPI
I am trying to autorun a exe file in Ubuntu when is loading the desktop.
To run a program when the desktop loads, well, this depends on what desktop you are running. On Ubuntu is, probably, GNOME.
On Gnome, on menu bar, go to System/Preferences/Personal/Sessions.
On sessions window, on startup tab, click on new button. Type a descriptive name and the command, with the complete path if possible and any flags or parameters if needed.
You may also load any programs you want, and save your current session. Next time you desktop start, it will load all programs was opened when you saved the session. To do that, on sessions window, go to Session Options tab, and click on Save the Current Session button. Not all programs can be saved by this way, so you may have to use the previous method.