Slashdot Mirror


Turning Your Mac Into a Serial Console Server

chrisbw writes "Want to put that old VT100 terminal to use? Mac OS X Hits has a story on how to make a couple simple changes in OS X to enable login on a serial terminal (even over a USB serial adapter if you're on a newer mac). Cool trick for adding a text-based web surfing or email terminal in another room, or remote iTunes control!"

60 comments

  1. very usefull by a5cii · · Score: 1, Informative

    for educational establishments instead of usimng big sparcs it could come in handy

  2. USB by johanges · · Score: 0

    I don't think OSX even runs on Macs that don't have USB (or can support a USB card.)

    1. Re:USB by CptChipJew · · Score: 2, Informative

      Actually, OS X runs on my old 233 MHz G3 tower, which came out around a year before the iMac, which was Apple's first USB equipped Mac. However, this computer does have a USB card in it.

      --
      Vonal Declosion
    2. Re:USB by chrisbw · · Score: 5, Informative

      Well, my point was that if you're on a newer Mac that doesn't have a serial port, that you can use a USB serial adapter and OS X will happily use it as a regular tty.

      --
      Chris -- http://www.bitter.net/
    3. Re:USB by General+Sherman · · Score: 4, Informative

      Actually, it will run on almost anything, just it doesn't want to. What many people are doing nowadays is buying old clones and using XPostFacto (try versiontracker.com) to install OS X where it wouldn't normally go. Like on a UMAX clone with a G4 800Mhz upgrade card in it.

      --
      - Sherman
    4. Re:USB by cyb97 · · Score: 1

      And with a 233MHZ G3 a serial console is probably the fastest way to get anything done with OS X...

    5. Re:USB by Have+Blue · · Score: 1

      You don't need the USB card. It ran fine on my beige without one.

    6. Re:USB by Golias · · Score: 3, Informative
      Actually, Macs used ADB for their keyboard and mice, and IIRC a 9-pin proprietary serial connecter for printers, modems, Apple Talk, etc. These were both quickly dropped when Apple went to USB (first-gen B&W G3's has an ADB jack, but that was gone by the first iMac.)

      At no time in Macintosh history did they have an industry-standard serial port, so you will need some kind of adapter to use a regular tty with any Macintosh.

      --

      Information wants to be anthropomorphized.

    7. Re:USB by danyoung · · Score: 2, Interesting
      At no time in Macintosh history did they have an industry-standard serial port

      Actually, if we're getting pedantic (or historic in this case) the 128K, 512K, and 512KE all sported DB-9 serial ports.

    8. Re:USB by Golias · · Score: 1

      Well, if we are indeed going to be getting pedantic, the mouse occupied the only DB-9 connector on the 128, so you would still be out of luck, unless you were to load a CLI-based OS on it (which I suppose you would need, if you were going to hook up terminals to it.)

      --

      Information wants to be anthropomorphized.

    9. Re:USB by Anonymous Coward · · Score: 0

      Actually the serial connectors are not proprietary. They conform to the RS422 standard.

      Rennsport

    10. Re:USB by Golias · · Score: 1
      They conform to the RS422 standard.

      But they are shaped differently than what the PC world (and most terminals) use. Round instead of trapezoidal. That means an adapter will be needed.

      --

      Information wants to be anthropomorphized.

    11. Re:USB by Anonymous Coward · · Score: 0

      And your point is?

      Rennsport

    12. Re:USB by b1t+r0t · · Score: 1

      They were DB-9, but they were a completely different DB-9 than the PC uses. The pinout was definitely not an industry standard. And to the person who mentioned about the mouse, that was a third DB-9 port with yet another pinout. I think it was the opposite gender too.

      --

      --
      "Open source is good." - Steve Jobs
      "Open source is evil." - Microsoft
  3. Not much point by 0x0d0a · · Score: 2, Insightful

    Yeah, at one time I got really excited about rigging up some cables to hook a VT220 up to my Linux box.

    Problem is, there just isn't much point. Computers are *cheap* these days, and finding a used computer from the masses out there made in the last twenty years is easy. You can use any x86 box ever *made* as a good terminal emulator, and get color and other goodies the VT doesn't provide.

    There are lots of terminal emulation programs, though if you have 4 MB of memory on the thing or more, I'd probably run Linux, which was originally a terminal emulator and still makes a darn good one. And if you just love the amber look of the VTs, you can theme your Linux terminal box using this relatively unknown program.

    You also then get color, a nice big scrollback buffer, multiple virtual terminals per box. You don't have to hassle with weird cables -- a null modem cable is all it takes. You can put cast-off monitors of any size on the thing (and the move to LCDs is producing lots of excess CRTs...getting used 15 inchers for free is easy, and they're much nicer and larger than the VT100 screens, and don't have the annoying whine to them).

    1. Re:Not much point by DavidS · · Score: 5, Insightful

      I think you've missed the point entirely.
      This also goes in with the story being mis-named. One of the nicer things about having serial console access to your machine is you have the ability to do things like if you were directly at the console... I don't think you're going to drop your system to single user mode while using the network. Or, if you're configureing something, and you accidentally mess up network connectivity, its a very nice backup. Also, on real hardware like suns, you can send serial breaks over the line, get into firmware, and do what is necessary, whether it be synching the machine due to crash, or whatever.

      This story is also missnamed.. a serial console server is a server with a lot of serial ports on it :) (used to connect all your serial console machines togother)

      Now, I'm not entirely sure what the use of a serial console is under osx, but the impression I'm getting is that its getting a bit more useful each revision of that OS. But under any other unix, not having a serial console in a production enviroment is just asking for trouble.

      David

    2. Re:Not much point by Curtman · · Score: 2, Informative

      I'm not sure he's the one that missed the point.. A 486 has serial ports too.

      1 used 486 = $0 to $25
      1 home made null modem cable = ~$2

      For about the same price, the 486 is also capable of functioning as an X terminal with sound, etc, like he said.

    3. Re:Not much point by MasonMcD · · Score: 4, Interesting

      I'm not sure he's the one that missed the point.. A 486 has serial ports too.

      Right, but this is just another chink in the argument that "we can't let you work on a mac because we still need x86 to do "

      The more it takes on the functionality of a regular *nix (and the fewer handrolled apps your company has) the more likely you can use a mac, if that's what you prefer.

    4. Re:Not much point by cyb97 · · Score: 3, Insightful

      And a bigger electricity bill, more noise and more heat...
      VT-terminals (220s; not 100s!) are perfect for email terminals around the house, and excellent as a secondary (or more) screen for using BitchX/irssi... So instead of being limited to a dual-head setup... you can have as many heads as you want, some of them even with keyboards ;-)

    5. Re:Not much point by Curtman · · Score: 2, Interesting

      I see. I guess I did miss the point as well. I see now that the original article was intended to make use of a serial terminal that one already owns, not suggesting that anyone actually attempt to purchase one. My point, and the grandparent to my post was that a cheap PC would make a much better terminal than a Wyse or similar terminal regarless of the OS of the server. In fact the last time I tried to replace the keyboard for a wyse-60, I found I could replace the whole thing with a 486 with Linux for less money.

    6. Re:Not much point by rohanl · · Score: 5, Interesting

      There are problems using PCs as dumb terminals. I remember a while ago at work we had a couple of Windows PCs hooked up to some Sun boxes, as dumb terminals. Of course the Windows PCs needed rebooting every now and then. Each time we rebooted them the Suns stopped.

      We discovered that the PCs were sending a BREAK on the serial port, when they got rebooted. Once the came back up again, we'd find the Sun box sitting at the open firmware prompt:

      ok>

      Once we knew the problem, we could just unplug the PC before rebooting, but there were still lots of times someone forgot to do that.

      It was VERY annoying

    7. Re:Not much point by 0x0d0a · · Score: 1

      Right, but this is just another chink in the argument that "we can't let you work on a mac because we still need x86 to do "

      Oh, come *on*. This is mindless Apple fanaticism. I didn't say anything about replacing Macs with x86 boxes. My entire argument was simple -- (a) there are a lot of very cheap old x86 boxes floating around and (b) they make good terminal emulators. The old 286 or what have you is competing against the VT220 in this case, not the Mac. Surely you don't have a problem with replacing ancient DEC hardware with ancient HP hardware?

    8. Re:Not much point by Trurl's+Machine · · Score: 3, Insightful

      Right, but this is just another chink in the argument that "we can't let you work on a mac because we still need x86 to do "

      Wouldn't the same trick work nice with some older serial equipped Macs (i.e. the 68k cuties)?

    9. Re:Not much point by ChuyMatt · · Score: 1

      The simple fact with that is that those are now considered antique and actually worth money now! It would run you quite a lot to get one, well... one that functioned not as a fish bowl or something froofy like that.

    10. Re:Not much point by sysjkb · · Score: 2, Informative
      No need to unplug the PC. You can just disable the break- signal-stops-sun with kbd -a disable.

      Want it persistant after a reboot? Modify the settings in /etc/default/kbd

      Wheeling back on topic, Mac USB-serial adapters advertised as such are kind of pricey. However, you can also buy a less capable USB-serial adapter advertised for use with serial palms and so forth. Generally, they're not as good, but will still do the trick.

      Yours truly,
      Jeffrey Boulier

  4. Hehe by tsa · · Score: 4, Funny

    I just bought a second-hand iMac to replace the terminal next to my bed. I can now browse with Mozilla instead of Lynx, in bed, and have many good dreams afterwards :-)

    --

    -- Cheers!

    1. Re:Hehe by Anonymous Coward · · Score: 1, Funny
      I can now browse with Mozilla instead of Lynx, in bed, and have many good dreams afterwards :-)

      Good dreams indeed. What is it you're doing in bed that you need a graphics-capable browser, you deve?

    2. Re:Hehe by Anonymous Coward · · Score: 0

      I prefer to use my Palm in bed. I always feel much more relaxed afterwards.

    3. Re:Hehe by Anonymous Coward · · Score: 0

      And how did you manage with a serial console? ASCII art just isn't that realistic...

  5. Palm terminal emulation? by General+Sherman · · Score: 3, Interesting

    Here's a thought. I could get an old iBook hooked up to a really nice stereo system through a USB converter, and set up this terminal thing, but is there a way to control it through a PDA that supports Wi-Fi, like the Tungsten W? Any terminal emulation software on those?

    Because it would be nifty as hell to be able to control all 10GB's of my music through a nice little portable PDA acting as a sort of "remote". Anyone know of terminal emulation software for a Palm?

    --
    - Sherman
    1. Re:Palm terminal emulation? by zachlipton · · Score: 3, Informative

      You might be able to cook something up with a Palm and a USB audio converter, but you wouldn't need a serial console to do it. However, here's a better idea:

      Get the SliMP3. It connects to your stero system and has an ethernet port on the back. Grab a Linksys WET11 and it's wireless if you can't run ethernet to your stereo for some reason. It works with iTunes and you can keep all your music in one place.

    2. Re:Palm terminal emulation? by cfoster611 · · Score: 4, Informative

      There's always TopGunSSH . Its a old-school Palm SSH program, so you can get the command line on Palm. When I connect to my Mac OS X box with it (over TCP/IP mind you, though i think it can still do serial communication. Check out TopGunTelnet for pure-serial emulation.), tcsh by default has problems, most noticeably it seems to not to be able to run Pico or Vi (let alone Emacs).
      I havn't messed around with it enough; i've only used it in cases where i need to a little command line hacking from my Treo.

      --
      --- Kicking the Cheat since late 2002
    3. Re:Palm terminal emulation? by General+Sherman · · Score: 2, Interesting

      Sounds interesting, thinking about it. The thing is that I already have the OS X on the laptop with airport and an airport network set up at my house, and I was planning to get a palm.

      Just wondering if there was any way to control my mac through the palm over the 802.11b connection. If I can, I'll get the Tungsten W because 802.11b is built into it, negating the need for 3rd party connectors that often have weird requirements or restrictions.

      --
      - Sherman
    4. Re:Palm terminal emulation? by cfoster611 · · Score: 1

      You could use SSH for Palm like I had above or VNC for Palm. Ether work well, especially over 802.11b.

      --
      --- Kicking the Cheat since late 2002
  6. geez? by Anonymous Coward · · Score: 1, Interesting

    What's the point? This would've been interesting 10 years ago, but nowadays it's pointless.

    You can get to your Mac console on ethernet via the firmware shell (I don't remember exactly how but it's there), so you don't need a serial console for that.

    And as for surfing and listening to MP3s, I have Opera on my Zaurus with a wireless connection, talking to the SLiMP3 web server. From there I can control the music on ANY computer or SLiMP3 in the house (PS: the slimp3 software rocks and doesn't require the slimp3 device!). I even made a custom "theme" for the server pages that renders nice on the Z screen.

    I can even stream music to my neighbor's PC and control the music from my Z. Now THAT'S a story!

    If only the PC bios supported TCP/IP so I could safely reboot and upgrade FreeBSD PCs at work..... tell me how to do THAT (without a kvm).

    1. Re:geez? by commodoresloat · · Score: 4, Funny
      I can even stream music to my neighbor's PC and control the music from my Z. Now THAT'S a story!

      It would really be a story if you could do this without his knowledge. Hehehe... suddenly, Celine Dion plays through his speakers at top volume, and he can't turn it off....

    2. Re:geez? by saintlupus · · Score: 3, Funny

      It would really be a story if you could do this without his knowledge. Hehehe... suddenly, Celine Dion plays through his speakers at top volume, and he can't turn it off....

      I don't think I'm ever getting a shell account again on one of my friend's machines because of that.

      "Hey, look, a whole directory full of reggae MP3s. And he's got mpg123 installed. Ah, it's only 2am, I'm sure Steve's still up."

      For the record, it's not something people find amusing.

      --saint

    3. Re:geez? by Yottabyte84 · · Score: 1

      Try one of these with one of these. A $500/server solution... but it'll work. You could get a multiport serial ethernet server for a lower per-server cost.

    4. Re:geez? by andreMA · · Score: 1
      It would really be a story if you could do this without his knowledge.
      Just what we need... Weapons of Musical Destruction.
    5. Re:geez? by rlanctot · · Score: 1

      OMG, wouldn't that be considered weapons of mass destruction? George Dubya be kikin yer door down homez.

      GW: "WTF YO?!?"
      You: "Chill. WTF you want biznatch!"
      GW: "Heard you MOABed your homie next door with some WMD!"
      You: "WMD?!? WHERE?"
      GW: "Celine Dion's Christmas Album, yo. You coming to Guantanamo dude."

  7. Bluetooth by littleghoti · · Score: 1

    You should be able to get abluetooth dongle that will allow remote control functionallity. www.macosxhints is the best place to start for any technical osx knowledge.

  8. Ah, the good old days... by Chief+Typist · · Score: 2, Funny

    Finally, a reason to port Rogue to Mac OS X!

    1. Re:Ah, the good old days... by Anonymous Coward · · Score: 0
      We've already got a Carbon Rogue.

      I just did the console version. I just downloaded this, and changed Makefile like so:

      # @(#)Makefile 8.1 (Berkeley) 5/31/93

      PROG= rogue
      CFLAGS+=-DUNIX -fwritable-strings
      SRCS= curses.c hit.c init.c inventory.c level.c machdep.c main.c \
      message.c monster.c move.c object.c pack.c play.c random.c ring.c \
      room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c
      DPADD= ${LIBCURSES} ${LIBTERM} ${LIBCOMPAT}
      #LDADD= -lcurses -ltermlib -lcompat
      LDADD= -lcurses
      HIDEGAME=hidegame
      MAN6= rogue.0

      all: $(SRCS)
      gcc -o $(PROG) $(CFLAGS) $(LDADD) $(SRCS)
      Took me all of about two minutes, and I'm not even a C programmer. And people say OS X isn't Unix. Sheesh.
  9. If you really want old school... by bennomatic · · Score: 3, Insightful
    I know a company that still offers UUCP dial-up service if you want it badly enough...

    I don't mean to be a troll here, but I have to agree with other posters that, beyond saying "I can do that", there are limited uses for this outside of a server environment. And in the server environment, Apple has the XServe, which, IIRC, has a serial console port built in.

    But you gotta love that someone has done it, I guess.

    --
    The CB App. What's your 20?
    1. Re:If you really want old school... by majorflaw · · Score: 3, Interesting

      The fact that Apple tries to do anyting which actually helps others, albeit the small group of others who actually need it, speaks a lot about their business model. Yes, there are plenty of geeks out there who don't need help with this, whch is why I credit Apple for their effort.

  10. real serial console? by GrumpyOldMan · · Score: 5, Interesting

    OK, so the article tells us how to enable logins from a serial port. That's great, but that's really only 1/2 the battle.

    For various reasons (mainly driver development in a cramped office), I like to run serial CONSOLES. This means I want to see the kernel messages on the serial port, not on a VGA monitor. This allows me to log all kernel messages, even messages from a machine which crashed (hence syslog is not running). Otherwise, its easy for important messages to scroll off screen and be lost when the system crashes.

    When running linux, getting a serial console is as simple as passing some parameters to the kernel (console=ttyS0). Similar options exist for FreeBSD, Tru64, Solaris, etc. All of them will use a serial port for a console.

    With OS-X, I've been able to enable some extra verbosity on the serial port, and I'm able to get
    an openfirmware prompt on the serial port, but I can't figure out how to make the serial port the actual system console. I know it must be possible, because the X serves are supposed to be able to do it.

    Does anybody know how to do this on a "normal" g4 with a serial port (g4port)??

  11. wow by Anonymous Coward · · Score: 0

    this stuff gets a full web page these days. it used to be just man pages. not even man.cgi.

  12. Open Firmware boot to serial input by Anonymous Coward · · Score: 5, Informative
    Yes.

    This might answer your questions (look at section 6):

    http://www.netbsd.org/

    Short answer:

    setenv input-device ttya
    setenv output-device ttya

    1. Re:Open Firmware boot to serial input by GrumpyOldMan · · Score: 1

      Yeah, I already do that. It gets me the openfirmware prompt that I mentioned above. But when I boot OS-X, the OS prints its messages on the VGA screen, not on the serial port.

      What I want is for OS-X to put all its messages on the serial port.

    2. Re:Open Firmware boot to serial input by b1t+r0t · · Score: 1
      But when I boot OS-X, the OS prints its messages on the VGA screen, not on the serial port.

      I recall that XPostFacto has a menu that can select the console device. However, I'm sure that it will only work under MacOS 9. Which means it won't be useful on anything with a FireWire 800 port.

      --

      --
      "Open source is good." - Steve Jobs
      "Open source is evil." - Microsoft
  13. laptop by twitter · · Score: 1

    You would have been better served by a laptop with pcimcia wifi.

    --

    Friends don't help friends install M$ junk.