how to insert a title into a window in kshell

hi all,

i am using a Ubuntu work station. i have following piece of code that works ok. But i cant figure out a way to insert a string call $Name into the title of the window i am opening. As you can see, i tried two different ways without a success. Can someone please help me out here? :frowning:

if [ "`uname`" = "Linux" ]; then
    #xterm -n $i -T $Name -sl 9999 -sb -bg black -fg yellow -geometry 90x24 -exec vi $log/logs/test.txt
    gnome-terminal --window-with-profile=Win --title=$Name -e "vi $log/logs/test.txt " &

else

You need to add double quotes around your title string. For example:

xterm -n "$i" -T "$Name"

i tried that, still it doesnt put the title i want. i am using Ubuntu 8.04, i dont know if i need to change anything or download anything.

I guess either

xterm -n "$i $Name"

or

xterm -T "$i $Name"