Porting graphical Solaris application to Linux

I don't expect any quick answers, but if people have links to resources I can investigate I'd be extremely appreciative. Here is what we have today:
The "application" is a multi-process train control system that uses the Unix desktop, currently CDE, several motif-based applications and sound, communications with a mainframe, XML message passing and miscellaneous processes. The graphics are mostly written in C/C++ with Motif calls. Pretty sure there is also use of Xview. The dialogs are done with UIL/UID. The XML parser is in Java. Of course there are plenty of startup & wrapper scripts and various C source, but I'm most concerned with the Graphics.
My initial target was to be Centos 6, but I have flexibility there. I see that Xview is available as open-source as well as Motif. But CDE is alpha-only and anyway do I need it? We don't use much of the Desktop tools, but we do use X and CDE resources and the dtwm as a "bucket" for the application. I'm also worried about the Video interfaces at a low-level since we use mutiple heads.
How hard do you think this is going to be? Should I bother with CDE? I really want to hear from people who have done any of this and maybe have a cache of resources or some books to recommend.
Thanks to all. :slight_smile:

X/Motif apps need X and Motif libs, and an X desktop, but should not care what desktop they pop out on! In fact, you can switch wm while the app is running. Your only issues are getting compatible behaviors for all the C and Motif calls from Xfree and lesstif or open Motif or such. It seems like it should not be a big deal, but the devil is always in the details. Do your video thingies go below X, or are they just pixelating a window that may be displayed whole or in part on one desktop on parts of one or more displays?

1 Like

Most of the application calls are Motif or Xview. There is some Xlib access but that's it. the application uses double-buffering for smooth zooming.
I wonder if it would be easier to transition to Solaris containers and X Terminals.

I would think you could use a motif X desktop on LINUX and see half of the behavior right now.

Is the X Client porting that hard?

Ah, great idea, set my DISPLAY over on the Linux box and see if I can get the application screens up on there. Excellent unit test! I'll try it an post back. That should give at least a warm fuzzy as to how much a different window manager would matter.
As for building under Linux -- yes, it is hard. I have a 32-bit version of Xview as that seems to be the only version of that library available for Linux (it implements the old Sunview calls) so I have to build all of the graphical application as 32-bit and that requires it's own set of headers and libraries, etc. So it gets involved.:o

Remember that the chosen X window manager is another X client, and can run anywhere there is connectivity! The X Server mainly varies in screen dimensions, I bet. I run everything local for top speed and vnc out the desktop. The big worry in X is that an app will start playing ping-pong with the X server, and the latency will kill you, and sometimes the app times out, too. I put a vnc desktop on each server, so no x on the net.

I ran the application on a Solaris 10 box and sent the display the the Linux box and it doesn't look horrible. There was at least one font not found, so the default chosen made everything too big. The other problem was the colormap. We run 8/24 on Solaris because the app needs that (not sure in you can double-buffer with more bit depth than that, but anyway that's what it is now).
Other than that, it looks reasonable. That was a good first step.
Also we have got the app build and linked in 32-bit mode, but it looks like the 32-bit gcc packages conflict with the 64-bit packages. Quite odd. I've got to think they can co-exist.

What linux are you building this in? They can coexist, certainly, but you certainly don't want a 32-bit libc instead which is what many Linux package managers would think you want. Instead, 32-bit libc often gets put in an x86-emul package or the like so you can install them without overriding them...

X Font is not my strength, but there is static linking and then there is setting the LD_LIBRARY_PATH carefully ld-linux(8): dynamic linker/loader - Linux man page (unless the library path is wire in for security or paranoia, called rpath, back when was a -R option; some have been know to use it for everything). Here in HP-UX, I often have to strip out embedded paths using 'chatr' as I am not root installing to usual paths. You can see the process of any object's dynamic links in your env using 'ldd -rsv'.