We've been running Solaris in our lab since version 2.1, and some of us have used beta and even alpha versions of 2.0. Our experiences have been very positive, and things keep getting better and better with each release.
I've tried to provide some introductory information here, some reasons why you may want to use Solaris, some reasons why you may NOT want to use Solaris, and explanation of how things are different between Solaris 2.x and earlier releases, some common gotchas, and a list of internet-available resources.
As always, if you find anything that's wrong, or have any comments, drop me a note!
Keith Edwards College of Computing Georgia Tech Atlanta, GA 30332-0280 (404) 894-6266 keith@cc.gatech.edu
SunOS 5.x is based on UNIX System V Release 4. In fact, Sun was one of the creators of SVR4 along with AT&T. SVR4 is in turn based on SunOS 4.x and earlier versions of System V.
Note that Solaris 2.x doesn't just run on Suns. It also runs on Intel-based PCs, and (soon) PowerPC machines.
Some of the things that are different and that may cause problems are:
The default .login, .cshrc, and .xinitrc files look at /etc/env.path to figure out what kind of machine you're on, and then try to execute (in order) .cshrc-sun-5.4, .cshrc-sun-5, .cshrc-sun, and .cshrc-gen. This scheme allows you to have different startup files in your home for each type of system that you're on (Suns running Solaris 1, Suns running Solaris 2, SGIs running IRIX, etc.) It's easy to keep your system-specific login stuff separate this way. Look in /usr/local/dotfiles/README for more information.sun-5.4:sun-5:sun:gen
I recomment having /usr/ccs/bin and /opt/SUNWspro/bin in your path before /usr/ucb. This will make your life much easier.
A few other good things to know are (1) ranlib doesn't exist on your system because it's not needed. The SVR4 ar command keeps archive tables of contents up-to-date without the need for ranlib. Link ranlib to /bin/true or something if you have a bogus makefile that thinks it needs ranlib. (2) Make sure you're using the C compiler in /opt/SUNWspro/bin (or /usr/local/bin) instead of the one in /usr/ucb/cc. The compiler in /usr/ucb/cc is the "backwards compatibility" compiler that invokes /opt/SUNWspro/bin/cc with flags to compile using BSD libraries and include files. Go through the extra 5 minutes of work to use the native compiler, you'll be happy you did.
We've built 2.x-specific verions of quite a bit of software, including: AudioFile, Doom, elm, GCC (and various other GNU tools), ghostscript and ghostview, the MBone tools, Modula-3, Mosaic 2.4, Netscape, olvwm, Python 1.2, Tcl/Tk, tcsh, XEmacs, etc.
Most SunOS 4.x programs that (1) don't muck with kernel memory, (2) don't do weird BSD-style terminal shenanigans, and (3) don't use undocumented system interfaces will work just fine under the Solaris Binary Compatibility Package. This allows you to run nearly all SunOS 4 binaries without problems under Solaris 2.x.
OK, this is how to run the window manager of your choice on solaris (one minor bug remains, may not have a solution).
dtsession*wmStartupCommand: path to wm of your choice (make sure it's installed)
cdln -s .xinitrc-sun-5 .dt/sessions/sessionetc
.dt/sessions/sessionetc is the file dt reads instead of your .xinitrc-sun-5. making them the same file (by linking one to the other) just makes it easier for you to keep track of.
If something goes wrong, debug as follows:
caveat: when you log out, all that happens is your window manager dies.
In general, if you never log out this won't be a problem, but it should be fixed and I don't know how.
In order to log out completely, you need to do the following:
Note: I'll probably write a shellscript pretty soon which finds my window manager process, and my dtsessino and ttsession processes and kills them all (thus logging me out) so I don't have to always do this by hand.
There might already be a program which does this, but I don't know where it is.
-jen
The result is that WABI runs Windows apps pretty quickly. Sun "certifies" about 20 applications that are guaranteed to work. Officially, you're on your own if you want to run an app that's not on the list, but lots of programs seem to work well.
WABI 2.0 requires you to install your own copy of Windows to work
(WABI needs OLE and other DLLs for which there is not a SPARC-native
implementation). For more information on running apps under WABI,
and tips about running non-certified apps, you can send email to
one of the answerbots:
wabi2.0-questions@east.sun.com wabi2.0-apps@east.sun.com
The C compiler (cc), C++ compiler (CC), debugger (dbx), and various graphical tools are all in there.
Note that there is a "cc" in /usr/ucb. This "compiler" is actually just a shell script that invokes /opt/SUNWspro/bin/cc with a few extra flags to compile older BSD-based software (it links in -lucb and used the BSD-style include files). Since most software off the net now support compilation for Solaris (and the stuff that doesn't can usually be fixed in a few minutes), I'd recommend never using the BSD compiler unless you absolutely can't avoid it. You'll pay a (slight) performance hit for running under the binary compatibility mode.
If you're linking aginst shared libraries, the correct way to do it is to use -R to specify a list of directories where those objects live. The -R option puts the paths you specify into the executable, and the runtime linker will search there for them when the executable runs. Without the -R option, you require those running your programs to use an LD_LIBRARY_PATH environment variable.
LD_LIBRARY_PATH is the work of the devil and should be avoided at all costs. Don't have one set yourself, don't make your users set one. If you find a program that won't run without having it set, that program is broken.
If you use the (evil) compatibility compiler (which you shouldn't use, see above), then the libucb compatibility library will get linked in and it contains the bzero, ..., functions.
In Solaris 2.5, bzero and friends are included in libc to make life easier.
Note that if you use the GNU fileutils version of ar then all bets are off. Stick to the one that comes with Solaris.
If you're doing multithreaded development, check out LockLink, a tool for doing static analysis of C programs to detect potential MT problems, and thread analyzer. There's also a performance analyzer, maketool, and some other stuff.
If you're a C++ coder, the RogueWave Tools.h++ class library comes for free. Sun has enhanced the library to be thread-safe.
The AnswerBook program provides online access to the complete Sun documentation set, in a hypertext and searchable format. The books are displayed using Display PostScript. Type answerbook to get at it.
The floppy drives on Suns don't autodetect floppy insertions. So you have to tell the Volume Manager that a floppy is there. You can do this from the command line by typing "volcheck" or from the File Manager by pulling down the file menu and selecting "Check for Floppy."
(I usually leave a File Manager running just for this purpose; it also gives you a graphical interface to formatting floppies.)
to share your CD-ROM drive with any CoC system.share cdrom* -o ro=all-cc
In Solaris, the OpenWindows server is essentially an enhanced MIT X11R5 server. The code is actually based on the MIT sample server source, so it behaves just like the "generic" MIT server.
So why use OpenWindows? OpenWindows provides a few extra benefits over the MIT server:
You probably should run the OpenWindows server though, unless you have a specific need for some extension that's only in the X11R6 server (you can run R6 clients with the OpenWindows server no problem).
See above for special tips on running a different window manager with CDE.
CDE lets you switch at login time between your different environments. It also uses the OpenWindows server.