Hi.
I'm trying to create/invoke a new gnome-terminal, were i start/run a script when the term starts up..
from the gnome-terminal docs, i'm assuming i can accomplish this by using the "-x/-e" attribute when i fire up gnome-terminal...
this doesn't work... others appear to have the same issue...
so, when i do: gnome-terminal -x "foo"
a new gnome term is created, but it hangs without a bash prompt (or any prompt) created.
so it appears that a useless blank term window is displayed. the "foo" script is simply an empty script for testing. it has the chgrp of 777 with a chown of 777 and a chmod of +x.
in the fstab, there is a default devpts so the virtual dev for the term window should be ok.. i think.
i'm running an older fedora 9 for this test.
any pointers/thoughts...
thanks...
2009/9/28 bruce bedouglas@earthlink.net:
Hi.
I'm trying to create/invoke a new gnome-terminal, were i start/run a script when the term starts up..
from the gnome-terminal docs, i'm assuming i can accomplish this by using the "-x/-e" attribute when i fire up gnome-terminal...
this doesn't work... others appear to have the same issue...
so, when i do: gnome-terminal -x "foo"
I don't know what you are doing, but I don't think it's right. Try this:
# echo "echo hello" >/tmp/foo # echo "sleep 1000000" >>/tmp/foo # chmod 755 /tmp/foo # gnome-terminal -e /tmp/foo
On my system, that results in a new gnome-terminal opening, containing the word "hello". If that works, then there is something wrong with your script and not gnome-terminal.
On 28Sep2009 11:17, bruce bedouglas@earthlink.net wrote: | I'm trying to create/invoke a new gnome-terminal, were i start/run a script | when the term starts up.. | | from the gnome-terminal docs, i'm assuming i can accomplish this by using | the "-x/-e" attribute when i fire up gnome-terminal... | | this doesn't work... others appear to have the same issue... | | so, when i do: | gnome-terminal -x "foo" | | a new gnome term is created, but it hangs without a bash prompt (or any | prompt) created.
Of course not. You're running "foo". It's _still_ a terminal! Sounds like correct behaviour to me.
| so it appears that a useless blank term window is displayed. the "foo" | script is simply an empty script for testing. it has the chgrp of 777 with a | chown of 777 and a chmod of +x.
Try this:
gnome-terminal -e sh -c 'foo & exec $SHELL' or: gnome-terminal -e 'foo & exec $SHELL'
The -e option _ought_ to take a command-and-arguments like xterm does, thus the 'sh -c '....'" invocation. But I have in the back of my mind that gnome-terminal got this wrong so I've supplied you the "-e shell-command-string" variation as well.
You might prefer 'foo; exec $SHELL', depending on your needs.
Cheers,