Tip of the Day - Apple Terminal correct behavior with Solaris 10 08/07

Posted by Ron Valente Fri, 26 Oct 2007 06:07:00 GMT

Introduction

In this post the main objective is to get the Terminal used in Mac OS X works with expected behavior as oppsed to the erratic behavior that it normally does. The cause of this erratic behavior is caused by the terminal type that Apple Terminal defines itself as. Luckily in Apple Mac OS X 10.5 Leopard Apple has fixed the issue by creating profiles.

Setting The Required Variables

Mac OS X

Here is an example of my Mac OS X Client running the default terminal profile.

[rvalente]:[~]% uname -a
Darwin poseidon 9.0.0b5 Darwin Kernel Version 9.0.0b5:
Tue  Sep 18 20:47:38 PDT 2007; root:xnu-1207~1/RELEASE_I386 i386

Default Mac OS X Terminal Type

[rvalente]:[~]% echo $TERM
xterm-color

My Custom Terminal Type

[rvalente]:[~]% echo $TERM
vt100

Solaris

Here is an example of my Solaris Server. It is running Solaris 10 08/07

[rvalente]:[~]% uname -a 
SunOS zeus 5.10 Generic_127112-01 i86pc i386 i86pc

Solaris ZSHRC Configuration File

Here is my .zshrc on my solaris server to match the TERM variable with my Apple Terminal profile.

[rvalente]:[~]% cat .zshrc 
limit stack 8192
limit core 0
limit -s

umask 022

export HISTSIZE=1000
export SAVEHIST=1000
export HISTFILE=~/.history
export PS1='[%n]:[%~]%# '
export TERM=vt100

setopt autocd
setopt nobeep

source ~/.aliases

As you can see below that once that .zshrc is loaded when the login shell is started the correct value is set to the variable TERM.

[rvalente]:[~]% echo $TERM
vt100

Setting up your local profile (with pictures)

Open ther Terminal menu and select Preferences… menu. Select you current profile or create a new profile and set the following options as displayed in the picture below.

Apple Terminal Profile Configuration

Changing Default Login Shell in Mac OS X Tiger/Leopard 1

Posted by Ron Valente Fri, 26 Oct 2007 05:54:00 GMT

To change your default login shell in Mac OS X Tiger and Leopard first we must find the options we have. This is done by

Prometheus$ cat /etc/shells 
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

Note: There are a few ways to actually go about changing the login shell, a few of these options are chpass, chsh, using dscl, etc.

For this tip we will use chpass and change our login shell to zsh.

Prometheus$ chsh -s /bin/zsh rvalente
Changing shell for rvalente.
Password for rvalente: 
Prometheus$

Enjoy using your new default shell

Tip of the Day - July 20, 2007 - Shell Shortcut !!

Posted by Ben Allen Fri, 20 Jul 2007 20:15:00 GMT

So you are typing along on the console and press enter to run a command just to have a permission denied message pop-up. You forgot to run sudo. Instead of typing sudo and the entire command over again just type sudo !! and press enter. You will be pleasantly surprised that the command you just ran appears after sudo. All common shells have this quick shortcut. It can be used at anytime and in any commands. Just another little shortcut that makes life a little easier.

Sun Microsystems - Shared Shell 1

Posted by Ben Allen Fri, 20 Jul 2007 18:26:00 GMT

Introduction

Sun Microsystems' Shared Shell is a free piece of software that solves a number of problems for a system administrator. What it allows you to do is log into a SSH server as you would from any terminal, and then share the session with multiple users. It brings collaboration to SSH by adding a whiteboard feature and a chat window to the terminal. Probably its biggest attraction is that it allows multiple users connect to the same server without configuring firewalls, or adding accounts for each users. Shared Shell is written in Java, so it will run on almost any graphical platform. It does require that you have a freely available Sun Online Account or a Sun Microsystems Employee account. Shared Shell is available at Sun Microsystems - Shared Shell.

Sun Shared Shell Shared Shell's main window with an active terminal and two users.

Login

To create a new session you need to put in your SSH or Telnet server's address, username, and password. In addition you need to put in your Sun Online Account information. Login and Create New Session

To login to an existing Shared Shell session you will first need an invitation key from the session. This must by obtained outside of shared shell, i.e. IM, phone, email. You will also need to put in you Sun Online Account information before you connect to the session. Login to Existing Session

The following window will show you the invite code for your session. A user's Sun Online account name will show up in this window when he or she connects allowing you to decide to allow then or deny access to the session. New User Connecting

Features

Shared Shell includes the ability for users to use a white board functionality on top of the active terminal. Highlighting

As with any white board you can erase any marks that are made. Erasing

A great feature included in Shared Shell is that is colorizes each user's text. Not only does it colorize the text in the chat window but also in the terminal window, and cursors. Two User Colorizing

Permissions

Shared Shell allows you to give an invited user one of three permissions:

  • Full Access

    Allows the user to type in the terminal and press enter to execute commands.

  • No-Exec Access

    Allows the user to type in the terminal, but may not execute commands.

  • View Only Access

    Allows the user only to view the terminal. The user cannot type commands nor execute them.

Privledges

A full access user must press enter for the no-exec access user. This is useful if you want someone to show you the command but do not trust them enough to let them execute the command. No-Excute

File Transfer

Shared Shell allows users to send files and receive files from other users. Users can even request a file from another user. File Transferring

Transfer Complete

Sun Microsystems' Shared Shell is available freely for download at Sun Microsystems - Shared Shell.