Solaris hints

This page is the top level of my Solaris site. [There is also a mirror site available]

At this level, you can find architecture-neutral Solaris hints and scripts.
Also available:

Table of Contents

Outside links

I maintain a page with critical information and tools written by other people. Everything else on is written by me, Philip Brown.

Sunscreen GUI

For years now, sun has had a robust firewall product, with a lousy GUI. It seems sun is planning to keep the product, and integrate it with the OS... but not improve the GUI?!?!?!

So, that has lead me to try to write an improved standalone GUI for sunscreen. Help on it is welcomed.

Informational documents

Informational in-line quickies...

  1. To turn off CD (auto-run,volstart, auto-irritation) globally, you can either do chmod 0444 /usr/dt/bin/sdtvolcheck, or create a /etc/dt/config/sessionetc file that does nothing. (since /usr/dt/config/sessionetc seems to do nothing except start sdtvolcheck)

  2. To share a terminal between multiple users, you can use "GNU screen", as follows:
    user1$ screen
    user1$  (screen-escape):multiuser on
    user1$  (screen-escape):acladd user2  
    user2$ screen -x user1
    If you are only sharing with yourself, you dont have to do the escape stuff.

    See also this page on screen multiuser mode. It has lots of extra info. Such as, you may have to make your screen executable setuid root for multiuser mode to work with others.

  3. Put set md:mirrored_root_flag=1 in /etc/system, if using ODS4.2.1 or later, and you have mirrored root disks and only two controllers. This forces allowing boot with "only" 50% metadbs available.

  4. If you want an "#ifdef solaris", the portable way is
     #if defined (__SVR4) && defined (__sun)
    This should work on gcc, sun cc, and lots o other compilers, on both sparc and intel.

    If for some reason, you want to know that Sun forte CC (c++) compiler is being used, something that seems to work is

     #if defined(__SUNPRO_CC)
    Whereas for forte cc (regular C), you can use
     #if defined(__SUNPRO_C)

  5. Use "gcc -Wall -O -Wno-unknown-pragmas" if you want a 'lint' type level of warnings while you compile. The pragmas bit is to stop warning about suns stupid pragmas in X headers.

  6.  perl -MCPAN -e 'install Bundle::libnet'

  7. alias man='GROFF_NO_SGR= TCAT="less -s" TROFF="groff -Tascii" man -t'
    Also useful may be "groff -m doc -Tascii -P cuob"

  8. Put "BROWSER=netscape6; export BROWSER" in $HOME/.dtprofile (or =mozilla if you prefer)

  9. If netscape or mozilla mail client does not remove a message from view after clicking delete, then edit your preferences file, and change 'delete_model' from 0 to 1.

  10. If you dont have the file already, drop xterm-color in /usr/share/lib/terminfo/x/xterm-color. Then when/if you use a color-supporting xterm, you will be able to correctly set TERM=xterm-color and actually have it work properly. (This actually works better for dtterm color than its own "dtterm" TERM setting?!!)

  11. "/bin/priocntl -e -c FX -m 0 -p 0 /path/to/prog"
    This will start a program (such as a browser) to be at a low priority, so as to not hog your machine if it goes wild.

  12. Putting ssd_max_xfer_size=0x800000; at the bottom of /kernel/drv/ssd.conf, will increase your fibre-channel disk large I/O throughput, where ye olde maxphys no longer seems to have any effect.

  13. Allow a non-root user to run a web server on port 80 in solaris 10: usermod -K defaultpriv=basic,net_privaddr SomeUser. Note that this will technically allow SomeUser the ability to run things on ANY port. It removes the "only root can use ports less than 1024" restriction for that user.

SCCS related scripts and tips

Portable scripts that run on sparc AND intel

quotecheck.y isnt a script, but it IS a portable way to find mismatched quotes in a shellscript. Read the file for directions on how to compile this lex program.

Fun with packaging

Speaking of packaging, if you ever need to extract something from an RPM package (Like from a source RPM, an "RPMS"), you can use the following:

rpm2cpio file.rpm |cpio -ivd
This will extract the files into the current directory

Solaris Driver Developer resources

This information is now in its own area of my site, the driver section

PS:If you're looking to hire an after-hours solaris consultant in the greater Los Angeles area, you can look at my resume :-)

Written by:Philip Brown
Bolthole Top Search