The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Quick question for the pros.

    Discussion in 'Linux Compatibility and Software' started by graycolor, Sep 1, 2010.

  1. graycolor

    graycolor Notebook Evangelist

    Reputations:
    30
    Messages:
    459
    Likes Received:
    0
    Trophy Points:
    30
    How do I open a program from the terminal in a separate window. For example I can run vim by typing vim on the terminal, but how would I have it open in its own window (using the terminal of course)?
     
  2. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    If you're talking about gnome-terminal, there is no way that I know of to do that. There is no key combination or special command to open something in a new window that I know of. You'd need to open a new window with Ctrl+Shift+N (by default) and type the new command that you want in its own window.
     
  3. graycolor

    graycolor Notebook Evangelist

    Reputations:
    30
    Messages:
    459
    Likes Received:
    0
    Trophy Points:
    30
    I found my answer while browsing the web. I guess you can only open certain applications using applications specific commands. For my case the command "gvim" will allow me to open the program in its own window. :D
     
  4. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    That's because it's a gnome app :p

    At least you found what you wanted, there's no general way to do what you asked AFAIK.

    Edit: Wait. I'm an idiot.

    Code:
    gnome-terminal -e gnome-terminal
    Replace the last gnome-terminal with whatever you want to run in a new window. I think Ctrl+Shift+N is easier, but there it is.

    :eek:
     
  5. graycolor

    graycolor Notebook Evangelist

    Reputations:
    30
    Messages:
    459
    Likes Received:
    0
    Trophy Points:
    30
    Hey thanks, and yeah it is easier to do the cntr...shift thingy.
     
  6. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Yeah with gnome-terminal -e the command has to be interactive, otherwise the window will open and close. But in your case if you wanted to run vim, you could just do
    Code:
    gnome-terminal -e vim
    Ctrl+Shift+N is still easier, but there could always be some case where you'd want a new window from a script or something, for example..
     
  7. graycolor

    graycolor Notebook Evangelist

    Reputations:
    30
    Messages:
    459
    Likes Received:
    0
    Trophy Points:
    30
    This might be a dumb question, but does every Linux program/application have a bin file? I remember somewhere that all the programs are stored somewhere like the usr/share/bin. Why don't I just create a symbolic link to that program with a custom name and just launch it from the terminal. :confused:

    Kind of like what this guy did with firefox http://linuxtrends.com/adding-real-firefox-to-debian-lenny/
     
  8. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    That's just an old convention of Unix and *nix-like operating systems.. an executable has to go somewhere, and if you put it in your home directory nobody else will have permission to use it except for root. /usr/bin is always in your path by default, which is where most things are. I'm not really sure why you'd need a symbolic link for something, unless you have to type the full name of the program. In that case a better solution would to be adding it to your path by adding a line to ~/.bashrc or ~/.bash_profile
    Code:
    PATH=$PATH:/path/to/program
    Some things are symbolic links anyway, but that is more distro specific, like the alternatives system in Debian for example.
     
  9. millermagic

    millermagic Rockin the pinktop

    Reputations:
    330
    Messages:
    1,742
    Likes Received:
    0
    Trophy Points:
    55
    If you're in the GUI and running the terminal, you can use gedit file and it will launch gedit. Is that what you mean? It's a pretty handy feature.