Sometimes you want to run a similar sort of script when a user logs in to the gnome desktop as well.
To do this you need to create a .desktop file and place it in ~/.config/autostart. Here is an example;
You also need to place an executable script (in this case /home/brettg/test.sh) that will hold the commands you want to execute.
More details here and here