Based on feedback in comments tried this command: In a terminal window this works:
gnome-terminal -x bash -c "sudo ./serial"; xdotool getactivewindow windowminimize
However when running the command in Startup Program the xdotool seems to be ignored. The pc boots with terminal windows on the screen, not minimized.
I'm trying to determine a way to minimize the terminal window with the gnome-terminal command. I need my Ubuntu 14.04LTS remote pc to run several scripts and a C program at startup. This remote pc is for customer viewing so the monitor needs to be clean. I did not see an option available to minimize: http://manpages.ubuntu.com/manpages/wily/man1/gnome-terminal.1.html. The best I could do was to make the terminal windows small, which is acceptable if I don't find a better way. This is my command entered into Ubuntu's "Startup Applications" program:
gnome-terminal --geometry=60x2 --command "sudo ./My_C_Program"
My programming/Linux skills are mediocre, but growing. I'm looking for a better way to do this.
Based on a comment/feedback tried this:
gnome-terminal -x bash -c "sudo ./serial_ver2_machine3_free_air_3_95"; wmctrl -r :ACTIVE: -b add,shaded
This works just the way I want when executing in a Terminal window!! The Terminal window is shaded but program is still running and it reappears when I click twice on Ubuntu's Terminal icon.
However when executing within "Startup Applications" the Terminal window is not 'shaded'. Using 'add,hidden' does not work. Using 'add,below' works, except I'm using my desktop background image as part of the customer viewing.