Results 1 to 5 of 5

Thread: opening files and programs from Terminal

  1. #1
    Join Date
    Feb 2012
    Beans
    20

    Question opening files and programs from Terminal

    I want to open files and programs from terminal

    for programs i can just type the program name
    for example : rhythmbox
    for files i use gnome-open command

    the problem is this keeps the terminal busy
    if i use ctrl + c it terminates the program or file


    how can i open programs and files without keeping the terminal busy ?

  2. #2
    Join Date
    Mar 2012
    Beans
    34

    Re: opening files and programs from Terminal

    Are you asking how to open stuff from terminal without keeping the same terminal session busy with the program your running? You could open another windows (its under file) or open another tab (also under file, I think ctrl+T might also work).

  3. #3
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    6,697
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: opening files and programs from Terminal

    Hi MaWiSo.

    Just add an '&' at the end of the command (it means 'run' in the background).

    For instance:
    Code:
    rhythmbox &
    In the case you forgot it, you can send the program to a 'stopped' state by using ctrl+z and you'll see something like:
    Code:
    [1]+  Stopped                 rhythmbox
    To send it to the background (just as you had put the ending &) run:
    Code:
    bg 1
    Hope that helps.
    Regards.
    Last edited by papibe; March 27th, 2012 at 01:04 AM. Reason: added jobs control

  4. #4
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,900
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: opening files and programs from Terminal

    Might want to make that

    Code:
    rhythmbox &> /dev/null &
    That redirects all output from the program to /dev/null, which is a blackhole that destroy's everything going into it, meaning your just discarding the output, so your terminal doesn't get cluttered with chatter from the program you run.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

  5. #5
    Join Date
    Feb 2012
    Beans
    20

    Smile Re: opening files and programs from Terminal

    Thanks Guys ,

    That worked well.

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
  •