tmonteit
asked on
Configuring Gnome-Terminal
In ubuntu linux, I have a script that opens two terminals. How do I print a seperate message into each terminal and put them into a specific directory?
!/bin/bash
gnome-terminal --geometry 90x26+200+10
gnome-terminal --geometry 30x8+700+500
Here are some advanced usage of gnome-terminal
How to automate starting terminal instances for specific tasks
http://askubuntu.com/questions/2538/how-to-automate-starting-terminal-instances-for-specific-tasks
Customize and use Gnome Terminal profiles
http://ubuntuforums.org/showthread.php?t=1347856
How to automate starting terminal instances for specific tasks
http://askubuntu.com/questions/2538/how-to-automate-starting-terminal-instances-for-specific-tasks
Customize and use Gnome Terminal profiles
http://ubuntuforums.org/showthread.php?t=1347856
To send messages to the consoles you may try to obtain the pts number for each console, for example if you run:
who am i
user pts/3 2011-05-05 00:24 (:0.0)
Then you need to extract the pts/3, and use it like this:
echo "Your message" > /dev/pts/3
Hope it helps
who am i
user pts/3 2011-05-05 00:24 (:0.0)
Then you need to extract the pts/3, and use it like this:
echo "Your message" > /dev/pts/3
Hope it helps
ASKER
I'm making progress... The only problem is that when I try to display my message the window automatically closes.
gnome-terminal -e "cat my-message.txt"
How do I keep the window open with the bash-prompt after I display my-message?
gnome-terminal -e "cat my-message.txt"
How do I keep the window open with the bash-prompt after I display my-message?
You need to create a new profile.
Open a terminal and select Edit -> Profiles. Add a new profile and name it 'term1'
Then edit the "term1" profile, in the "Title and Command" tag, in pull-down menu for "When command exits:" choose "Hold the terminal open".
Then
gnome-terminal --profile=term1
Open a terminal and select Edit -> Profiles. Add a new profile and name it 'term1'
Then edit the "term1" profile, in the "Title and Command" tag, in pull-down menu for "When command exits:" choose "Hold the terminal open".
Then
gnome-terminal --profile=term1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
worked perfect!!!
Great.
If my 1st and 3rd comments helpful, please click on "yes" for those comments.
This will make the other subscribers easy to locate the solution.
If my 1st and 3rd comments helpful, please click on "yes" for those comments.
This will make the other subscribers easy to locate the solution.
gnome-terminal --geometry 90x26+200+10 --working-directory=/dir1
gnome-terminal --geometry 30x8+700+500 --working-directory=/dir2