autologin and then autostart program in runlevel 3

I’m basically trying to use openSuSE to create a dumb terminal to an iSeries 5250 emulator.

So far I’ve been able to boot to runlevel 3 and auto login as a user in tty1. What I need help doing from there is start a program (tn5250) with some parameters.

Command would be something like:

tn5250 env.DEVNAME=STATIONNAME ipaddressofiSeries

I’ve tried adding the command to boot.local, but that didn’t work.

I’m pretty new to linux so any help would be much appreciated!!!


You could use ~/.bashrc for this.

Thanks… I added the command to the end of ~/.bashrc and it executed the command. Only one problem… it gave an error

Could not start session: Network is unreachable

But I was able to press the up arrow to display the last command, execute it and it ran then.

Is there a way I can delay the command by a few secconds?


man sleep


sleep looks like it would work.

I found ‘after’ and tried using that. Couldn’t get it to work, but I noticed that my hold up was DHCP was taking to long to get an IP from the server. Gave it a static IP (which I was planning on doing anyway) and it booted right into my 5250 session.

Thanks for your quick help Akoellh!!!

Like I said, I’m new to linux, but I’m liking more and more everyday.


Well, if this command is dependant on your network being up, there are other (better) ways to do this.

A) If you are using the traditional method with ifup, you can run a post-connect script by placinbg it into /etc/sysconfig/network/if-up.d/

B) If you are using NetworkManager, you can start a so called “Dispatcher script” after connection (Google will give you a lot of examples when search for NetworkManager dispatcher script)