Terminal.app Console String Emulation

Discussion in 'Mac Apps and Mac App Store' started by Punani, Oct 15, 2004.

  1. Punani macrumors regular

    Punani

    Joined:
    Jun 16, 2004
    Location:
    Los Angeles
    #1
    I often telnet into my university's Solaris system to save some files to edit, or mess with my homepage a bit. One thing that has always confused me is the fact that the system doesn't understand Terminal.app's string declaring what is (e.g. "xterm-color") and subsequently, vi and a few other programs go nuts and do a segmentation fault.

    Is this a problem with Apple's emulation, or the host system?
     
  2. broken_keyboard macrumors 65816

    broken_keyboard

    Joined:
    Apr 19, 2004
    Location:
    Secret Moon base
    #2
    I'm not sure, I would guess that individual programs have to each be programmed to support various terminal types and some of the progs on your unix server have never heard of an xterm-color terminal. (old?)

    You could try changing the value before you use them, e.g.
    export TERM=vt100
     
  3. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #3
    I suspect it's neither - the applications you're using don't understand the variable values Terminal.app uses and segfault. Therefore, your best bet is to get a new version and/or recompile. Why are you using vi anyway? If you invoke vi on a default Mac OS X 10.3.X install, vim (vi improved) loads instead, and it works just fine.
     
  4. Mord macrumors G4

    Mord

    Joined:
    Aug 24, 2003
    Location:
    UK
    #4
    i suspect this thread should be in the software section
     
  5. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #5
    If you continue to have problems, you could always put the commands to change these variables in ~/.profile - the commands there are executed every time a new shell starts. Make sure to use the command appropriate to your shell. export var=value only works in BASH.
     
  6. Punani thread starter macrumors regular

    Punani

    Joined:
    Jun 16, 2004
    Location:
    Los Angeles
    #6
    Sorry about posting this thread in the hardware help (I was half-asleep), could someone be so kind and move it to software help?

    Also, I telnet into a system, so I am not using the vi/vim loaded with Mac OS X, but whatever that version of Solaris came with.

    Coincidentally, this is not an issue if I use xterm (i.e. X11R6)
     
  7. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #7
    Hmm...that's strange. Is it normal for a remote system used via telnet to be affected by variables on the system you're telnetting from? That doesn't sound normal to me - but I don't know that much about telnet.
     
  8. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #8
    I've had trouble when telneting to a system that didn't know the particular terminal type I had set on the originating system. If programs are using the curses library, they may exit, blow up, or do the wrong things when your terminal type is incorrect or unknown to them. vi is supposed to be polite about it and use the non-full-screen "open mode" method of editing when it doesn't know your terminal type. In any case, setting TERM to a value that matches your terminal emulator, or to a barebones minimum like "vt220" or "ansi" can sometimes get you out of the jam.
     

Share This Page