I'm trying to find how is possible to execute a root command when a user starts their session.I found that adding commands to this file /etc/rc.local should execute the commands after the boot, but my command is not being executed, or maybe the system is not ready yet to execute it. (the command works well)Maybe an example could clarify what I'm trying to do. In almost all desktop managers there is an option at settings window called Session and Start-up, and under the section Application Auto-Start it is possible to add commands that will be executed once the current user logs-in. I'd like to do that but with a command that requires root permission.
Execute root command after a user starts the session
startup;rc