In ubuntu, I need to execute certain command as root after every login (ie. after X starts). How do I do that?
I tried chmod 4755 /path/to/script and then put it on Startup applications, but it doesn't seem to work (it is not executed as root)...
I think you need to put it under Administration->Sessions to make it work. To run it as root, just use sudo. If still does not work then try to log the output to a file i-e 2>&1 to see what exactly is happening and why is it not running. May be then you will be able to figure out what is causing the application to not run.
What are you trying to do? Do you exactly want it to run when the system is started up, when a network becomes connected, or at certain timeframes during the day?
For when the system starts up, look at /etc/rc.local as you pointed out.
For when a network becomes connected, look at /etc/network/if-up.d
For running at certain times periodically, look up crontab.
Did you chown your script files ?
That because I assumed that he do not wish to change overall system settings and the script will only executed when he logged in to the system but not any other users.
It will require that the owner of the files be root in order for the bit id to take effect.