The raspberry pi is still not going to change the world

raspberry pi

…but it is pretty cool. I ordered a raspberry pi for work, in an effort to replace the thin clients that we use to connect to our IBM midrange system. (kickin’ it old school) It works pretty well for the task, and seems like it is ideal for random niche uses, but I still stick by my original statement. Read on if you are interested in ancient computer systems, and how Brits with big ideas can connect the old with the new.

IBM launched their original midrange system, the AS/400, in 1988. Even then, they were supporting legacy systems. The idea behind the AS/400 was that it was a smaller, scalable system, that would run software (usually COBOL and RPG) that was intended for the old System/36 minicomputers, without having to recompile for the new processor. To this day, you can still run binaries compiled for a System/36 on a POWER7 box.

As a result, many companies around the world continue to use IBM midrange systems rather than convert to linux or *shudder* Windows data and application servers for mission critical business processes. My company is in that boat, which means each and every computer in our company needs a working IBM 5250 terminal emulator, “green screen” program, to connect to the iSeries.

Enter the raspberry pi. A tiny, ultra-cheap, linux computer. For some of our specialized situations, and in case a massive computer plague takes out all of our Windows PCs, we use thin client computers, “dumb tubes”, that just connect to the iSeries. Nothing else. The computing requirements for such a task are laughably modest, amounting to basically a keyboard, monitor, and network connection. The raspberry pi is more than capable, as long as you can find some terminal emulation software to run on it.

5250 emulation on the raspberry pi

TN5250 fit the bill, and after a minimum amount of fuss , I have a working raspberry pi thin client! For other iSeries shops looking to run a 5250 emulator on a raspberry pi, I will add a  how-to (or maybe learn how to make a .deb package) if there is any interest.

17 thoughts on “The raspberry pi is still not going to change the world

    • My Pi died (I should start rapping…), and I am going through the RMA process, so right now I can just give you a rough outline from memory. Basically you just need to…
      download ncurses
      extract it, cd to the ncurses directory
      sudo make install
      download tn5250 , this is V 0.16.5, the latest stable release
      ./configure –help (to figure out what switches you need, like ssl)
      ./configure (with the options you want)
      sudo make install
      sudo apt-get install xterm
      now, you can see if it is working by entering xt5250 [i.series.ip.address]
      Here is a PDF out there that explains how to fully configure tn5250. I recommend using an xterm with true type fonts for best look and feel.

      Good Luck!

    • Unfortunately, the display just stays in the top left corner when you resize the window. I assume you’re running into the tiny-font-in-an-xterm issue. If you set xterm to use true type fonts, the display will look much better. Enter the command:
      sudo nano /usr/local/share/tn5250/XTerm
      add this line at the bottom of that file:
      xt5250.VT100*faceName: truetype
      hit ctrl+X, then Y, then Enter
      Fire up xt5250 and see how it looks. I haven’t had any luck getting other fonts or other font sizes to work, but you can try specifying a font, or a font size with an xt5250.VT100*faceSize entry

        • I’ll be honest and say that I’m really not that experienced with i5/OS, and we don’t run any software with checkboxes or radio buttons, so I don’t really have a way to play with that.

          Some googling around suggests that hitting F4 will let you pick a radio button, or maybe just typing in the number for your selection will work. I’m not sure about the check boxes, maybe try prompting them?

  1. I’ve tried pressing F4 to prompt and using numbers. Using numbers works fine on the single select fields but on the multiselect field I get “Selection character not valid” Any ideas? BTW your help has been great! Thanks!

  2. Got everything working ok except for one thing, keyboard mappings. I would like them to be set as IBM Default keyboard mappings. Any ideas?


    • I wish you had asked two days ago, as I just started a new job is very much not an iSeries shop! I was able to set the keyboard config to use enter and right control as the enter key. Almost none of our users used enter as a field exit, so it was a happy compromise that worked for almost everybody.

      Search for a PDF called “tn5250 howto”. There is a whole section in there on keyboard setup. I think you need to edit the entries in /usr/local/share/tn5250/XTerm

  3. I know this is an older post but I’m trying to get a Raspberry Pi up as a 5250 emulator but using xt5250 instead of tn5250. I want to try and have the Pi boot straight into the terminal screen without having to use a window manager. I currently have a Pi downstairs acting as a web kiosk and I used Matchbox which loads a web page in Midori but I was wondering if I could do something similar with the Pi and the 5250 emulation for my iSeries but without using something like Matchbox?

    Thank you

    • I did this, but it’s been a while.

      My solution was to configure the pi to auto login to X on startup, and use a login script that opens xt5250. The login script would then use xdotool (xdotool is a bit like AutoHotKey for Xwindows, if you are unfamiliar) that sends the full screen keyboard command to the xt5250 windows.

      Start by trying and/or googling the following:
      -rasbian/Debian/X11/lxde/openbox login script. Not a startup script, so /etc/rc.local and similar will not work. I don’t recall which one worked for me, but you need to send the command to start xt5250 as a user (not root) after X11 starts. Try ~/.profile.
      -openbox full screen command. I think the default is F11, so you will need to edit the openbox config file and set it to ALT+F11 or something that won’t interfere with iSeries commands.
      -xdotool. apt-get install xdotool. You may have to add a delay to the script so xt5250 can fully load before sending the xdotool command.

      Good luck!

  4. I am trying to get tn5250 to run on PI.
    As I am not very experieneced with linux it hard and does not work until now.
    Is it possible that you send me your zipped PI installation file?


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>