Ben Rockwood: I wanna check out OpenSolaris…. Now what?
Ben Rockwood: I wanna check out OpenSolaris…. Now what?:
It’s happened. The source has returned from its 25 year sabbatical to the people. So maybe your thinking about trying out OpenSolaris, maybe you’ve tried it before, maybe you haven’t ever used it, or perhaps you use it all the time but never on the desktop. How do you get up and running? Here are some tips to get you off and running with OpenSolaris so that you can get snuggly and cuddly before you start building code.
This first thing to do, obviously, is to install OpenSolaris. Now, Solaris has been free (as in beer) for a long time, and even longer than that you’ve been able to download it and just ignore the fact that you were supposed to pay a license fee, but now thats all ended and we’re free as in beer and speech. Solaris 10 GA is good, and Solaris Express is even better, but what you really want is the Solaris Express: Community Release. The Solaris Express (commonly written as SX) Community Release (CR) is based on Nevada (what will eventually become Solaris 11) Build 16 which includes a lot of features not found in previous releases and with a good number of bug fixes. Chief ammoung the improvements in the SX:CR are: NewBoot (GRUB), no more stupid white console, alot of bug fixes, improved device support for several things. So even if you have Solaris10 GA or Express, I highly highly recommend you upgrade to or install SX:CR.
Okey, after installing the Solaris Express: Community Release your on the proper footing, you’ve got your system installed, and you can really start playing around. Now what?
Before you do anything else I want you to look around what you’ve already got. There is more there than you think! You’ll notice that with JDS you already have a lot of apps you want, such as GAIM, The GIMP 2.0, BASH, ZSH, MySQL, Apache and Apache2, wget, Net-SNMP, Mozilla, Gnome-Terminal, GPhoto2, Python, PERL, GCC 3.4.3, ncFTP, OpenJade, OpenSSL, OpenSSH, a basic TeX toolset, Bison, ant, Imlib, and much more! You want to look in /usr/sfw/bin (sfw stands for SunFreeWare). If your going to build your own software you want to look in /usr/sfw/include and /usr/sfw/lib to see that most of the standard libs you want (libjpeg, libpng, libz) are already there for you. Spend some time playing with these so that you don’t get frustrated about not having something that you might actually already have.
Two things to note are that some of the GNU tools conflict with the tradional Solaris/UNIX tools (such as make, sed, awk, etc) so the GNU tools are renamed to be preceeded by g for GNU, so GNU Make is gmake, GNU tar is gtar. To make life easier for yourself you might want to just create an alias in your shell’s profile such as “alias tar=’gtar’“. Also, if you try to create a home directory in /home and cant, the reason you can’t is because by default its an automount mount point. To change this edit /etc/auto_master, comment out the line “/home” and restart autofs (svcadm restart autofs) or simply disable autofs completely using ’svcadm disable autofs’.
But what if the included stuff isn’t enough, what then? There are several places to get binary software for Solaris, but the two most popular are SunFreeWare.com and Blastwave.org. On Solaris we use the standard SysV PKG format. You can look at whats installed on your box with the “pkginfo” command, look at package details with “pkginfo -l XXXmypkg”, add packages with ‘pkgadd -d XXXmypkg’, or remove packages with ‘pkgrm XXXmypkg’. At SunFreeWare.com you can download packages for your system from their wide selection of packages, however you have to download and install them all individually, which means you need to be aware of dependancies. SunFreeWare was a life saver for years, but Phil Brown wanted something simpler like Debian’s apt-get, so he write a Solaris equivelent called “pkg-get”, which became the foundation for Dennis Clarke’s Blastwave.org. On Blastwave you can download and install the pkg-get tool, then add /opt/csw/bin to your PATH and then add all the software you want like this: “pkg-get -i enlightenment’. You can see a full list of Blastwave’s avalible software on their package page. The 2 nice things about Blastwave is that its really quick to get software installed with no hassle, and all software installs in /opt/csw so you don’t have to worry about wierd stuff being installed all over your clean install.
Genearlly once my system is up and running I install the Blastwave package and nab my favorite tools that aren’t in Solaris, such as Subversion, CVS, GNU Screen, AutoMake and AutoConf, teTeX, and either Xchat or irssi depending on my mood. You’ll probly want Vim too but I tend to wait because Blastwave’s Vim package installs Gvim (graphical) too, which installs a ton of dependancies I don’t want. All this can be done easily and quickly with Blastwave:
# cd /tmp # wget http://www.blastwave.org/pkg_get.pkg # pkgadd -d pkg_get.pkg (follow the prompts) # export PATH=$PATH:/opt/csw/bin # pkg-get -i subversion cvs automake autoconf screen tetex xchat (follow the prompts)Okey, so now you’ve got a kickin’ OpenSolaris box with some extra kickin’ tools. Now what?
I don’t really care for the JDS-ized Mozilla in Solaris these days… I’ve really become a Firefox man. And, I’ve also given up on mutt in favor of the very very very fast and easy to use Thunderbird. Thanks to the Sun Beijing Team they keep Mozilla.org populated with builds just for us… so go get ‘em. FireFox 1.0.4 for Solaris tarballs and Thunderbird 1.0.2 for Solaris tarballs. Because these change fairly often as new releases come out I just prefer to install them in my home directory, so just untar them there and when new releases come out you can just ‘rm -rf ~/firefox’ and then install the new one, quick and painless.
Once you’ve got Firefox and Thunderbird taken care of you’ll need to make sure you can kick back and relax when no ones lookin’, so got get Macromedia Flash, untar the tarball, and run the “flashplayer-installer” script to install. Then you can watch reallyfunny stuffwhile you should be working. (Oh, don’t forget to pkg-get xmms and then listen to the awesome audio streams at di.fm, the chillout room rules.)
The other non-open app you’ll want is Adobe Acrobat, but sadly thats only avalible for Solaris SPARC not X86, so go put your name on the list of people pissed about it, and then pkg-get gPDF from Blastwave.
At that point you’ve got a really usable system with all your goodies and your ready to rock. You just want to tweek your desktop itself. Solaris features two X servers: Xsun and Xorg. I highly recommend using Xorg. You can switch between the two by using the kdmconfig program. When y ou switch to Xorg the /etc/X11 directory will be created and you’ll be given a sample xorg.conf to tinker with. Sadly, Solaris doesn’t include the composite tools, although composite does work (so they say). Once you switch to Xorg, you’ll want to switch over to the nVidia driver if you have an nVidia graphics card. You can get the driver on nVidia’s driver page. Once you have the package just run the script which will install 2 packages: NVDAgraphics and NVDAgraphicsr. Now, these pckages are for Quadro cards which thankfully are now cheap, but if your really kool and have a geForce you’ll need to make a modification to /etc/driver_aliases to associate the driver with the hardware. What you do is run /usr/X11/bin/scanpci, find your video card and then add a line to /etc/driver_aliases… so if this is the output from scanpci:
pci bus 0x0001 cardnum 0x00 function 0x00: vendor 0x10de device 0x00f1 nVidia Corporation NV43 [GeForce 6600/GeForce 6600 GT]Then you want to add this “nvidia “pci10de,f1″‘ to your /etc/driver_aliases, noticing that the extra 0’s in the divice ID get hacked off. You’ll notice lots of nvidia lines in your driver_aliases but just ignore them, they’re fine. Please note, however, that if you ever choose to BFU your system you’ll need to remove the nVidia drivers and remove any modified lines in your driver_aliases prior to BFUing, so as to not cause problems. You aren’t really required to do this, but it’ll make your life much much simpler to just do it that way.
And finally, get yourself a real window manager. The OpenSolaris window manager of choice is Enlightenment (ok, I’m biased, but I’m right). You can get it from Blastwave or from me (see my earlier quick pack install). You can also find KDE, GNOME (non-JDS), XFCE, WindowMaker, and all the rest of those crappy E wannabe’s via Blastwave, SunFreeWare or search around google.
Good luck and happy hackin’! May the source be with you.
[composed and posted with ecto]