Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

OK so I fully admit that I am new to administrating Open Solaris but I had been a user of it back in Solaris 8 days. Since I wanted to build a ZFS NAS server I figured that Open Solaris would be be a better platform choice over FreeBSD.

Anyway - I've been having a humdinger of a time getting into the groove here admin wise and its frustrating me completely.

I've got a couple of questions:

  1. Am I loosing my mind or is Open Solaris seem overly complex? I haven't had to deal with any #3 in years...
  2. Should I switch to FreeBSD for simplicity?
  3. How do I setup the term so that it properly works with remote logins from my Windows (putty) and Linux boxes?
    1. Specifically, vim gets no colors unless TERM=xtermc which according to the community is not a bug (HA). Is there some standard way to setup the .bashrc/.profile script to consistently fix term colors?
    2. A standard way to fix special keys like del, pgup, pgdn, end etc. which don't work in any remote terms but also don't work on Open Solaris's own install of gnome-terminal.
    3. Are there some software (from 3rd party repos or opensolaris's) which help with these problems?

Please keep in mind that the reason this is important is because this is a headless server with primary administration via ssh and thus it is important to me that the shell terminal work correctly from all of the places I login from, preferably without needing special client-side settings. Ideally fixes would go in a shell script / bash script / whatever executed on account login.

share|improve this question
    
Solaris has traditionally been quite hostile to its own terminal input devices -- I'm a bit surprised that this hasn't been fixed. –  David Mackintosh Jul 28 '09 at 13:29

5 Answers 5

I ran into the same frustrations when I started using OpenSolaris. I was able to fix most of the terminal problems by installing screen.

pfexec pkg install SUNWscreen

I would love to hear other peoples solutions to this problem though.

share|improve this answer
1  
I should add that it is really odd that OpenSolaris defaults to a bash shell but has nothing to set it up. Once you get past some of the lack of creature comforts I think you'll find that OpenSolaris does seem to have a more unified feeling compared to Linux. And it does have some nice technology, ZFS, dtrace, comstar, crossbow, etc that makes wading through the pain worth it in the end. But I do wonder what will happen once BTRFS matures on Linux. By then I'm sure Linux will have a mature answer to Dtrace as well. But I think thats a few years away. –  3dinfluence Jul 28 '09 at 2:47
    
Thanks! Its interesting that screen works as a better shell in OpenSolaris then the default shell ;-/ ... I really was looking sort of fix the default shell though, not that screen isn't useful but just isn't how I tend to operate (maybe it should be hah). –  Petriborg Jul 29 '09 at 14:37
    
Yeah between using screen to fix the terminal emulation issues and setting up a proper .bashrc for the bash shell I've been able to get a usable environment. But I too would love to know how to fix the default terminal as having to use screen seems a bit kludgy. –  3dinfluence Jul 29 '09 at 17:49
    
I just ran across this link. I haven't had a chance to try it out yet though. codestrom.com/wandering/2008/09/fix-stty-xterm.html –  3dinfluence Jul 29 '09 at 17:52
    
@3dinfluence - hey thanks for the link I'll check that out tonight –  Petriborg Jul 30 '09 at 11:47

For those Linux Admins just moving to Solaris don't forget to add:

if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

to your ~/.profile so it actually reads your bash configurations.

share|improve this answer

adding the following to /etc/profile does the trick with HOME, END, DEL keys (and maybe more things):

TEMP_ORIGINAL_TERM="$TERM"
export TERM=screen
export TERM="$TEMP_ORIGINAL_TERM"

thoughts: I guess temporarily setting the TERM to screen sets some additional things that aren't overridden when setting back the original term (at least for me. I'm connecting using xterm (putty's default)). even though i consider this luck, i actually like this solution as it means not messing with inputrc file(s).

tested on snv_127 (OpenSolaris) and a fresh install of oi_147 (OpenIndiana)

(btw: thx for the answers suggesting screen, it's what led me to testing around until i got to this)

share|improve this answer

OpenSolaris is really the cutting-edge version of Solaris. It's definitely got some rough edges. I tend to stick to the real Solaris to avoid those issues. Even there, the x86 version of Solaris doesn't feel quite as polished as the SPARC version.

I've never tried to setup colors for the terminal (and haven't encountered keyboard weirdness anywhere other than the system console), so I'm only commenting on general items/feel.

share|improve this answer
    
Sure I understand that OpenSolaris is like Fedora for Red Hat here, and I'm ok with that - specially if I can get a fully featured ZFS zraid going... :-) But when you say rough edges, ouch, watch me bleed... –  Petriborg Jul 30 '09 at 11:44
    
Regular Solaris does ZFS quite nicely. No need to use OpenSolaris and feel the pain... :-) –  Brian Knoblauch Jul 30 '09 at 13:21
    
@Brian. $$$ is a reason? –  Jim Blizard Aug 26 '09 at 21:08
    
@Jim - Regular Solaris doesn't cost any $. Free just like OpenSolaris. –  Brian Knoblauch Aug 27 '09 at 11:20
up vote 0 down vote accepted

OK, its been a while since I wrote this question, but I think I've come to enough of a solution to post something comprehensive... Most of this info comes from 3dinfluence so please up vote his answer too.

The first thing you'll want to do is grab this inputrc file from this blog. I put this file in /etc/inputrc, and then modified /etc/profile to export INPUTRC="/etc/inputrc".

I also then created /etc/bash.bashrc in which I added a number of my normal bashrc items such as export HISTCONTROL=ignoreboth, etc.

To fix vim it was a larger pain in the butt in that your only real solution was to recompile it by hand, or use a 3rd party solaris-repo like blastwave. The simplest solution I could come to was to alias vim in /etc/bash.bashrc with alias vim='TERM=xterm-color vim'.

Using screen also solves vim's color problems, if you don't mind using screen.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.