Skip to topic | Skip to bottom

Arthur.TuningSolarisr1.22 - 02 Dec 2005 - 10:10 - ArthurVanDamtopic end

Start of topic | Skip to actions

Tuning Solaris

(Also see this blog-note)
A long tradition of Sun hardware and the Solaris OS lives here at the Mathematical Institute. Running an old solaris 2.8 with CDE is not one of my hobbies, so I tried tuning my system to have it resemble a more up-to-date linux system.

This page is not too interesting for visitors, I mainly keep it as a scrapbook to remember settings and commands. Here is what I did:

software for Solaris

Probably all useful software you can think of is available precompiled for Solaris at http://www.sunfreeware.com/ I needed source distributions (tar.gz), but they can be found there as well (links to official manufacturers)

bash by default

Change your default shell with chsh:
  chsh dam `which bash`

bash configuration

Somehow bash is not started as login-shell, so do not use .bash_profile. Instead, use .bashrc (started for each newly opened terminal window. Not ideal though, not used in SSH sessions.)
  PKGROOT=/local/dam/pkg; export PKGROOT
  ETCROOT=/local/dam/etc; export ETCROOT

  PATH=$PKGROOT/coreutils/current/bin:$PATH
  PATH=$PKGROOT/tar/current/bin:$PATH
  PATH=$PKGROOT/grep/current/bin:$PATH
  PATH=$PKGROOT/nano/current/bin:$PATH
  PATH=$PKGROOT/subversion/current/bin:$PATH
  PATH=$PKGROOT/nedit/current:$PATH
  PATH=$PKGROOT/top/current/bin:$PATH
  PATH=$PKGROOT/screen/current/bin:$PATH
  PATH=$PKGROOT/gettext/current/bin:$PATH
  PATH=$PKGROOT/m4/current/bin:$PATH
  PATH=$PKGROOT/autoconf/current/bin:$PATH
  PATH=$PKGROOT/automake/current/bin:$PATH
  PATH=$PKGROOT/libtool/current/bin:$PATH
  PATH=$PKGROOT/xmms/current/bin:$PATH
  PATH=$PKGROOT/AfterStep/current/bin:$PATH
  PATH=$PKGROOT/libast/current/bin:$PATH
  PATH=$PKGROOT/xpdf/current:$PATH
  PATH=$PKGROOT/bibutils/current:$PATH
  PATH=$PKGROOT/bibtool/current/bin:$PATH
  export PATH

  C_INCLUDE_PATH=$PKGROOT/jpeg/current/include:$C_INCLUDE_PATH
  export C_INCLUDE_PATH

  PERL5LIB=$LIBROOT/perl5:$PERL5LIB; export PERL5LIB
  PERL5LIB=$LIBROOT/perl5/sun4-solaris:$PERL5LIB; export PERL5LIB

  LD_LIBRARY_PATH=$PKGROOT/jpeg/current/lib:$LD_LIBRARY_PATH
  LD_LIBRARY_PATH=$PKGROOT/zlib/current/lib:$LD_LIBRARY_PATH
  LD_LIBRARY_PATH=$PKGROOT/libpng/current/lib:$LD_LIBRARY_PATH
  LD_LIBRARY_PATH=$PKGROOT/tiff/current/lib:$LD_LIBRARY_PATH
  LD_LIBRARY_PATH=$PKGROOT/libogg/current/lib:$LD_LIBRARY_PATH
  LD_LIBRARY_PATH=$PKGROOT/libvorbis/current/lib:$LD_LIBRARY_PATH
  LD_LIBRARY_PATH=$PKGROOT/libast/current/lib:$LD_LIBRARY_PATH
  LD_LIBRARY_PATH=$PKGROOT/expat/current/lib:$LD_LIBRARY_PATH
  export LD_LIBRARY_PATH

  if [ "$PS1" ]; then
    PS1='\[\033[0;31m\][\u@\h:\w]\$\[\033[0m\] '
    eval `dircolors -b`
    alias ls='ls --color=auto'
    LANG="en_US"
    SUPPORTED="en_US.UTF-8:en_US:en"
    SYSFONT="latarcyrheb-sun16"
  fi

Become a local root

Got myself a directory on the local disk, prepare for future reference (if not already in .bashrc:
  PKGROOT=/local/dam/pkg
  ETCROOT=/local/dam/etc

coreutils

Colorized ls output (yes, I am 'visuals-oriented'), and much more of course.
  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/coreutils-4.5.4.tar.gz
  tar zxvf coreutils-4.5.4.tar.gz 
  gunzip coreutils-4.5.4.tar.gz 
  tar xvf coreutils-4.5.4.tar 
  cd coreutils-4.5.4
  ./configure --prefix=$PKGROOT/coreutils/4.5.4
  make
  chmod u+x config/*-sh
  make install
  cd $PKGROOT/coreutils
  ln -s 4.5.4 current

More versatile tar

I want a tar with (g/b)zip support!
  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/tar-1.13.94.tar.gz
  gunzip tar-1.13.94.tar.gz 
  tar xvf tar-1.13.94.tar 
  cd tar-1.13.94
  ./configure --prefix=$PKGROOT/tar/1.13.94
  make
  make install
  cd $PKGROOT/tar
  ln -s 1.13.94 current

Recursive grepping

The grep utility was also of some unknown old version:
  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/grep-2.5.tar.gz
  tar zxvf grep-2.5.tar.gz 
  cd grep-2.5
  ./configure --prefix=$PKGROOT/grep/2.5
  make
  cd $PKGROOT/grep/
  ln -s 2.5 current

top

top was not at the system at all.
  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/top-3.5.tar.gz
  tar zxvf top-3.5.tar.gz
  cd top-3.5
  ./Configure # enter appr. values, specify a $PKGROOT/top/3.5/bin dir etc.
  make
  make install
  cd $PKGROOT/top/
  ln -s 3.5 current

nano, for the quick editing

  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/nano-1.2.4.tar.gz
  tar zxvf nano-1.2.4.tar.gz
  cd nano-1.2.4
  ./configure --prefix=$PKGROOT/nano/1.2.4 --enable-nanorc
  make
  make install
  cd $PKGROOT/nano
  ln -s 1.2.4 current

NEdit, for the real editing

Version 5.5 was the latest, don't know all the benefits to the 5.3 which was available by default. But I copied a nedit.rc based on 5.4, so downgrading was no attractive cboice. One advantage of 5.5: we've got a tabbed interface now! (instead of separate windows) A binary dist from http://www.nedit.org worked fine!

Xpdf, PDF viewer with reload

Acroread is nice software, but it badly needs a 'Reload'-function. In comes xpdf. My system offered version 0.7, the latest version was 3.00... Downloaded a binary from http://www.foolabs.com/xpdf/download.html Made some changes in the sample-xpdfrc file and copied that to ~/.xpdfrc:
displayFontT1 Times-Roman           /usr/local/lib/ghostscript/fonts/n021003l.pfb
... and more of these lines ...

fontDir /usr/local/texlive8/texmf/fonts/type1/bakoma
psPaperSize      A4

subversion, CVS is dead!

Requirement: libxml2

Subpackage neon needs libxml2, not present at my machine, so here goes:
  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/libxml2-2.6.4.tar.gz
  tar zxvf libxml2-2.6.4.tar.gz 
  cd libxml2-2.6.4
  ./configure --prefix=$PKGROOT/libxml2/2.6.4
  make
  make install
  cd $PKGROOT/libxml2/
  ln -s 2.6.4/ current

Requirement: OpenSSL with shared libraries

I want subversion with https support, but a failing build made clear that our own openssl (0.9.7c) lacked shared libraries. So once again build my own version:
  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/openssl-0.9.7d.tar.gz
  tar zxvf openssl-0.9.7d.tar.gz
  cd openssl-0.9.7d
  ./Configure --prefix=$PKGROOT/openssl/0.9.7d --openssldir=$PKGROOT/openssl/0.9.7d \
    shared solaris-sparcv8-gcc
  make
  mkdir $PKGROOT/openssl
  mkdir $PKGROOT/openssl/0.9.7d
  make install
  cd $PKGROOT/openssl/
  ln -s 0.9.7d current

Finally, let's build!

(Note: this is a client-only build, I don't need no subversion server of my own.
  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/subversion-1.0.5.tar.gz
  tar zxvf subversion-1.0.5.tar.gz 
  cd subversion-1.0.5
  ./configure --prefix=$PKGROOT/subversion/1.05 --without-apache --without-apxs \
    --without-berkeley-db --with-editor=nano --with-ssl \
    --with-libs=$PKGROOT/openssl/current:$PKGROOT/libxml2/current
  make
  make install
  cd $PKGROOT/subversion
  ln -s 1.0.5 current

Screen

screen lets you keep multiple (virtual) terminals open in one terminal window, and keeps them open in local session, even if you log out from your remote-session. (Yes, this sounds incomprehensible, but it is really handy!)
  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/screen-4.0.2.tar.gz
  tar zxvf screen-4.0.2.tar.gz
  cd screen-4.0.2
  ./configure --prefix=$PKGROOT/screen/4.0.2 \
    --enable-colors256 \
    --with-sys-screenrc=$ETCROOT/screenrc
  make
  make install
  cp etc/etcscreenrc $ETCROOT/screenrc
  cd $PKGROOT/screen
  ln -s 4.0.2/ current
I ignored the final note that make install gave: 'termcap entry (./terminfo/screencap) should be installed manually.'

Thunderbird mail

No special building tricks here, precompiled binaries suffice (also for Solaris), get it from http://www.mozilla.org/products/thunderbird/releases/#install Take the simplest form, without GTK2 and XFT, for running at Solaris 2.8, CDE.

Firefox browser

Some version of 1.0-PR was already installed, and it works fine. After automated application of some system patches, firefox crashed on every first opening of a page with flash objects. The sysadmin tried increasing shared memory size in the kernel, but that didn't help.
I installed a new firefox locally, including the lates flash-plugin for Solaris, and all problems were solved. Currently, I'm running the official 1.5 release (contributed build from http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5/contrib/, I took the solaris2.8-sparc-gtk1 variant).

Autotools

N.B. I added libtool 1.5.10 later, it compiled fine, but was not properly detected by automake (aclocal) When building libvorbis (see below) I copy-pasted libtool.m4 into libvorbis' aclocal.m4 by hand (Yes, that's dirty, but I'm not in the mood right now)

M4

  wget ftp://ftp.nluug.nl/pub/gnu/m4/m4-1.4.2.tar.gz
  tar zxvf m4-1.4.2.tar.gz 
  cd m4-1.4.2
  ./configure --prefix=$PKGROOT/m4/1.4.2
  make
  make install
  cd $PKGROOT/m4
  ln -s 1.4.2/ current

autoconf

  wget ftp://ftp.nluug.nl/pub/gnu/autoconf/autoconf-2.59.tar.gz
  tar zxvf autoconf-2.59.tar.gz
  cd autoconf-2.59
  ./configure --prefix=$PKGROOT/autoconf/2.59
  make
  make install
  cd $PKGROOT/autoconf
  ln -s 2.59/ current

automake

  wget ftp://ftp.nluug.nl/pub/gnu/automake/automake-1.9.tar.gz
  tar zxvf automake-1.9.tar.gz
  cd automake-1.9
  ./configure --prefix=$PKGROOT/automake/1.9
  make
  make install
  cd $PKGROOT/automake
  ln -s 1.9/ current

XMMS, Tune it up!

XMMS for playing MP3 files.

libogg

  ./configure  --prefix=$PKGROOT/libogg/1.0
  make
  make install
  cd $PKGROOT/libvorbis
  ln -s 1.0/ current

libvorbis

This library is also needed for .ogg files. Normal installation went fine, but did not get picked up when running xmms. The cause was an outdated libtool. Also some problems with new autotools, I had to change AC_DEFUN([XIPH_PATH_VORBIS], to AC_DEFUN([XIPH_PATH_VORBIS], in some .m4 files. After fixing that, all was fine.
  ./configure  --prefix=$PKGROOT/libvorbis/1.0 --with-ogg=$PKGROOT/libogg/current
  make
  make install
  cd $PKGROOT/libvorbis
  ln -s 1.0/ current

Finally, XMMS itself

  wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/xmms-1.2.6.tar.gz
  tar zxvf xmms-1.2.6.tar.gz
  cd xmms-1.2.6
  ./configure --prefix=$PKGROOT/xmms/1.2.6 \
    --with-libxml-prefix=$PKGROOT/libxml2/current \
    --with-included-gettext=$PKGROOT/gettext/current \
    --with-cdda-device=/vol/dev/aliases/cdrom0 \
    --with-ogg-prefix=$PKGROOT/libogg/current \
    --with-vorbis-prefix=$PKGROOT/libvorbis/current
  make
  make install
  cd $PKGROOT/xmms
  ln -s 1.2.6/ current

Need to add this to .bashrc:

  LD_LIBRARY_PATH=$PKGROOT/libogg/current/lib:$LD_LIBRARY_PATH
  LD_LIBRARY_PATH=$PKGROOT/libvorbis/current/lib:$LD_LIBRARY_PATH
  export LD_LIBRARY_PATH

Tip: Use audiocontrol to disable speaker playback and enable headphone playback only.

Audio CD support

New method: plugin xmmms-cdread

Tipped by Tammo Jan, I set up the xmms-cdread plugin, which works fine. Configure with xmms's prefix, and edit cdromsolaris.h, change
cdrom_open(const char *device, int &flags)
into
cdrom_open(const char *device, int *flags)

For the rest:

  wget ftp://mud.stack.nl/pub/OuterSpace/willem/xmms-cdread-0.14a.tar.gz
  tar zxvf xmms-cdread-0.14a.tar.gz 
  cd xmms-cdread-0.14a
  ./configure --prefix=$PKGROOT/xmms/current
  make
  make install

Old method: configuring the xmms-builtin plugin

The configure option --with-cdda-device=/vol/dev/aliases/cdrom0 doesn't work out-of-the-box, but needs an additional modification. In the plugins-window of xmms, select the 'CD Audio player' plugin and remove the entry for 'Directory:' (if any), it defaults to '/'. This is needed because the solaris volume manager does not mount audio cds by default.

An additional problem: I cannot set the output-option to the standard solaris audio output, so now it only sends audio-output to the headphone jack of the cdrom drive itself. So until know, I did not gain a thing...

bibutils, (convert BibTeX, RIS, XML)

BibTeX is not always the available format when looking up scientific publications. RIS is also a widespread format. I found a small package which can read these formats (endnote, and ISI as well) and convert to each other in both directions (using XML as intermediate)

I downloaded the latest version from http://www.scripps.edu/~cdputnam/software/bibutils/, modified the Makefile, manually created the install-dir and ran make and make install.

The required mods in Makefile:

  ## SunOS5
  MTYPE=SunOS
  #POSTFIX=_sunos5
  CC = CC=gcc
  RANLIB= RANLIB="echo Skipping ranlib"

  # (comment all linux-related lines)

  INSTALLDIR=${PKGROOT}/bibutils/3.12

BibTool (searching, filtering, prettyprinting BibTeX files)

BibTool, by Gerd Neugebauer is a handy package that parses BibTeX files and can process them in many useful ways.

Here's how I installed it (note!: the prefix in ~/www is only because I use it as a cgi as well. Change the configure call below to your own needs)

  wget ftp://ftp.tex.ac.uk/tex-archive/biblio/bibtex/utils/bibtool/BibTool-2.48.tar.gz
  tar zxvf BibTool-2.48.tar.gz
  cd BibTool-2.48
  ./configure --prefix=~/www/cgi-bin/BibTool
  make
  make install

Tweaking

Some small hacks that make your workspace just a little bit more convenient.

Notify sound on new mail

Tammo Jan likes to distinguish his mail beep from his roommates' mail beeps. Here's how to (in combination with Thunderbird mail client)
  • Download 'yamb' thunderbird extension from http://globs.org/index.php?lng=en
  • Change the new mail command to: audioplay /usr/demo/SOUND/sounds/bubbles.au
  • Switch off dtmail (i.e., remove it from the workspace manager) to avoid duplicate beeps.

The latest version of yamb actually calls the command with subject, sender data and more:

  audioplay /usr/demo/SOUND/sounds/bubbles.au "Arthur van Dam" "Re: Mailpiepje" ...
so you could create a warapper script that does more with sender and/or subject (see below).

Notify message window on new mail

Instead of beeping upon arrival of new mail, I let a nifty popup window grow out of the bottom right of my screen (inspired by how aMSN does it). See this screenshot. Here's how to do it:
  • Again it starts in Thunderbird with the yamb extension.
  • Get my notify script here: newmailnotify
  • Place it in some directory (e.g. ~/bin/) and make it executable (chmod u+x newmailnotify)
  • Open the file in an editor and make sure in the first line that the location of the wish interpreter is correct.
  • In Thunderbird, under 'Extensions', configure yamb, make the command something like this: ~/bin/newmailnotify

Synchronize bookmarks/files/agenda between your workplaces

I have two main work environments: Sun SPARC station and my linux laptop, but occasionally work under Windows at the laptop or even at my old home PC. This means potentially four workspaces that are not the same. Using a central server for storing some data, it becomes easier and easier to keep all these envs in line.

What do I use?

  • A WebDAV/subversion server at the computer science department.
  • Bookmarks Sychronizer for Firefox (supports plain FTP as well!)
  • Subversion for synchronizing files. See also the above subversion instructions. It's the best software thing that's happened to me in the last two years.
  • Mozilla Sunbird, a standalone calendar that supports calendar publishing/sharing/synchronizing using WebDAV. Thunderbird's address book is not integrated yet, but I'm waiting for the Lightning calendar plugin for Thunderbird.

WebDAV? URLS?

  • The bookmarks synchronizer extension wants a separate server and location value. Server: https://svn.myserver.foo, location: /repos/myrepo/bookmarks.xml.
  • Sunbird wants the full URL at once: https://svn.myserver.foo/repos/myrepo/mycalendar.ics. (This file is in the iCal format). I don't let sunbird publish changes automatically, but do it by hand at the end of a day, just to avoid numerous commit email messages.

How Bookmarks Synchronizer does merging

  • When you switch on the 'merge new data' check box, remotely deleted bookmarks are not deleted locally, but local additions are maintained and new remote additions are of course also added locally. Remote modifications to existing bookmarks are applied to local bookmarks based on the bookmark name. So, if you've locally changed the title of a bookmark, a new one will created to contain the remote mods.
  • When the 'merge' check box is unchecked, the remote xml file is simply downloaded to your local system and it replaces your local bookmarks entirely. So, be careful with this one.

to top

Arthur.TuningSolaris r1.22 - 02 Dec 2005 - 10:10 - ArthurVanDam
Revisions: | r1.23 | > | r1.22 | > | r1.21 | Total page history

You are here: Arthur > CategoryComputerSetup > TuningSolaris