Topic
3 replies Latest Post - ‏2008-06-16T19:18:17Z by furicle
SystemAdmin
SystemAdmin
262 Posts
ACCEPTED ANSWER

Pinned topic Converting an old pc to an iSeries terminal with Linux

‏2008-05-29T14:59:50Z |
Hi all.
My final goal is to transform some old pc's into free-iSeries-stupid terminals.
Using Linux, I want the pc boot into the iSeries login screen automatically, and let the user turn off the system just by pressing the power button.

Since I'm definetely not a Linux expert, I'm trying many things but don't know if they're ok or crap, so I need your advices.

So far I've done this steps:
  • install Ubuntu server without servers :)
  • install xorg and some required packages (sudo apt-get install xorg alien libmotif3 libstdc++5)
(alien is required only during the installation of iSeries Access)
  • get iSeries Access for linux and install it (sudo alien -ci iSeriesAccess-... .rpm)
And now I have some difficulties.
  • how do I execute automatically xorg?
The method I use now is:
create a script with:
#!/bin/bash
startx
give the script chmod 700
sudo update-rc.d xserver.sh defaults

now, I know that I can manually start a 5250 session by doing:
ibm5250 x.x.x.x -geometry 9999x9999+0+0 -title THETITLE -DISPLAY_NAME "SESSIONNAME" -LANGID en_US
but:
  • how to execute this command when x starts?
  • how to make the session be displayed full screen? In 1024x768 I have some free space (say 200 px) to the bottom of the screen
(or) how to prevent the user to click outside the session so it loses focus?
  • how to kill all processes and turn off computer when the user presses the power button?

Please contribute to this "project", so that all those poor old pc's can be un-buried and revive again!
Thanks in advance...

Jax
Updated on 2008-06-16T19:18:17Z at 2008-06-16T19:18:17Z by furicle
  • furicle
    furicle
    12 Posts
    ACCEPTED ANSWER

    Re: Converting an old pc to an iSeries terminal with Linux

    ‏2008-05-30T15:58:20Z  in response to SystemAdmin
    Just how old are these PCs? Even 128meg of ram PIII machines will run a real Gnome desktop - then they get all the other software along with it.... A light distro like TinyME or DSL will do wonders on machines older than that - especially if it's "almost always running Client Access, but something else every once in a while...."
    If these are really decrepit, or you have reasons to make sure they can only run Client Access and nothing else,
    from the console (without X running) try

    <code>xinit ibm5250 x.x.x.x -geometry 9999x9999+0+0 -title THETITLE -DISPLAY_NAME "SESSIONNAME" -LANGID en_US</code>

    I don't have a machine on tap at the second to try it, but I think that does what you want.

    Assuming it does, set up a user called something like 'start' or 'YourAS400name',
    and put in that user's .bashrc

    <code>exec xinit ibm5250 x.x.x.x -geometry 9999x9999+0+0 -title THETITLE -DISPLAY_NAME "SESSIONNAME" -LANGID en_US ; logout</code>

    It wouldn't hurt to chmod 644 that file and make it owned by root.

    Then all they have to do is log in and they get Client Access, and quit the program to log all the way back out.

    The power button might be a little more work - I'm not sure how ACPI works when you don't have gnome.
    It might 'just work' or it might not - especially with old machines ACPI is a crap shoot anyway.
    For kicks, you could try removing the '-r' from the shutdown command in /etc/event.d/control-alt-delete
    I think that would let them control-alt-delete the machine off, and only use the power button to turn it on.
    YMMV

    It's an interesting project. Please keep us posted of what you do and how it turns out. I think it'd make a great write up in the Ubuntu forums if nowhere else.....

    Brian
    • furicle
      furicle
      12 Posts
      ACCEPTED ANSWER

      Re: Converting an old pc to an iSeries terminal with Linux

      ‏2008-05-30T16:02:37Z  in response to furicle
      Ooops - forgot to mention the other possibility I thought of.

      You could
      install mingetty, then edit the tty1 entry to use mingetty and start that user automatically (getty doesn't allow direct logins like that). Remove the other ttys and it's a modern dumb terminal - nothing running but client access...

      Brian