Configuring Gnome-Terminal

Posted on 2011-05-06
Last Modified: 2012-05-11
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?
gnome-terminal --geometry 90x26+200+10
gnome-terminal --geometry 30x8+700+500

Open in new window

Question by:tmonteit
    LVL 38

    Expert Comment

    > put them into a specific directory
    gnome-terminal --geometry 90x26+200+10 --working-directory=/dir1
    gnome-terminal --geometry 30x8+700+500 --working-directory=/dir2
    LVL 38

    Expert Comment

    Here are some advanced usage of gnome-terminal
    How to automate starting terminal instances for specific tasks

    Customize and use Gnome Terminal profiles
    LVL 20

    Expert Comment

    by:José Méndez
    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

    Author Comment

    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?
    LVL 38

    Expert Comment

    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".

    gnome-terminal --profile=term1

    LVL 38

    Accepted Solution

    Then create a script called /home/<user>/
    ----- -----
    echo "message....."

    chmod +x

    Edit "term1" gnome-terminal profile, in the "Title and Command" tag, check "Run a custom command instead of my shell" and put
    "/home/<user>/ into "Custom command:" filed.

    gnome-terminal --geometry 90x26+200+10 --profile=term1

    Author Closing Comment

    worked perfect!!!
    LVL 38

    Expert Comment


    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now