The script below get's executed differently if run as a root user.
#!/bin/sh gnome-terminal -x sleep 10 echo 'Why must I wait for sleep to finish?'
If its run as a regular user, message is printed alongside of the newly opened terminal that waits 5 seconds.
If run as a root user, the message isn't printed until the first command doesn't end.
- Ubuntu 12.4
whereis gnome-terminalis the same for root and standard user
What is the explanation for such behavior?