Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Bash command to open a new terminal session and display results or actual actions.

  1. #1
    Join Date
    Sep 2007
    Beans
    Hidden!

    Bash command to open a new terminal session and display results or actual actions.

    Xfce related for Xubuntu

    Hi Folks,

    How would I write in a "bash" command that would open a second terminal session (xfce4-terminal and/or xterm; if they are different) and display information in the second terminal not in the first.

    EDIT:
    My idea maybe wasn't clear enough in the original post:

    I'm trying to write a bash script that will display results of commands in a second terminal so as not to mess up the the original terminal.

    EDIT: 2
    Can someone tell me which terminal is the "default" for Xubuntu
    1. xfce4-terminal; or
    2. xterm

    as both are installed by default on a clean install, but only xfce4-terminal shows up in the menus. Applications > Accessories > Terminal

    From comments so far, up to post #15, people seem to be using xterm more.
    End EDIT 2

    For example

    ONE:
    Type in a command - opens another terminal and displays all files in /media/sdb1/Documents/Book, keeping my original terminal clean except for the original command

    TWO:
    Or if I want to copy a number of files: Chapter??.**~
    From: /media/sdb1/Documents/Book
    To: /media/sdb1/Documents/Book/old

    The command given would be in the 1st terminal, it would open a 2nd terminal and I'd see the "list of files being copied" as they were being copied.

    THREE:
    I have this bash file:
    Code:
    #!/bin/bash
    find /media/sdb1/Documents/Book -mtime +14 -type f -delete
    How can I rewrite that one to open a 2nd terminal and display the contents of what's there before and after the process, before just for the practice, I'm really interested in the "after"

    Thanks Folks
    Bruce
    Last edited by Bruce M.; April 20th, 2008 at 05:22 PM. Reason: EDIT, 2

  2. #2
    Join Date
    Apr 2007
    Beans
    14,781

    Re: Bash command to open a new terminal session and display results or actual actions

    You want a traditional file manager.

    Try mc (midnight commander)

    It seems to have all you really want.

  3. #3
    Join Date
    Oct 2007
    Beans
    832
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Bash command to open a new terminal session and display results or actual actions

    Quote Originally Posted by LaRoza View Post
    You want a traditional file manager.

    Try mc (midnight commander)

    It seems to have all you really want.
    Don't understand what this has to do with the original question.

    Using Ubuntu 7.10, one can open a terminal and put in a command followed by a ' -x '.

    However, not sure what the command is for other terminals...

  4. #4
    Join Date
    Apr 2007
    Beans
    14,781

    Re: Bash command to open a new terminal session and display results or actual actions

    Quote Originally Posted by mdpalow View Post
    Don't understand what this has to do with the original question.
    mc has two "windows" and a command line. One can have different directories open in each window, and use the command line separately.

  5. #5
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Bash command to open a new terminal session and display results or actual actions

    Quote Originally Posted by LaRoza View Post
    You want a traditional file manager.

    Try mc (midnight commander)

    It seems to have all you really want.
    No, I want to do this with terminals. I already have a file manager., Thunar

  6. #6
    Join Date
    Apr 2007
    Beans
    14,781

    Re: Bash command to open a new terminal session and display results or actual actions

    Quote Originally Posted by Bruce M. View Post
    No, I want to do this with terminals. I already have a file manager., Thunar
    mc runs in the terminal. http://en.wikipedia.org/wiki/Midnight_Commander

    (I use mc and thunar as my file managers)

  7. #7
    Join Date
    Sep 2006
    Beans
    2,914

    Re: Bash command to open a new terminal session and display results or actual actions

    eg
    Code:
    xterm -hold  -e /bin/bash -l -c "ls"

  8. #8
    Join Date
    Jun 2006
    Location
    Gwangju, Korea
    Beans
    3,479

    Re: Bash command to open a new terminal session and display results or actual actions

    You might also be interested in hotwire, available from getdeb.net.

  9. #9
    Join Date
    Aug 2005
    Location
    Fargo, ND, USA
    Beans
    1,499
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Bash command to open a new terminal session and display results or actual actions

    Code:
    xterm -e "ls ; sleep 2"
    or maybe
    Code:
    xterm -e "ls | less"
    Help yourself: Search the community docs or try other resources.
    Quote Originally Posted by Henry Spencer
    Those who do not understand Unix are condemned to reinvent it, poorly.
    Let science use your computer when you aren't: Folding@Home.

  10. #10
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Bash command to open a new terminal session and display results or actual actions

    Quote Originally Posted by LaRoza View Post
    mc runs in the terminal. http://en.wikipedia.org/wiki/Midnight_Commander

    (I use mc and thunar as my file managers)
    Hi LaRoza,

    Not in line with what I was asking but I'm still going to check this out. Thanks for this.

    My idea maybe wasn't clear enough in the original post:

    I'm trying to write a bash script that will display results of commands in a second terminal so as not to mess up the the original terminal.

    Now I have another dot on my ToDo list:

    • Check out Midnight Commander.


    Have a nice day,
    Bruce

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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