Installing and using Citrix Multiuser v1.0 on BOCHS

Back in the late 80’s when OS/2 was starting to get some traction Ed Iacobucci took a team and split off from the mainline Microsoft / IBM alliance, and with Microsoft’s blessing (and source code) took OS/2 and took up the challenge that both IBM & Microsoft dropped that was the ultimate challenge to UNIX, the ability to host multiple users on the same machine.  Citrix had it’s start some time in 1989 (Don’t forget that NT OS/2 had it’s start in 1988), and back then LANs were still seen as super expensive, just as TCP/IP was a university / military protocol that even enterprise to small businesses were hooked on either NetBEUI or IPX/SPX, if they had any LAN at all.

Sneakernet was king in this era, just as the BBS was our connected world.

As this ancient promotional video shows, the product they were chasing was low end Unix market, oddly enough their larger competition being SCO Xenix, which itself was separated out from Microsoft.

While I’m waiting for a 5 1/4″ disk, I thought I’d take a crack at installing Citrix Multiuser version 1.0 that had surfaced a while back.

I’m using this as a template for a config.  Naturally to boot floppy image it’ll need a change.

megs: 16
romimage: file=bios/BIOS-bochs-latest
vgaromimage: file=bios/VGABIOS-elpin-2.40
floppya: type=1_2
floppyb: type=1_44
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path=”citrix500.img”, cylinders=1023, heads=16, spt=63
ata1: enabled=0
ata2: enabled=0
ata3: enabled=0
boot: c
log: bochsout.txt
mouse: enabled=0
debug: action=ignore
mouse: enabled=0
private_colormap: enabled=0
floppy_bootsig_check: disabled=0
com1: enabled=1, mode=socket-server, dev=localhost:8880
com2: enabled=0, mode=socket-server, dev=localhost:8881
com3: enabled=0, mode=socket-server, dev=localhost:8882
com4: enabled=0, mode=socket-server, dev=localhost:8883
parport1: enabled=1 , file=”print.txt”
parport2: enabled=0
ne2k: ioaddr=0x320,irq=10, mac=fe:fd:00:00:00:01, ethmod=null
sb16: enabled=0
usb_uhci: enabled=0
port_e9_hack: enabled=0
clock: sync=none,time0=691148400

But that’ll do it.

Citrix has many 386 hooks in place.  After applying the CSD MU01091 I saw this in the readme:

MULTIUSER is designed to take advantage of the 386/486 instruction set where possible. Because of this Citrix MULTIUSER runs only on 386 compatible processors. You can take advantage of this fact to boost performance of your application while running on MULTIUSER.

The compilers available for MS OS/2 generally supply library functions which will execute on both 286 and 386 processors because MS OS/2 will run on these. Unfortunately, this prevents natural optimization for the 386 32-bit environment. However, we have found that it is a simple matter to boost performance by replacing some of your compiler runtime library routines. For example, if your application makes heavy use of long arithmetic, you can modify the multiply and divide runtime functions to use the explicit 32-bit multiply and divide instructions available on the 386 and 486 processors, thereby avoiding the 32-bit arithmetic emulation.

Many compilers such as Microsoft C 6.0 make available the source to the runtime library. Microsoft C 6.0, as an example, also provides instructions and make-files for rebuilding the libraries.

The Citrix Support Bulletin Board has further information on these techniques, along with specific code examples that you can tailor to your specific needs.

I’ll have to ask people smarter than me about finding any of this information.

Anyways Citrix requires that you install it onto a HPFS partition.  Citrix uses the Microsoft OS/2 1.21 kernel + base level for the OS.  After installing and running syslevel on both they report the same level.

MS OS/2 Base Operating System
Standard Edition 1.21 Component ID
Current CSD level: XR04072
Prior CSD level: XR00000

However the kernel naturally is different as this does support multiple users.  By default Citrix is setup for async terminals, and as far as I can find there was no actual LAN connection product available.  This is just simply the most common setup of the era, where UNIX was typically deployed with async terminals, and with remote users on dialup.  The Citrix media I have is dated from January 25th, 1991.  Although according to the ‘official timeline (pdf)‘  version 1.0 was released in 1990.  This was just after the protected mode version of Windows was demo’d to Bill Gates & Steve Balmer, which incentivized  Microsoft to dump OS/2 for Windows.  This put Citrix in a bad position as they had setup their product strategy around the next generation OS from Microsoft which had for all intents and purposes had been made obsolete overnight.  And as the Windows 3.0 juggernaut picked up steam selling over 4 million copies, while all previous versions of Windows combined were only in the neighborhood of 2 million copies.  As far as I’m aware, none of the OS/2 1.x sales numbers were ever released.

Citrix 1.0 is limited to OS/2 1.2 character mode executables.  And there simply isn’t that many.  And with the industry moving to the aforementioned graphical Windows 3.0 applications Citrix hit the market with a thud.  Citrix provides support for the following applications:

  • Borland Paradox 2.0
  • California Software Products BABY/4XX
  • DataEase SQL
  • Data Access DataFlex
  • IBM DisplayWrite 4/2
  • IBM Platinum Series 2.0
  • Irwin EzTape OS/2 Tape Backup Software
  • Lotus 1-2-3 Release 3.0
  • Maynard MaynStream OS/2 Tape Backup Software
  • Micro Focus Cobol/2 Workbench
  • Microrim R:Base 3.1
  • Microsoft BASIC Version 7.0
  • Microsoft C Version 6.0
  • Microsoft LAN Manager 2.0
  • Microsoft Word 5.0
  • Microsoft SQL Server
  • Novell NetWare Requester for OS/2 V1.3
  • Oracle 6.0
  • Word Perfect 5.0

As you can see, this isn’t a very large list.

Citrix multiuser 1.0 config program

There is a text panel/menu driven config program.  This greatly simplifies tasks.  I setup a simple system with a single com port, although Bochs doesn’t do anything sophisticated like modem emulation but rather you can connect ONCE to the VM, and that is is.  But it’s enough to launch HyperTerminal to get a serial connection.

Serial Terminal

The serial support on Citrix is pretty good as long as you have updated to CSD MU01091 which adds support for VT100/VT220 terminals.  With a tiny cheat sheet it’s not too hard to get used to the multitasking capabilities of Citrix/MS-OS/2

Hotkeys:
Login switch . . . . . . . . [{ctrl}{u} ]
Session switch . . . . . . . [{ctrl}{n} ]
Session direct . . . . . . . [{ctrl}{f} ]
Session create . . . . . . . [{ctrl}{o} ]
Reset terminal . . . . . . . [{ctrl}{y} ]
Print screen . . . . . . . . [{ctrl}{]} ]
Print screen toggle . . . . [{ctrl}{\} ]
Ctrl+Break . . . . . . . . . [{ctrl}{c} ]
Ctrl+C . . . . . . . . . . . [{ctrl}{c} ]

I can really see the value at the time of Citrix, although again it really arrived just too late to the market.  I’ll have to track down more of these ‘approved’ programs, and give them a shot.

It’s funny how the market can pivot where something that was seen as a defining feature of midrange OS’s in this case being multiuser became irrelevant as CPU prices dropped to the point where not only can individual users cheaply obtain their own processor, let alone own multiple which is typical today.  While Citrix was chasing the ‘killer feature’ of UNIX being able to host multiple users on a single ‘larger’ machine, the industry rather prefered to host server applications on cheaper ‘large’ PC’s, ala MS SQL Server, SNA Server, and Exchange Server.  With absolutely no data to back anything up, I suspect that SQL Server 4.21a may have moved more copies than Citrix 1.0.  If not I can gaurentee that SQL Server 6.0 sure did.

That said once, Citrix re-tooled their ICA offering onto Windows NT 3.51 they could reach their niche market of hosted applications in a data center.  And obviously taking over Xen, and jumping onto the virtualization market was a good move to keep relevant, especially how Microsoft had twisted their arm during the Windows NT 4.0 transition.

Unboxing Citrix Multiuser 2.0

I think this is the proverbial OS/2 holy grail, a shipped copy of Microsoft OS/2 2.0

From a press release:

Coral Springs, Florida based Citrix Systems Inc has a new release of its multiuser implementation of MS-DOS. Multiuser 2.0 is designed to run any combination of MS-DOS, Microsoft Windows and OS/2 applications concurrently, and to provide all key features of commercial-grade operating systems multiuser, multitasking operation with terminal support, security, resource management, remote access and administration utilities. It is claimed to be a 32-bit operating system for Intel Corp iAPX86 machines from the 80386SX up. It is claimed to be compatible with Novell Inc NetWare, Microsoft LAN Manager, IBM LAN Server, and Banyan Vines networks, enabling it to function as a low-cost network extender. The ability to run graphical applications at the console will be available next month, with support of graphics at the terminal level will be added in April as a no charge upgrade. Citrix Multiuser 2.0 is $1,000 for a five-user package; doubling the number of users is $500, regardless of how many there were originally. An unlimited user licence is $2,000 once you’ve bought the five user licence. Out next month.

Looking at the copy I have, it’s strictly for OS/2 and MS-DOS programs.  There isn’t any hint of it supporting 32-bit OS/2 programs, so I have the suspicion that this is like the OS/2 FOOTBALL beta, which was the 1.0 kernel with 386 based paging (virtual memory) and v86 mode support for multitasking MS-DOS.   The manuals also state that there is no support for Presentation Manager either at the console or remotely.  So it appears that like Citrix Multiuser version 1.0 it is strictly text mode based.

I’d tell you more, except…. yeah. wrong media.

Hey buddy, spare a 5 1/4″ High density drive?

Microsoft C KnowledgeBase articles online

PC Mag, January 1989

It’s weird I was discussing putting this online in a more human readable format, and then  Jeff Parsons over at the incredible full system emulation in javascript site, pcjs.org just did it.

As you may or not be aware of, Microsoft hit it big as a computer languages company, before they added operating systems into it’s portfolio.  And for some weird reason after the whole OS/2 divorce thing, someone decided that everything that had been painfully learned in the earlier eras should just be expunged from history.  Which is a real shame to anyone interested in Basic, Fortran, Pascal, C and MASM.  Years ago I had gone through the steps of extracting the text the only way I could figure out easily, by writing a simple TSR that would dump the contents of the text video buffer, and write it to a file, then press the page down key, and keep repeating the process. The end result being that I had then dumped the MSPL aka the Microsoft Programmer’s Library.  I had put the text into an archive, aptly named Microsoft_Programmers_Library.7z, and pretty much used grep whenever I wanted any information, and left it at that..

It’s really cool to see it slowly transitioning to more useful information.  You can read Jeff’s article Corporations Are Crappy Archivists about his quest for seemingly simple information about ancient Microsoft mice, and the archive of KB’s for Microsoft C.

One thing that is annoying is that information on CD from the late 1980’s seems to be darned near impossible to find.  I know that each generation of machines until about 2005 was exponentially larger than the previous one (post 2007 we hit the iThing world, along with most machines being ‘good enough’ for day to day usage).  I know this ad may seem insane, but Microsoft really was trying to push people to CD distributions.  As we all know that internet thing didn’t quite tickle their fancy.    Did they ever put resources like this online?  Like on BIX or Compuserve?  It seems like an ideal resource.  But I was a kid, and didn’t have that kind of money.

Awesome CD-ROM collection and drive, starting at a mere $899!

So in the interest of a bad idea, here is MSPL, aka qemu/curses in action.

Oh my god, what I have I done!?

Well as an addendum I thought it’d be cool to put MSPL online, via shellinabox.  First off I needed a 5MB MS-DOS disk, basically enough MS-DOS too boot up, run smartdrive, idle and the CD-ROM driver, along with the minimal MSPL install.  And to button it up, I added a reboot.com from the autoexec, so when you exit it’ll reboot the VM.  Great.

The reboot command was input via debug, as it’ll let you assemble code directly.  Although it isn’t a MACRO assembler, so you have to know exactly what you are doing.

DEBUG RESET.COM
A
XOR AX, AX
NOT AX
PUSH AX
NOT AX
PUSH AX
RETF
(return on a line by itself)
RCX
9
W
Q

And with that saved, now I have to setup Qemu.  Since I’m taking the shellinabox approach that means I need something text mode, and I was thinking this was light weight. Qemu has a curses output so that’ll work.  I set it up to use qcow2 and a backing store image so that way every forked user doesn’t eat 5MB of disk space, it’s more like 100kb.

#!/bin/sh
set -m
PID=$$
mkdir /tmp/$PID
cd /tmp/$PID
qemu-img create -f qcow2 -b /usr/local/mspl/MSPL.qcow2 MSPL.qcow2
qemu-system-i386 -m 4 -cpu 486 -hda MSPL.qcow2 -cdrom /usr/local/mspl/Microsoft-Programers-Library-v1.3.iso -curses -no-reboot
cd /tmp
rm -rf /tmp/$PID

Then to tie it into shell in a box, it’ll just need the flag:

-s /mspl:nobody:nogroup:/:/usr/local/bin/mspl.sh

and this will run it as nobody, and kick off the above bash script.  Now that’s great and all, but what about stale/abandoned sessions?  I wrote this quick script to clean them up.

#!/bin/bash

FIND=”find /tmp -type d -regextype sed -regex ‘.*/[0-9]*’ -mmin +30 | sed ‘s/\/tmp\///’>/tmp/kill_out.txt”
eval $FIND
while read process; do

KILL=”kill -9 ${process}”
eval $KILL
RMDIR=”rm -rf /tmp/${process}”
eval $RMDIR

done < /tmp/kill_out.txt
rm -rf /tmp/kill_out.txt

So it’ll find numerical directories that are at least 30 minutes old, kill them and remove their directory.  Probably very dangerous to run, but it’s isolated so Im not too worried.  Then just have root add that script to it’s crontab, and run it every minute, and it’ll kill the old stuff hanging around.

I’ll add a video later on how to use MSPL via this setup.  And maybe I’ll rig something to have RDP access as well, depending on how I’m feeling.

Escargo the replacement MSN messenger network

Microsoft has had a long tradition of wanting to be cool and edgy, and copying what is popular to make themselves a metwo company.  And it’s really random, some things become wildly popular, while others crash and burn so hard that almost all existence of it happening is destroyed.  Back before the commercialization of the internet, if you wanted to do real-time conversations you used IRC, and before then it was just talk/ytalk on any UNIX host.

However once the internet opened up, companies were free to invent their own protocols, and let the users choose if they wanted something more rich than a simple text based protocol, it may seem obvious today, but users wanted to do things like share files, and more importantly be able to minimize the program and only get an alert if someone was actually messaging them.  Out of the gates of commercialization the big hit was ICQ.  And Microsoft being Microsoft, first created Comic Chat, a simplified IRC client back in 1996 as part of it’s push with Internet Explorer 3, which brought many internet programs to Windows, including a NNTP client, and a simple SMTP/POP email client.  Then in 1999 the MSN group brought out their MSN messenger.

With the later massive misstep of buying Skype from Ebay, Microsoft shuttered the MSN messaging product, and has been trying very hard to shoehorn Skype as not only a communication tool for users, but also for businesses.  Apparently they are going to try to copy slack now for us business users.

Back around 2002, when MSN was integrated in with things like ME and XP, I found some server implementation on one of our internal servers.  I think it was written in either Perl or python, and I just recall it definitely ran on one of our Linux boxes with a MySQL back end.  At the time we wanted a private server to keep internal communications internal, and MSN was convenient as everyone had it, and all they needed was a registry change to tell MSN to use the internal server.  Oh how times have changed.

Over on Escargot, it’s even easier to download a pre-patched client,  then create your account and login!

All alone

And just like that I’m logged in using MSN 7.5.0324 English on Windows 10.

Even better is that the source to Escargot is available!

If anyone feels the need to find me, you’ll know where, naturally you’ll have to type in that crazy long domain name….

SQL Server 2000 on Windows 10

I have to admit it, that when I first heard about this I was HIGHLY skeptical, but sure enough it actually works.

Enterprise Manager looking at the infamous PUBS database

Although I have gotten SQL Server 4.21a & 6.5 running on Windows 10 (The core from 6.0 works, but it’s pre-release COM objects for the Enterprise manager don’t like Windows 10) There were two stumbling blocks I never could get around.  The first one turned out to be something trivial, which is SQL 4.21 would never listen on TCPIP.

Fixing SQL 4.21

It turns out that this actually was a simple fix.

17/09/21 19:40:24.00 server server name is ‘JADERABBIT’
17/09/21 19:40:24.00 server Recovering database ‘model’
17/09/21 19:40:24.00 server Recovery dbid 3 ckpt (45,26)
17/09/21 19:40:24.00 server Clearing temp db
17/09/21 19:40:24.03 kernel Using ‘SQLEVENT.DLL’ version ‘4.21.00’.
17/09/21 19:40:24.83 kernel Using ‘OPENDSNT.DLL’ version ‘4.21.09.02’.
17/09/21 19:40:24.83 kernel Using ‘NTWDBLIB.DLL’ version ‘4.21.00’.
17/09/21 19:40:24.83 ods Using ‘SSNMPNTW.DLL’ version ‘4.21.0.0’ to listen on ‘\\.\pipe\sql\query’.
17/09/21 19:40:24.83 ods Using ‘SSMSSOCN.DLL’ version ‘4.21.0.0’ to listen on ‘1433’.
17/09/21 19:40:26.04 server Recovering database ‘pubs’
17/09/21 19:40:26.06 server Recovery dbid 4 ckpt (469,25)
17/09/21 19:40:26.06 server Recovering database ‘ultimate’
17/09/21 19:40:26.06 server Recovery dbid 5 ckpt (524295,12)
17/09/21 19:40:26.06 server Recovery complete.
17/09/21 19:40:26.12 server SQL Server’s default sort order is:
17/09/21 19:40:26.12 server ‘bin_cp850’ (ID = 40)
17/09/21 19:40:26.12 server on top of default character set:
17/09/21 19:40:26.12 server ‘cp850’ (ID = 2)

The DLL for TCP/IP is SSMSSOCN.DLL, and it turns out it really wants to be located in the C:\Windows\SysWOW64 directory (aka the system path for libraries).  Well that’s all great now, isn’t it?

Not really.

ODBC Hell

The ODBC drivers in Windows 10 finally made a magical cut off point that they will not talk to any old and ‘vulnerable’ SQL Servers.  This means that the oldest version you can connect to is SQL Server 2000.  Even SQL 7 didn’t make the cut.  Trying to connect to a SQL 7 server, you just get:

Attempting connection
[Microsoft][ODBC SQL Server Driver]Cannot generate SSPI context

And then I saw this post, about using FreeTDS to connect to MSSQL.  So I followed their instructions, and got nowhere fast just lots of crashing.  Turns out the bloodshed environment’s included G++ just fails 100% of the time for me, with a nice crash.  So I pointed it to the TDM GCC install, and then had to link the DLL manually and… nothing.  No configuration point.  In a fit of rage, I took the exist msvc project, opened it in Visual Studio 2015, and built it, except for one issue…

odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol __vsnwprintf_s referenced in function _StringCchPrintfW

Seriously, it turns out that 2015 can’t just link to ODBC, that the libc thing that gave me SDL grief is deeply entrenched all over the place.  So in this case you need to link against legacy_stdio_definitions.lib. Fantastic.

I get my DLL, and yes, it’s a Windows 32bit ODBC driver!

FreeTDS Access failure

And yeah, lots of failure.

A red-herring was seeing this in the trace:

net.c:741:Sending packet
0000 01 01 00 2b 00 00 00 00-53 45 4c 45 43 54 20 43 |…+…. SELECT C|
0010 6f 6e 66 69 67 2c 20 6e-56 61 6c 75 65 20 46 52 |onfig, n Value FR|
0020 4f 4d 20 4d 53 79 73 43-6f 6e 66 |OM MSysC onf|

So I was thinking that SQL 4.21 & 6.5 are just too old to have this weird table, and as mentioned over here people would just create it, to get Access to shut up, and get on with their lives.

So, I put in some SQL

CREATE TABLE MSysConf(CREATE TABLE MSysConf(Config   int NOT NULL,chValue  char(255) NULL,nValue   int NULL,Comments char(255) NULL)
GO
INSERT INTO MSysConf(Config,nValue,Comments)VALUES(101,1,’Prevent storage of the logon ID and password in linked tables.’)
GO

And yes, it creates the table, Access get’s it’s result then obviously doesn’t like it and up and dies.  Maybe I can burn more cycles on it later, or break down and ask.

SQL Server 2000 (Dev) on Windows 10

And then I saw this epic thread, Windows 10 & My SQL Server 2000 Personal.

I managed to install following these steps:

Extract SP4
Copy ..SP4\x86\other\sqlredis.exe to ..\originalinstallpath\x86\other
(this avoid mdac insall freezing)
Create this folder structure (any place):
Microsoft SQL Server\80\Tools\Binn
Microsoft SQL Server\MSSQL\Binn
Find out sqlunirl.dll on SP4 path and copy to Binn folder above
Copy dll files on ..SP4\x86\setup to Microsoft SQL Server\MSSQL\Binn (folder above)
Copy folder structure (created on step 3) to C:\Program Files (x86)
Give full access to user logged to **Microsoft SQL Server** folder
Change install compatiblity ..\originalinstallpath\x86\setup\setupsql.exe
XP SP2
Run as administrator

Could that really be it?  For some reason I had a file held in the Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\PendingFileRenameOperations registry key, preventing me from installing, but zapping the key & stub program, and I was able to follow the steps (I’m still not sure if you copy the dlls into the MSSQL\Binn or Tools\BInn directories, so I copied them to both!) and yes, it worked.  I even could run the SP4 update.

And now I can use Access 2016 with this fine ancient database.

Access 2016 with SQL 2000 via ODBC

And here we are.  As always there is no larger over reaching point to this.  I did have to create a linked SQL login for myself to get ODBC to login properly but it’s somewhat simple, and honestly if that sounds bizarre to you, why are you even thinking about something like this?

For me, I’m interested in the DTS of all things.  Sure the new ones are fancier, and all that jazz, but I paid good money back in the day for old MS dev tools, and being able to use them without any virtualization, aka running on bare iron is all the more appealing.

Early Direct X SDK’s

I found these while looking for something that it turns out I don’t need. Well wasn’t that great.

Anyways this includes the Direct X aka the Windows 95 Game SDK, which contains a substantial bit more documentation than the prior WING project.

I don’t think these are all that interesting to the vast majority of people, but more so anyone looking at SDK’s from the mid 90’s.

Hacking Flight Simulator 4 for multiple monitors

This has to be one of the coolest things I’ve seen in a long time.

Long story short, Wayne was able to exploit a ‘feature’ of older non random address location where a machine is configured the same way will always load the same program in the same address space.  Using this knowledge he was able to work out in memory where the location of the plane was kept in memory.  Adding a ‘server’ and two ‘client’ versions of DOSBox he could then transmit the location of the plane to the two other DOSBox client’s and then just set their viewports to left & right, and now he has an immersive simulation.

It’s a great read here: on tinmith.net

And this also is why ASLR is so important on internet connected devices, and servers where you don’t want to have known addresses in RAM where you can find important ‘protected’ data structures.

Microsoft starting to reduce One Drive storage

5GB..?

5GB..?

I suppose I should have managed it better.  I don’t even know what is there, but I shelled out the $18 HKD to at least keep it for now.

I know Microsoft has long dreamed of being SaaS, instead of being a traditional software vendor.  Is there hope for buy it and own it software as we approach 2020’s?

Either way, if you have onedrive, migrate, fix it, or pay for it.

Installing Microsoft Java on Windows 2000 SP4

So yeah, I’m using some old crap software, and it wants MS Java. Great. Ive installed Windows 2000 + SP4, IE6, and then to install MS Java and I get this error:

protected system component?

protected system component?

The Microsoft VM you are attempting to install is a protected system component and can only be updated with a later release of the operating system or service pack.

Well as far as I know, msjavx86-5.0.3810.0 is the last release of MS Java, so what to do?

Apparently all you have to do is rename it to ‘msjavwu.exe’ and it’ll install.

MS Java on IE6

MS Java in action

And there we go, Microsoft Java is working.

Thanks to the java test site that I’ve used over the years:

http://hp.vector.co.jp/authors/VA012735/applet/applets_en.htm