I have this python script that connects my desktop to the internet. there is not much text in it only a few messages about current status and time. So it would be really nice if i can open it (.sh file that opens the .py file) in a terminal that has a particular profile (with short frame size and dark background etc.)
Put following script at the end of
if [ x$DISPLAY != x ] ; then gnome-terminal --save-config=/tmp/prof PROFILE=$(grep 'ProfileID=' /tmp/prof | sed 's/ProfileID=//g' | tail -1) if [ "$PROFILE" == "Profile1" ] ; then # run your script here fi fi
if statement checks if you are running GNOME terminal, not a virtual console one. Then configuration of profile is saved into
/tmp/prof. Third line reads profile name from that file. Inner
if statement checks if it's a profile in which you want to call your script.
To list names of your profiles run:
$ gconftool-2 --get /apps/gnome-terminal/global/profile_list [Default,Profile0,Profile1]