ForeCast

Q: terminal command to re-access terminal prompt

Simple question:

 

I am running Apache caldav on Maverick to manage my small office calendars.

When I run the server, console stays with the the caldav server process (user name and $ no longer comes up).

What's the key command to get out of the server  re-access the terminal prompt?

 

I've seen it before but can't remember.

iMac, Mac OS X (10.6.4)

Posted on Aug 27, 2016 11:10 AM

Close

Q: terminal command to re-access terminal prompt

  • All replies
  • Helpful answers

  • by leroydouglas,

    leroydouglas leroydouglas Aug 27, 2016 11:26 AM in response to ForeCast
    Level 7 (22,866 points)
    Notebooks
    Aug 27, 2016 11:26 AM in response to ForeCast

    Terminal>Preferences>General>New window opens Default profile


    and/or


    Shell Opens with> Default login shell

  • by ForeCast,

    ForeCast ForeCast Aug 27, 2016 12:57 PM in response to leroydouglas
    Level 1 (4 points)
    Mac OS X
    Aug 27, 2016 12:57 PM in response to leroydouglas

    Thanks, but not quit what I need.

     

    I'm looking for keystroke commands to switch back to the main curser.

    For example, if I enter CTR + c, the command ends/terminates the server and brings me back to the curser.

    What I want is a a keystroke entry that leaves the server running, but brings me back to the main curser window.

     

    Would you know this?

  • by leroydouglas,

    leroydouglas leroydouglas Aug 27, 2016 1:06 PM in response to ForeCast
    Level 7 (22,866 points)
    Notebooks
    Aug 27, 2016 1:06 PM in response to ForeCast
  • by VikingOSX,

    VikingOSX VikingOSX Aug 27, 2016 5:25 PM in response to ForeCast
    Level 7 (20,591 points)
    Mac OS X
    Aug 27, 2016 5:25 PM in response to ForeCast

    And there is Bash job control.

  • by Camelot,Helpful

    Camelot Camelot Aug 30, 2016 8:26 AM in response to ForeCast
    Level 8 (47,233 points)
    Mac OS X
    Aug 30, 2016 8:26 AM in response to ForeCast

    You need to background the task. Your problem is that it's still being controlled by the current shell and that's why you don't regain control.

     

    There are several ways of doing this - my initial reaction is that you shouldn't be manually launching a service this way anyway - use launchd to manage your services. In the short term, though, you can background the task by simply appending & to the end of the command:

     

    /path/to/someprocess &

     

    This will launch the someprocess task in the background, giving you back control of your shell.


    Seriously look into having the OS manage this for you, though.

  • by Mark Jalbert,Helpful

    Mark Jalbert Mark Jalbert Aug 30, 2016 8:26 AM in response to ForeCast
    Level 5 (4,649 points)
    Aug 30, 2016 8:26 AM in response to ForeCast

    Suspend the process with - Control Z. Check if any thing else is running in the background with - jobs and  then send the process to the background by its background number - bg %number. You  can kill the background process with - kill %number.

  • by ForeCast,

    ForeCast ForeCast Aug 30, 2016 8:34 AM in response to ForeCast
    Level 1 (4 points)
    Mac OS X
    Aug 30, 2016 8:34 AM in response to ForeCast

    Thanks all.  Very helpful.

     

    I'm obviously new/low experienced with working directly from terminal.

     

    This has given me an idea, and therefore a new question.  I see different titles/headers on the top of the different windows.  First when I open terminal I see, "bin - bash - 80x24".  When I run caldav, the way I run it, the window title has, "bin - python - 86x28." 

     

    Does this mean I can open a terminal window for each job/program that's running, and that the windows will show all the steps, actions, etc., for that job?