Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

blueskyredkite

macrumors member
Original poster
Nov 19, 2004
48
0
By the sea.
First a quick overview of situation. Replaced three old 486 Windows machines with Mac Minis. Main use is connecting to our ERP system, taking orders from customers live over the phone. Trouble is, the java front end to ERP system is slower using Safari than it was in IE on a 486!!! (the mind boggles - actually, it doesn't, I blame Sun for bloating the java run-time).

OK, remaining Win clients use Putty and it's lightning fast (ERP is running on RedHat server, putty logs in with SSH and only returns text to the Putty client). I know OS X has a terminal, however, I've been trying for the last two years to get an Xterm on a Linux box to play ball and I still can't so I don't expect to make a Mac terminal step in line any quicker. I do, however, know how to make Putty work.

So, I've installed X11, I've installed the software to build stuff (gcc, etc.) but Putty won't build (no GTK - or, more likely, libgtk). I installed Darwin Ports but that can't find a GTK to install.

Any ideas? Anyone built and running Putty?

Oh, in case you don't know what I'm talking about here's Putty. It does, according to the FAQ build as an application that will run under X11 on OS X.

Thanks for any help you can give.
 
Why use putty? Why not just ssh/telnet from the Terminal?

Alternatively, there's also "fink" as a replacement for Darwinports.
 
Yellow is right. No need for Putty. SSH is already on your Mac. I SSH in to the school lab machines all the time with X11 and it work fine, no extra software installed.

Remember, Mac OS X is a UNIX OS, so a lot of the things you have to install on Windows to interact with UNIX/Linux machines are unnecessary in OS X.
 
blueskyredkite said:
OK, remaining Win clients use Putty and it's lightning fast (ERP is running on RedHat server, putty logs in with SSH and only returns text to the Putty client). I know OS X has a terminal, however, I've been trying for the last two years to get an Xterm on a Linux box to play ball and I still can't so I don't expect to make a Mac terminal step in line any quicker. I do, however, know how to make Putty work.
:confused: :eek: I agree with the others. You definitely won't make anything go faster by trying to build putty on X11 under Linux or OS X. Make it work with the built in tools, or maybe something like iTerm (a reportedly faster VT100/xterm emulator than Terminal) could also help.

Putty only really exists to make up for the fact that CMD.EXE and command line ssh and telnet are poor replacements for an xterm.

What are the hangups you have seen using Linux? Are there any "special" settings you use in putty or is it just straight out ssh or telnet?

B
 
balamw said:
:confused: :eek: I agree with the others. You definitely won't make anything go faster by trying to build putty on X11 under Linux or OS X.
It'll be faster than the java ERP front end running in a browser, I know that because running that on these wee beasties is slower than it was on Win 98, *anything* will be faster than that.

The main reason I'm after Putty is that, under Windows at least, once you set up and save a connection it's a case of click the icon and off you go.


Make it work with the built in tools, or maybe something like iTerm (a reportedly faster VT100/xterm emulator than Terminal) could also help.
I'll take a look at iTerm. Another reason I like Putty is I've got all the settings figured out to make things work.


What are the hangups you have seen using Linux? Are there any "special" settings you use in putty or is it just straight out ssh or telnet?

B
There are a bunch of odd things the system suppliers have set, and non-standard Putty stuff I have to set to get this to work. You want to see the stuff?! Please, if you can help me get this to work with the default terminal I'll owe you *at least* a couple of beers.

OK, non-standard Putty settings first:
Code:
Function keys & Keyboard = SCO
Character set translation = CP437 (nothing else works)
Terminal Type String = ANSI
Now the .bashrc files (for those using putty, but I think the settings here are pretty essential whether it'll be Putty or some other terminal)
Code:
if [ "$PS1" ]; then
    if [ -x /usr/bin/tput ]; then
        if [ "x`tput kbs`" != "x" ]; then 
        # We can't do this with "dumb" terminal stty erase `tput kbs`
        elif [ -x /usr/bin/wc ]; then
            if [ "`tput kbs|wc -c `" -gt 0 ]; then 
            # We can't do this with "dumb" terminal stty erase `tput kbs`
            fi
        fi
    fi

    case $TERM in
        xterm*)
            PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:
                            ${PWD}\007"'
             ;;
             *)
              ;;
    esac

    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "

    if [ "x$SHLVL" != "x1" ]; then
    # We're not a login shell
        for i in /etc/profile.d/*.sh; do
            if [ -x $i ]; then
                . $i
            fi
        done
    fi
fi

alias yes=yess
stty susp undef
stty erase
umask 002
set -o vi
. /etc/mobius
In that last line I don't know what the starting . means (I'm guessing - having looked at the file - it means "read file and execute" (or similar)). The /etc/mobius file is full of "export" lines, mainly to do with the database. The terminal related stuff in there is

Code:
    if [ "$TERM" = "yews" ]
   then
      dtchange -w1 -h "$WINDOW_TITLE - `tty`  -  `logname`"
   fi
   if [ "$TERM" = "vt525" ]
   then
      TERM=vt220 export TERM
   fi

   if [ "$PROMPT_CHANGE" != "NO" ]
   then
      if [ "$PS1NAME" != "" ]
      then
         PS1=$PS1NAME$PROMPT
      else
         PS1=$PROMPT
      fi
      export PS1
   fi
Lastly, the script started by the user to run the database front end sets the following:
Code:
 xmodmap -e 'keycode 88 = 0xFF5A'
 xrdb -merge <<- !
        XTerm*BackarrowKeyIsErase: True
!
xterm -tn vt220 -fn 10x20 -rv +sb -e bash /usr/local/bin/livemobius
The last line in that bit is the application.

There is a whole bunch of stuff in there that I don't understand, most is probably irrelevant for the situation but I'm sure there must be something critically relevant in one of the files (the main problems I've had is: line drawing characters end up as foreign accented characters, and function keys not behaving - or not doing anything at all).

Thanks for any comments or input.
 
so do you have to start the x11 server on your computer when you run the database?
 
jhu said:
so do you have to start the x11 server on your computer when you run the database?
Yes, the current work-around is:
  • start X11 on MacMini
  • ssh -X me@some_server
  • .bashrc takes care of the rest
If I can get this as an icon to click and it does it all it may well be problem solved. (apart from the Shift+F9 --> see another post!)
 
blueskyredkite said:
Yes, the current work-around is:
  • start X11 on MacMini
  • ssh -X me@some_server
  • .bashrc takes care of the rest
If I can get this as an icon to click and it does it all it may well be problem solved. (apart from the Shift+F9 --> see another post!)

alright, that makes more sense. although i'm wondering why some of the keys are being remapped once you enter the system. you know, you can actually just put those two commands into a script. i think you can start scripts just by double-clicking them on your desktop.

also, it looks like putty can compile putty on unix-like oses but requires at least gtk. so you'll probably need to install more software before you can properly compile putty.
 
blueskyredkite said:
First a quick overview of situation. Replaced three old 486 Windows machines with Mac Minis. Main use is connecting to our ERP system, taking orders from customers live over the phone. Trouble is, the java front end to ERP system is slower using Safari than it was in IE on a 486!!! (the mind boggles - actually, it doesn't, I blame Sun for bloating the java run-time).

OK, remaining Win clients use Putty and it's lightning fast (ERP is running on RedHat server, putty logs in with SSH and only returns text to the Putty client). I know OS X has a terminal, however, I've been trying for the last two years to get an Xterm on a Linux box to play ball and I still can't so I don't expect to make a Mac terminal step in line any quicker. I do, however, know how to make Putty work.

So, I've installed X11, I've installed the software to build stuff (gcc, etc.) but Putty won't build (no GTK - or, more likely, libgtk). I installed Darwin Ports but that can't find a GTK to install.

Any ideas? Anyone built and running Putty?

Oh, in case you don't know what I'm talking about here's Putty. It does, according to the FAQ build as an application that will run under X11 on OS X.

Thanks for any help you can give.

Odd. I had no idea that PuTTY worked on anything apart from Windows until this post. I guess that I never had the need for a dedicated ssh client on Unix/OS X with the ssh command line.

Try using DarwinPorts to compile putty, it will resolve your dependancies automatically buy building and installing what you don't need.

I had a look around for a PuTTY equivalent on Mac OS X, but couldn't find one. Using the Terminal isn't for everyone, so I'm surprised that there is a hole in the market here.
 
Possibly because most users who are savvy enough to know what ssh is and what it does and use it, are comfortable with using it via the command line and don't need a GUIfied client.
 
yellow said:
Possibly because most users who are savvy enough to know what ssh is and what it does and use it, are comfortable with using it via the command line and don't need a GUIfied client.
Thats a pretty snobbish attitude, and I know plenty of people who use ssh to access text based interfaces (not always a command line) who are not comfortable with bring up a Terminal window and typing "ssh user@server" every time they want to log in.

These are all on the Windows side of course, using either PuTTY or the official SSH client. They mainly like the fact that it stores their profiles and settings for each machine.

I think such a client would be very useful on Mac OS X too.
 
dr_lha said:
These are all on the Windows side of course, using either PuTTY or the official SSH client.

That's why. There's no altternative but a GUIfied SSH client on Windows.

Snobish or not, IMO it's the truth. Most Mac OS X users won't know what ssh, nor use it. Those that do, most will know they can use it in the command line.

dr_lha said:
I think such a client would be very useful on Mac OS X too.

Sounds like you found yourself a hobby.
 
dr_lha said:
Thats a pretty snobbish attitude, and I know plenty of people who use ssh to access text based interfaces (not always a command line) who are not comfortable with bring up a Terminal window and typing "ssh user@server" every time they want to log in.
IIRC you can save Terminal sessions, including the ssh or telnet part so that when you click on it you can directly be connected to youre remote host. I know I set this up when I was working on a particula project that had me sshing to a particular host a few times a day. I'm not on the Mac so I can't provide more info.

I'll look at the new info provided and see if there's any more help I can offer the OP.

B
 
dr_lha said:
I know plenty of people who use ssh to access text based interfaces (not always a command line) who are not comfortable with bring up a Terminal window and typing "ssh user@server" every time they want to log in.


1) create and alias in the user's bash/tcsh profile.

2) create a script and append .command to it to make it Clickable/Openable in the Finder.

3) What balamw said.
 
yellow said:
That's why. There's no altternative but a GUIfied SSH client on Windows.
Not strickly true. On windows I use openssh from a Cygwin window.
Sounds like you found yourself a hobby.
You may have a point there.
 
Let's focus on the OPs problem.

OK, non-standard Putty settings first:

Code:
Function keys & Keyboard = SCO
Character set translation = CP437 (nothing else works)
Terminal Type String = ANSI

I think this is the key to the problem. The Putty settings set an ANSI terminal using codepage 437, this does not seem to be supported by Terminal or even xterm, and would lead to the lineart -> accented characters.

What is really strange is the final
xterm -tn vt220 -fn 10x20 -rv +sb -e bash /usr/local/bin/livemobius
Seems to call out a new xterm with VT220 emulation, which is obviously supported by xterm, and probably Terminal. So why should the CP437 matter in Putty matter if the xterm is ultimately claiming to be a VT220. :confused:

Overall the main question is: when running on the PC are you running the app in the Putty window or in an xterm?!?

EDIT: You might be able to solve the missing codepage/funny accents problem by using a TTF font that supports it for the Terminal window. One such font from Microsoft is available here: http://www.filelibrary.com/Contents/Multi-Platform/100/24.html. There are others commercially available and free.

B
 
balamw said:
Let's focus on the OPs problem.
Oooh! TY! :)

Overall the main question is: when running on the PC are you running the app in the Putty window or in an xterm?!?
Ah! You've got me, I've probably confused everyone by getting confused myself.

Those connecting with Putty use the stated code-page setting, they by-pass the xterm line you mentioned. (oops)

The one Linux box we've got here logs in, gets it's environment set as per the .bashrc file and the file that calls the xterm -tn vt220... etc.

Sorry for the confusion.

It does appear that the putty settings do pretty much the same thing as the .bashrc and script that calls the xterm.

EDIT: You might be able to solve the missing codepage/funny accents problem by using a TTF font that supports it for the Terminal window. One such font from Microsoft is available here: http://www.filelibrary.com/Contents/Multi-Platform/100/24.html. There are others commercially available and free.
I'll look into this, thanks.
 
blueskyredkite said:
Ah! You've got me, I've probably confused everyone by getting confused myself.

...

Sorry for the confusion.

It does appear that the putty settings do pretty much the same thing as the .bashrc and script that calls the xterm.
I'll admit to being confused. ;)

Does the linux box running the xterm "work" or does it still have the funny accented characters? If xterm running vt220 emulation works, you should be home free on the Macs, just do exactly the same as that, including setting all the environment variables.

If it doesn't you'll need either the font workaround I suggested or putty (or some other SCO ANSI terminal emulator) on your Mac.

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.