Find the answer to your Linux question:
Results 1 to 3 of 3
Hi All, I have a really strange program that I have to run from terminal. The file is in a long path (something like /usr/intel/...../...../...../....../...........). It's annoying having to type ...
  1. #1
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958

    Open terminal/enter command from .sh file?

    Hi All,

    I have a really strange program that I have to run from terminal. The file is in a long path (something like /usr/intel/...../...../...../....../...........). It's annoying having to type it out every time I want to use it in terminal.

    If I make a direct path to it with ./program in terminal, it runs no problem. If I do the same thing in a launcher, nothing happens. I guess it requires a terminal to compile (never had software like that before).

    So for now I've made a lame attempt at a roundabout fix, made an executable on my desktop which calls it so now at least all I have to do is type bash Desktop/something.sh and it runs no problem.

    What I'd like is an executable which opens up a terminal and then pastes the whole command inside. This way I could click on a launcher, see the terminal open, have the command pasted immediately and entered so the program runs.

    Thanks all!
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  2. #2
    Just Joined! werner's Avatar
    Join Date
    Apr 2008
    Posts
    27
    I don't know what terminal emulator you are using but with xterm you could do this:

    xterm -hold -e "command"

    This will tell xterm to open and execute "-e" the named command and leave the window open "-hold"

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Smile

    Quote Originally Posted by werner View Post
    xterm -hold -e "command"
    Wow....just what i wanted for my project ...I'll try this hope it works for me then it will be great

    Thanks guyz
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

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