Find the answer to your Linux question:
Results 1 to 3 of 3
hello i want to start a new terminal from a script with some command already given.....it is easy to simply start a new terminal from script but i want that ...
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    29

    start terminal from script

    hello
    i want to start a new terminal from a script with some command already given.....it is easy to simply start a new terminal from script but i want that the new terminal start showing output of some command that is given to it while starting it....plz help

  2. #2
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251
    If you are using gnome, you can try these examples:
    #open a new terminal and list current directory contents
    gnome-terminal -x bash -c "ls; cat"

    #open a new terminal and monitor system log
    gnome-terminal -e "tail -f /var/log/messages"

    #edit /etc/fstab in a newly-opened terminal
    gnome-terminal -e "vi /etc/fstab"

    Hope it helps.

  3. #3
    Just Joined!
    Join Date
    Feb 2008
    Posts
    29
    thanks ....its working

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...