Originally Posted by Lieve
Isn't that going to make it execute whenever that user logs in? Because it has to be executed only once.. when the server is booted...
Or am I wrong here?
Well, I would have suggested putting a command in /etc/rc.local, except that you specified it must be run from a graphical environment.
In fact, here are the two requirements you have specified:
1. "it has to be executed only once.. when the server is booted ..."
2. "this command can ONLY be run from a graphical interface..."
You cannot have both. You must decide which one you want more, and abandon the other.
It's not an issue of right and wrong, it's an issue of feasibility.