Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Terminal

Terminal
Thread Tools
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jan 20, 2001, 09:22 PM
 
What are the steps one would have to do in order to make an application similar to the Terminal?

Is the Terminal just a telnet client?

Why doesn't someone make a neater Terminal?
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Jan 20, 2001, 11:40 PM
 
Originally posted by parallax:

Why doesn't someone make a neater Terminal?
Neater? What's not to like? Get yerself gnu LS with colored output, and crank up the transparency and it's the best damned term I have ever used--and I've been around! It's better than Xterm, gnome-terminal, eterm, and the likes by far!
Again, I ask--what's not to like?
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Fresh-Faced Recruit
Join Date: Dec 2000
Location: Indy,IN,US
Status: Offline
Reply With Quote
Jan 20, 2001, 11:58 PM
 
I think the terminal could be improved. I sometimes
have problems with refreshes, and it doesn't have
an option to scroll on output. I also can't get it to display
ANSI color. There could be an option to have a transparent
background, but not transparent text, and seperate tinting
and shading for the background would be slick.
Also it could be applescriptable, so you could control
command line apps in the terminal with applescript.
Scroll buffer logging to a file would be slick, but doesn't
it already do that? I'd also like to be able to call it with
a -e option like xterm, so I could do terminal.app -e cal
and stuff like that. I don't ask much, huh?
     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Jan 21, 2001, 07:37 AM
 
You can't get the terminal to display ANSI color because Apple overrides it's colors with those specified in the Terminal preferences. If someone writes a new terminal they should give us a choice of whether we want the colors specified by the terminal overridden or not. Think of all of the cool color ASCII art that you are missing out on with a fixed color terminal! BTW, I think that it'd be kind of difficult to make the terminal window transparent but the text in it opaque. You can set the transparency for any NSWindow with a flag (That I don't remember) but that effects the entire window and it's contents. If you wanted to make everything but the text transparent, I think that you'd really have to subclass NSWindow and work some voodoo on overriding some of it's methods.
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jan 21, 2001, 09:44 AM
 
So what commands would be involved in making a Terminal just to make it functional?
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Jan 22, 2001, 06:53 AM
 
Just to make a functional terminal, I think that all you'd need to do would be to make a window with something like an NSTextView in it and use NSTask to start the shell and make some sort of means to redirect the input and output to and from the shell though the NSTextView. You might have to subclass NSTextView in order to have it deal with input, though.
     
Professional Poster
Join Date: Dec 2000
Location: Staffs, UK
Status: Offline
Reply With Quote
Jan 23, 2001, 05:27 AM
 
Some of the coolest things about Apple's Terminal are these:

* transparency
* cut, copy & paste all work as you expect. Try this on a windows' macine where copy=ctrl-c, and you'll end up ctrl-c'ing your running processes !
* drag any file/folder from the finder into terminal to paste in the path. This is great if you can see a file in the finder, and want to '.' it or 'more' it or something

any more ?
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Jan 23, 2001, 11:01 AM
 
heh, yeah, but there's also a few bugs that involve locking up the Terminal (on my build at least).

Transparent skins, like a SoundJam / Terminal would be *awsome* :-)
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Leuven, , Belgium
Status: Offline
Reply With Quote
Jan 23, 2001, 11:48 AM
 
Terminal.app "remembers" if a line has been broken by wrapping or by a \n. This means that when you cat a file with lines longer than 80 characters and make the window wider, the lines rewrap. This functionality is absent in xterm/eterm/aterm/...


Originally posted by Gee4orce:
Some of the coolest things about Apple's Terminal are these:

* transparency
* cut, copy & paste all work as you expect. Try this on a windows' macine where copy=ctrl-c, and you'll end up ctrl-c'ing your running processes !
* drag any file/folder from the finder into terminal to paste in the path. This is great if you can see a file in the finder, and want to '.' it or 'more' it or something

any more ?


------------------
--CyberELF
--CyberELF
     
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Leuven, , Belgium
Status: Offline
Reply With Quote
Jan 23, 2001, 12:01 PM
 
NSTask won't work here, as you need to create a pseudo-tty in which the command line apps need to be executed. For this, you'll need the BSD calls forkpty and execl. See the man pages for more information.

If you use NSTask, which is basically pipe, fork and dup2, console oriented apps like ls (for columns), vi, less,... won't work propertly.

Originally posted by Dalgo:
Just to make a functional terminal, I think that all you'd need to do would be to make a window with something like an NSTextView in it and use NSTask to start the shell and make some sort of means to redirect the input and output to and from the shell though the NSTextView. You might have to subclass NSTextView in order to have it deal with input, though.
--CyberELF
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:08 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2