Help with Automatically Loading App at StartupForum: Other Help Topics Topic: Help with Automatically Loading App at Startup started by: BuGaLoU Posted by BuGaLoU on Dec. 11 2004,23:06
First and for most I am totally new to linux, and am more of a Windows man myself. However, I am in a situation where DSL seems perfect for the application.Basically my company got a bunch of old IBM Netvista Thin clients that can be booted from a compact flash card. I got them to boot DSL on the flash fine without a problem. What I need these to do is boot the kernel, and run a program called tn5250. Basically this program works as a console for an AS/400 mainframe. I don't need any other of the functions of DSL. Removing them from the image isnt so much of an issue as to just not getting them to load. We are using 128 MB flash cards so capacity is not an issue. I can install tn5250 and run it fine using apt-get, but I am not sure how to include this in the DSL image so it is there at boot time, and does not need to be reinstalled. Cliff Notes: *Need DSL to boot straight into a program called tn5250 *Kernel and Networking support are only needed for this program. *Should be run from the console, without loading a GUI. Any help what so ever would be much appreciated. Posted by Max on Dec. 12 2004,02:25
You'll want to do the following on a machine that was NOT booted from the CF card, but have it in the machine when you boot so you can write to it. Just boot off the 0.9.0.1 CD.1. First download the .deb file for your tn5250 app (and any dependency deb's) 2. Make a .dsl file from these using deb2dsl script (let's say we call it tn5250.dsl and that the app executable is called tn5250) 3. Add the line /home/dsl/tn5250.dsl file to your /home/dsl/filetool.lst file (this is so it can be backed up and then automatically restored at every boot) 4. Now edit your /opt/bootlocal.sh file and add two lines: 1) mydsl-load tn5250.dsl, and 2) /home/dsl/tn5250 (assuming that's what it's called). 5. Now do a DSL Backup. From the fluxbox menu pick -> System -> Backup/Restore. For the location, put in the specification for you 128MB CF card. On my system that would be "hde1" (Note you don't put /dev/hde1) Under DSL 0.9.0.1 this will write create a file called "backup.tar.gz" In this file will be all of the files or directories that were listed in your filetool.lst file. 6. Now shut down the system and remove the CF card, put it into your Netvista and boot. 7. At the boot prompt type "dsl 2". This will drop you to the command prompt instead of loading the X window server. 8. After you have booted, the system will find the backup.tar.gz file you your CF card and restore the .dsl and you modified bootlocal.sh file. 9. The last thing the system does on boot is run your bootlocal.sh file. In your case this will install your tn5250 app via the mydsl-load and then it will run the app on the next line. (Also, there is a way to get DSL to always boot to "dsl 2" at boot time. I can't remember exactly what it is you have to do though. It here in the forums, just search around....or one of our more illustrious members will post it to this thread. If I remember right it is a pretty easy modification.) Viola, you now have a CF card you can make copies of, and they will all boot, load and run your tn5250 app. (If anyone sees anything I miss directed above...please point it out) Posted by caulktel on Dec. 12 2004,02:31
BuGaLoU,Just out of curiosty, which IBM Thin Client are you using? I have been trying to get DSL to boot to a Netvista 2200L with no success using compact flash. Posted by BuGaLoU on Dec. 12 2004,02:54
I am using the 8354 Ethernet model. I'm pretty sure you can boot on your model too though. You must disable RPL network boot in the BIOS and the Workspace environment must be set to "Workspace on Demand" Posted by BuGaLoU on Dec. 12 2004,02:56
Max, Thank you for the how to . I will try this first thing in the morning when I get to work and I will post my results. Posted by Max on Dec. 12 2004,03:02
Note that if the tn5250 app creates some kind of config file (so you don't always have to type in the system name or IP address) then you can back that up too. Just list the config file in the filetool.lst file also and THEN do the system backup.Let me know how it works. If all is well, you can submit the 5250 app to be added to the repsoitory. I've got 3 or 4 AS400 systems that I access and it would be a handy app to have. Posted by BuGaLoU on Dec. 12 2004,14:17
Ok, I fell into a silly little snag. I am unable to locate the deb2dsl script. I searched the forum and also googled it but I haven't come up with anything. Can anyone point me int he right direction?
Posted by clivesay on Dec. 12 2004,14:23
Sure. It's right < HERE >Chris Posted by BuGaLoU on Dec. 12 2004,14:32
Thank you! I am off to try this now, wish me luck! Posted by BuGaLoU on Dec. 12 2004,19:02
ok, I seem to have it working. One small problem though. Since the tn5250 emulator can only run in 27x132 it is really tiny on the console of DSL. How do I make the console larger by default so it is full screen? Note I am not running in fluxbox, just from the console.
Posted by BuGaLoU on Dec. 12 2004,20:03
Ok, I got that issue resolved!Now I can't seem to get it to automatically load into console mode (dsl 2) with no prompt at startup. Can anyone help? I'm not turning much up searching the forums. Posted by BuGaLoU on Dec. 12 2004,20:59
X that, I figured it out on my own.
Posted by BuGaLoU on Dec. 12 2004,22:53
Ok, now that I have this working, I have another question.I suppose this isn't specific to DSL, but none the less I need to know how to do it. Basically I need the tn5250 to run on the console (AS400 display session), and I need another program called lp5250d (AS400 printer session) to run either in the background, or on a second hidden console. Both of these should be automatically run at start up. I already have the display session working. Posted by clivesay on Dec. 12 2004,23:03
I'll love to know the details of this project when you get everything running. Our company's main system is the AS400.Chris Posted by clacker on Dec. 12 2004,23:46
BuGaLoU, you can run programs in the background by following the command with an ampersand (&) on the same line. Like lp5250d & the ps show all of your running programs. You can use fg job afterwords to bring that job back to the foreground if you need to. Hope this helps. Posted by caulktel on Dec. 13 2004,00:18
BuGaLoU,It sounds like you are getting things worked out. When you get done with your project, do you think you could help me figure out how to get my Netvista thin client to boot from compact flash (with DSL of course)? I am going to try the suggestions you gave me tommorow, and I will report back. I think the one you are using is the A22, while mine is the 2200l 8363, not sure how simlar they are. Posted by BuGaLoU on Dec. 13 2004,00:42
Thanks for the info, that will be usefull indeed. Anyone know how to change the text mode resolution from for the console? I need say 132x30. I can adjust the pixel resolution, but this forces 80x24 text mode in 640x480, and I can't get the tn5250 to do 132x28 in any res. Note this is from the console, I am not loading fluxbox or other GUI. I am using the "env.TERM=IBM-3477-FC" argument, (which basically means run in 132x27) but it seems to be flat out ignoring it. Posted by BuGaLoU on Dec. 13 2004,00:47
Yeah I can help you. I hope to have this wrapped up in the next few days if I can figure out this damn text mode resolution mess! Posted by caulktel on Dec. 16 2004,20:13
BuGaLoU ,How did you install to CF? Did you have to modify or add any files to get it to boot. Mine seems to be looking for a specific boot file on the CF, however it does let you specify where to find that file on the CF. I'm just not sure what file it's looking for, or if it's even in DSL. I have shut everything to do with net booting off. It seems to be finally looking at the CF, but not finding the right file. Any ideas? Posted by caulktel on Dec. 16 2004,21:09
More info on my Netvista thin client. This is what messages I get when booting:atttemping to use flash card file-/kernel.2200 unable to open file unable to load file via boot file server protocol I am so in the dark here not knowing anything about net booting machines. |