Unix/Linux Go Back    


OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

A new OSX 10.12.x terminal from the command line.

OS X (Apple)


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 1 Week Ago
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 27 May 2017, 6:00 AM EDT
Location: Loughborough
Posts: 1,202
Thanks: 362
Thanked 320 Times in 250 Posts
A new OSX 10.12.x terminal from the command line.

Hi guys and gals...

After much searching on the good ol' internet I could find nothing, so this is the result.
ALthough many people seem to have asked this question no-one seems to have a solution so here we go.

I need for AudioScope.sh, 'xterm' to run a second program for some of its calibration using the same machine.
'xterm' no longer exists on OSX 10.12.x Sierra, it can be installed but it is unavailable on a virgin OSX Sierra install.

Hence the code below.

Place it into your '$HOME' drawer and call as per the code comments.
Remember to change the access rights before you go.

This incarnation is called 'NewCLI', anyone remember that? ;oD
But you could just as easily name it 'xterm' if you wish. I have both in my '$HOME' drawer.

Enjoy...

Code:
#!/bin/bash
# Usage: ./NewCLI ["/full/path/to/program"]
#
# A little bit of the ancient AMIGA in here... ;o)
#
# Save this script into your "$HOME" drawer.
#
# As 'xterm' is no longer available with a default OSX 10.12.x Sierra
# install then this is a workaround to have more than one terminal called
# purely from the command line.
#
# The new terminal will be directly underneath the current terminal.
# Just move the current terminal out of the way and, voila, a second
# terminal with its own environment variables will show.
# '$1' is an optional "/full/path/to/program" argument to be run inside
# double quotation marks as shown.

/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal "$1" &


Last edited by wisecracker; 1 Week Ago at 10:15 AM..
Sponsored Links
    #2  
Old Unix and Linux 1 Week Ago
xbin xbin is offline
Registered User
 
Join Date: Feb 2007
Last Activity: 21 May 2017, 1:50 PM EDT
Posts: 132
Thanks: 11
Thanked 30 Times in 30 Posts
This will place the window of the new instance of the Terminal.app in front.

Code:
open -F -n -b com.apple.Terminal

The Following User Says Thank You to xbin For This Useful Post:
wisecracker (1 Week Ago)
Sponsored Links
    #3  
Old Unix and Linux 1 Week Ago
wisecracker's Unix or Linux Image
wisecracker wisecracker is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 27 May 2017, 6:00 AM EDT
Location: Loughborough
Posts: 1,202
Thanks: 362
Thanked 320 Times in 250 Posts
Hi xbin...

I looked all over and not a reference like that could I find. Perhaps it is my searching method that needs polishing... ;o)
However thank you for enhancing my knowledge further.

Both methods are equally useful for my needs...

EDIT:
The '-g' switch was needed for my application to place it into the background and keep focus on the original terminal...

Thanks.

Last edited by wisecracker; 1 Week Ago at 11:49 AM.. Reason: Added -g switch...
The Following User Says Thank You to wisecracker For This Useful Post:
Corona688 (1 Week Ago)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
HMC login - Command line and terminal session snchaudhari2 AIX 3 07-25-2013 05:30 PM
unix command for terminal - view sequences as a single line? kentm UNIX for Advanced & Expert Users 6 06-28-2011 08:05 PM
How to start a new terminal from command line? andrewust OS X (Apple) 1 12-02-2010 10:43 AM
How do you reverse terminal command line to the top? ray_m UNIX Desktop Questions & Answers 1 09-30-2010 10:46 AM
Is command line invocation of gnome-terminal to run more than one command possible? Narnie Shell Programming and Scripting 0 02-16-2010 10:57 PM



All times are GMT -4. The time now is 12:41 PM.